﻿:root {
  --orange: #f47c20;
  --ink: #1f2933;
  --muted: #687385;
  --line: #dfe4ea;
  --paper: #f6f7f9;
  --white: #ffffff;
  --green: #2f9e44;
  --red: #dc3545;
  --blue: #1d72b8;
  --shadow: 0 14px 34px rgba(24, 39, 75, .11);
}

.service-order-items-panel .service-order-item-form.os-item-form {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 36px 52px 42px 30px;
  gap: 5px;
  align-items: end;
  min-width: 0;
}

.service-order-items-panel .service-order-item-form.os-item-form[data-os-item-kind="service"] {
  grid-template-columns: minmax(110px, 1fr) 36px 52px 42px minmax(130px, .8fr) 30px;
  position: relative;
}

.service-order-items-panel .service-order-item-form.os-item-form[data-os-item-kind="service"] .os-search-wrap {
  position: static;
}

.service-order-items-panel .service-order-item-form.os-item-form[data-os-item-kind="service"] .os-floating-results {
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  width: 100%;
  max-height: min(390px, 52vh);
  padding: 8px;
}

.service-order-items-panel .service-order-item-form.os-item-form[data-os-item-kind="service"] .os-floating-results button {
  padding: 10px 12px;
}

.service-order-items-panel .service-order-item-form.os-item-form[data-os-item-kind="service"] .os-suggestion-main strong {
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
}

.service-order-items-panel .service-order-item-form.os-item-form label {
  min-width: 0;
}

.service-order-items-panel .service-order-item-form.os-item-form input {
  min-width: 0;
  min-height: 31px;
  padding: 4px 6px;
  font-size: 10.5px;
}

.service-order-items-panel .service-order-item-form.os-item-form select {
  min-width: 0;
  min-height: 31px;
  padding: 4px 6px;
  font-size: 10.5px;
}

.service-order-items-panel .service-order-item-form.os-item-form .btn {
  width: 30px;
  min-width: 30px;
  min-height: 31px;
  padding: 0;
}

.service-order-head-compact {
  margin-bottom: 12px;
}

.service-order-head-compact h1 {
  font-size: 30px;
}

.service-order-head-compact p {
  margin-top: 4px;
}

.service-order-compact {
  padding: 12px;
}

.service-order-compact .quote-section-title {
  margin-bottom: 8px;
}

.service-order-compact .quote-section-title h2 {
  font-size: 17px;
}

.service-order-compact .quote-grid,
.service-order-compact .quote-item-form {
  gap: 6px 7px;
}

.service-order-compact .quote-grid label,
.service-order-compact .quote-item-form label {
  gap: 3px;
  font-size: 11px;
}

.service-order-compact .quote-grid input,
.service-order-compact .quote-grid select,
.service-order-compact .quote-grid textarea,
.service-order-compact .quote-item-form input {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 12px;
}

.service-order-compact .quote-grid textarea {
  min-height: 54px;
}

.os-compact-grid {
  grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(140px, 1fr));
}

.service-order-inline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.service-order-two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.os-item-form {
  grid-template-columns: minmax(120px, 1fr) 44px 60px 50px 32px;
  align-items: end;
  min-width: 0;
}

.os-item-form .btn {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding-left: 0;
  padding-right: 0;
  font-size: 14px;
}

.os-item-form input {
  text-align: right;
}

.os-item-form .os-search-wrap input {
  text-align: left;
}

.os-search-wrap {
  position: relative;
  min-width: 0;
}

.os-floating-results {
  position: absolute;
  z-index: 120;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 250px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.os-floating-results:empty {
  display: none;
}

.os-floating-results button {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 7px 9px;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.os-floating-results button + button {
  margin-top: 5px;
}

.os-floating-results button:hover,
.os-floating-results button.is-active,
.os-floating-results button:focus-visible {
  border-color: var(--orange);
  background: #fff7ed;
  outline: none;
}

.os-floating-results small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.os-floating-results .os-suggestion-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.os-floating-results .os-suggestion-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.os-floating-results .os-suggestion-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 112px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.os-floating-results .os-suggestion-meta b:last-child {
  color: var(--green);
  font-size: 13px;
}

.os-items-scroll {
  max-height: 260px;
  overflow: auto;
  margin-top: 10px;
}

.os-items-table {
  min-width: 520px;
}

.os-items-table th,
.os-items-table td {
  padding: 7px 6px;
  font-size: 11.5px;
  line-height: 1.2;
}

.os-items-table td strong {
  font-size: 12px;
}

.os-items-table td small {
  font-size: 10px;
}

.os-items-table td:nth-child(n+2),
.os-items-table th:nth-child(n+2) {
  width: 86px;
  text-align: right;
}

.os-items-table td:last-child,
.os-items-table th:last-child {
  width: 54px;
  text-align: center;
}

.os-service-items-table td:nth-child(2),
.os-service-items-table th:nth-child(2) {
  width: 190px;
  text-align: left;
}

.os-service-items-table td:nth-child(3),
.os-service-items-table th:nth-child(3) {
  width: 46px;
}

.os-service-items-table td:nth-child(4),
.os-service-items-table th:nth-child(4),
.os-service-items-table td:nth-child(5),
.os-service-items-table th:nth-child(5) {
  width: 68px;
}

.os-service-seller-form {
  display: flex;
  gap: 5px;
  align-items: center;
}

.os-service-seller-form select {
  min-width: 112px;
  max-width: 132px;
  padding: 5px 6px;
  font-size: 10.5px;
}

.os-service-seller-form .btn {
  min-width: 48px;
  padding: 6px 7px;
  font-size: 10.5px;
}

.os-icon-btn {
  min-width: 36px;
  width: 36px;
  padding-left: 0;
  padding-right: 0;
}

.os-total-inline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.commissions-head {
  margin-bottom: 14px;
}

.commission-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.commission-summary-card {
  display: grid;
  gap: 5px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.commission-summary-card span,
.commission-summary-card small {
  color: var(--muted);
  font-weight: 700;
}

.commission-summary-card strong {
  font-size: 28px;
  line-height: 1.1;
}

.commission-summary-card.pending {
  border-color: #fed7aa;
  background: #fffaf3;
}

.commission-summary-card.pending strong {
  color: #c2410c;
}

.commission-summary-card.paid {
  border-color: #bbf7d0;
  background: #f3fff7;
}

.commission-summary-card.paid strong {
  color: #15803d;
}

.commission-summary-card.filtered {
  border-color: #bfdbfe;
  background: #f5f9ff;
}

.commission-summary-card.filtered strong {
  color: #1d4ed8;
}

.commissions-panel {
  padding: 20px;
}

.commission-filters {
  display: grid;
  grid-template-columns: 145px 145px minmax(190px, .8fr) 155px minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.commission-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 10px;
}

.commission-toolbar > div {
  display: grid;
  gap: 2px;
}

.commission-toolbar span {
  color: var(--muted);
}

.commission-bulk-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.commissions-table-wrap {
  max-height: 620px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.commissions-table {
  min-width: 1180px;
}

.commissions-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f5f9;
}

.commissions-table td,
.commissions-table th {
  vertical-align: middle;
}

.commissions-table td:first-child,
.commissions-table th:first-child {
  width: 42px;
  text-align: center;
}

.commissions-table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.commission-detail {
  display: block;
  min-width: 210px;
  max-width: 360px;
  white-space: normal;
}

.commission-value {
  color: #166534;
  white-space: nowrap;
}

.commission-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.commission-status.pending {
  color: #9a3412;
  background: #ffedd5;
}

.commission-status.paid {
  color: #166534;
  background: #dcfce7;
}

.commission-empty {
  padding: 42px !important;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1100px) {
  .commission-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .commission-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .commission-summary-grid {
    grid-template-columns: 1fr;
  }
  .commission-filters {
    grid-template-columns: 1fr;
  }
  .commission-search {
    grid-column: auto;
  }
  .commission-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .commission-bulk-actions {
    justify-content: stretch;
  }
  .commission-bulk-actions .btn {
    flex: 1;
  }
}

.quote-status.waiting_parts,
.quote-status.waiting_approval {
  background: #fff7ed;
  color: #c2410c;
}

.quote-status.executing {
  background: #dbeafe;
  color: #1d4ed8;
}

.quote-status.cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

.os-list-filter {
  grid-template-columns: minmax(320px, 1fr) 220px 120px;
  margin-bottom: 12px;
}

.os-list-grid-wrap {
  max-height: calc(100vh - 300px);
  overflow: auto;
}

.os-list-grid {
  min-width: 1060px;
  font-size: 14px;
}

.os-list-grid th,
.os-list-grid td {
  padding: 9px 12px;
}

.os-list-grid small,
.os-detail-grid small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.os-master-row {
  background: #eefcf1;
}

.os-detail-row td {
  padding: 0;
  background: #f8fbff;
}

.os-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}

.os-detail-grid section {
  padding: 10px 14px;
}

.os-detail-grid section + section {
  border-left: 1px solid var(--line);
}

.os-detail-grid h3 {
  margin: 0 0 7px;
  color: #0b2341;
  font-size: 15px;
}

.os-detail-grid table {
  width: 100%;
  border-collapse: collapse;
}

.os-detail-grid th,
.os-detail-grid td {
  padding: 6px 8px;
  border-top: 1px solid #e4ebf4;
  font-size: 13px;
  text-align: left;
}

.os-detail-grid th:nth-child(n+2),
.os-detail-grid td:nth-child(n+2) {
  text-align: right;
  white-space: nowrap;
}

.os-actions-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

.os-actions-cell form {
  margin: 0;
}

.os-customer-modal-card {
  width: min(880px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.os-customer-modal-card .modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.os-customer-modal-card .modal-header h2 {
  margin: 0;
}

.os-customer-modal-card .modal-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.os-quick-customer-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.os-quick-customer-form label {
  display: grid;
  gap: 5px;
  color: #52657f;
  font-weight: 800;
}

.os-quick-customer-form input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.os-quick-customer-form .wide {
  grid-column: 1 / -1;
}

.service-order-print-page {
  font-size: 12px;
  color: #111827;
}

.os-print-header {
  display: grid;
  grid-template-columns: 180px 1fr 220px;
  border: 1px solid #111827;
}

.os-print-header > div {
  padding: 10px 12px;
}

.os-print-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.os-print-logo img {
  display: block;
  width: 158px;
  max-width: 100%;
  max-height: 58px;
  object-fit: contain;
}

.os-print-company {
  border-left: 1px solid #111827;
}

.os-print-header strong {
  display: block;
  font-size: 18px;
}

.os-print-header span {
  color: #374151;
}

.os-print-number {
  border-left: 1px solid #111827;
  text-align: center;
}

.os-print-number span {
  display: block;
  color: #111827;
  font-weight: 800;
}

.os-print-number b {
  display: block;
  margin-top: 4px;
  color: #dc2626;
  font-size: 24px;
}

.os-print-strip,
.os-print-two,
.os-print-bottom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid #111827;
  border-right: 1px solid #111827;
}

.os-print-strip div {
  padding: 7px 9px;
  border-bottom: 1px solid #111827;
}

.os-print-strip div + div {
  border-left: 1px solid #111827;
}

.os-print-strip span,
.os-print-summary span {
  display: block;
  color: #2563eb;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
}

.os-print-two {
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #111827;
}

.os-print-two > article + article {
  border-left: 1px solid #111827;
}

.os-print-box {
  padding: 9px 10px;
  border-left: 1px solid #111827;
  border-right: 1px solid #111827;
  border-bottom: 1px solid #111827;
}

.os-print-two .os-print-box {
  border: 0;
}

.os-print-box h3 {
  margin: -9px -10px 8px;
  padding: 6px 10px;
  border-bottom: 1px solid #111827;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 12px;
  text-transform: uppercase;
}

.os-print-box p {
  margin: 3px 0;
}

.os-print-table {
  width: 100%;
  border-collapse: collapse;
}

.os-print-table th,
.os-print-table td {
  padding: 5px 6px;
  border: 1px solid #9ca3af;
}

.os-print-table th {
  background: #f3f4f6;
  color: #1d4ed8;
}

.os-print-table td:nth-child(n+2),
.os-print-table th:nth-child(n+2) {
  text-align: right;
  white-space: nowrap;
}

.os-print-table small {
  display: block;
  color: #6b7280;
}

.os-print-bottom {
  grid-template-columns: 1fr 260px;
  border: 0;
}

.os-print-summary {
  border-right: 1px solid #111827;
  border-bottom: 1px solid #111827;
}

.os-print-summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px;
  border-top: 1px solid #111827;
}

.os-print-summary div:first-child {
  border-top: 0;
}

.os-print-summary div:last-child strong {
  font-size: 18px;
}

.os-print-signature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

@media (max-width: 1100px) {
  .service-order-two-columns,
  .os-detail-grid {
    grid-template-columns: 1fr;
  }

  .os-detail-grid section + section {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .os-compact-grid,
  .os-quick-customer-form {
    grid-template-columns: 1fr;
  }

  .os-list-filter {
    grid-template-columns: 1fr;
  }
}

/* Counter brand skin: distributor-style PDV */
body.counter-pdv-body {
  --counter-gold: #ffca2c;
  --counter-orange: #ff6b00;
  --counter-dark: #171717;
  --counter-dark-2: #2b261c;
  --counter-green: #13983f;
  --counter-line: #f1c457;
  background:
    radial-gradient(circle at 6% 8%, rgba(255, 202, 44, .44), transparent 24%),
    linear-gradient(135deg, #fff7d1 0%, #fff 42%, #fff3bd 100%);
}

body.counter-pdv-body .app-main {
  background:
    linear-gradient(180deg, rgba(255, 202, 44, .38), transparent 130px),
    linear-gradient(135deg, #fff9df 0%, #fff 44%, #fff0ad 100%);
}

.counter-pdv-layout {
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 420px;
}

.counter-pdv-layout .order-left,
.counter-summary-card,
.counter-favorites-card {
  border: 1px solid rgba(245, 158, 11, .42);
  border-radius: 10px;
  box-shadow: 0 16px 38px rgba(93, 64, 8, .14);
}

.counter-pdv-layout .order-left {
  background: #fff;
  overflow: hidden;
}

.counter-pdv-layout .order-left .page-head.compact {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 230px;
  gap: 18px;
  align-items: center;
  min-height: 150px;
  margin: 0;
  padding: 14px 18px;
  border: 0;
  border-radius: 10px 10px 0 0;
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 202, 44, .18), transparent 24%),
    linear-gradient(135deg, #111 0%, #211d18 58%, #393227 100%);
  color: #fff;
}

.counter-brand-block {
  width: 100%;
  min-width: 0;
  display: grid;
  place-items: center;
}

.counter-brand-block img,
.counter-brand-block span {
  width: 158px;
  height: 118px;
  object-fit: contain;
}

.counter-brand-block span {
  border-radius: 50%;
  background: #fff;
  color: var(--counter-orange);
  display: grid;
  place-items: center;
  font-size: 54px;
  font-weight: 950;
}

.counter-pdv-layout .page-head h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 4.6vw, 68px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: .95;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 3px 0 rgba(0, 0, 0, .28);
}

.counter-pdv-layout .page-head h1::before,
.counter-pdv-layout .page-head h1::after {
  content: "*";
  margin: 0 18px;
  color: var(--counter-gold);
  font-size: .45em;
  vertical-align: middle;
}

.counter-pdv-layout .page-head p {
  margin-top: 10px;
  color: #fff8d7;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.counter-open-badge {
  margin: 8px auto 0;
  padding: 5px 16px;
  border-radius: 7px;
  background: linear-gradient(180deg, #25c464, #129542);
  color: #fff;
  box-shadow: 0 8px 18px rgba(16, 185, 129, .32);
}

.counter-pdv-layout .header-actions {
  display: grid;
  gap: 8px;
}

.counter-pdv-layout .header-actions .inline-form,
.counter-pdv-layout .header-actions form {
  width: 100%;
}

.counter-pdv-layout .header-actions .btn,
.counter-pdv-layout .header-actions label.btn {
  width: 100%;
  min-height: 40px;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid rgba(255, 202, 44, .8);
  border-radius: 7px;
  background: rgba(0, 0, 0, .22);
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  text-transform: uppercase;
}

.counter-pdv-layout .header-actions .btn .shortcut-key {
  min-width: 44px;
  min-height: 32px;
  border-radius: 6px;
  background: var(--counter-gold);
  color: #111827;
}

.counter-pdv-layout .header-actions .btn.danger,
.counter-pdv-layout .header-actions label.btn.danger {
  border-color: #f59e0b;
  background: rgba(255, 107, 0, .18);
  color: #ff8a1d;
}

.counter-pdv-layout .counter-maximize-btn {
  border-color: rgba(255, 255, 255, .72) !important;
  color: #fff !important;
}

.counter-pdv-layout .search-add {
  grid-template-columns: minmax(0, 1fr) 110px 190px;
  gap: 10px;
  margin: 0;
  padding: 18px 20px;
  border: 0;
  border-bottom: 1px solid #f5c64b;
  border-radius: 0;
  background: #fff;
}

.counter-pdv-layout .search-add input {
  min-height: 58px;
  border: 1px solid #8f8f8f;
  border-radius: 6px;
  font-size: 22px;
  font-weight: 850;
}

.counter-pdv-layout .search-add input[name="quantity"] {
  text-align: center;
  font-size: 24px;
}

.counter-pdv-layout .search-add .btn.primary {
  min-height: 58px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #ff8424, #ff5f00);
  box-shadow: 0 10px 20px rgba(255, 107, 0, .26);
  font-size: 18px;
  font-weight: 950;
  text-transform: uppercase;
}

.counter-pdv-layout .search-add .btn.primary small {
  color: #fff;
}

.counter-pdv-layout .order-items {
  position: relative;
  flex: 1;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 13% 86%, rgba(251, 191, 36, .12), transparent 22%),
    linear-gradient(180deg, #fff 0%, #fff 84%, #fff7d6 100%);
  overflow: auto;
}

.counter-pdv-layout .order-items::after {
  content: "";
  position: sticky;
  bottom: 0;
  display: block;
  height: 42px;
  margin-top: 120px;
  background:
    linear-gradient(170deg, transparent 0 44%, rgba(255, 202, 44, .82) 45% 57%, var(--counter-orange) 58% 100%);
  pointer-events: none;
}

.counter-items-head {
  position: sticky;
  top: 0;
  z-index: 3;
  border-bottom: 0;
  background: linear-gradient(180deg, #ffd950, var(--counter-gold));
  color: #111827;
}

.counter-items-head,
.counter-item-row {
  grid-template-columns: 58px minmax(260px, 1fr) 86px 118px 118px 86px;
}

.counter-pdv-layout .order-items article.counter-item-row {
  grid-template-columns: 58px minmax(260px, 1fr) 86px 118px 118px 86px;
  min-height: 58px;
  border-bottom: 1px solid rgba(245, 158, 11, .18);
  background: rgba(255, 255, 255, .86);
}

.counter-pdv-layout .order-items article.counter-item-row:nth-of-type(even),
.counter-pdv-layout .order-items article.counter-item-row:nth-of-type(odd) {
  background: rgba(255, 255, 255, .9);
}

.counter-summary-panel {
  top: 10px;
  gap: 12px;
}

.counter-summary-card {
  overflow: hidden;
  padding: 0;
  background: #fff;
}

.counter-summary-card h2 {
  margin: 0;
  padding: 18px 20px;
  background:
    linear-gradient(90deg, var(--counter-gold) 0 22%, transparent 22% 78%, var(--counter-gold) 78%),
    linear-gradient(135deg, #111, #28231b);
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.counter-summary-stats {
  gap: 0;
  border-bottom: 1px solid #f1d58b;
}

.counter-summary-stats > div {
  min-height: 108px;
  border-right: 1px solid #eee2bf;
}

.counter-summary-stats strong {
  color: var(--counter-orange);
  font-size: 36px;
}

.counter-summary-total {
  display: grid;
  gap: 10px;
  padding: 24px 22px 28px;
  border: 0;
  background: #fff;
}

.counter-summary-total span {
  color: #111827;
  font-size: 16px;
  font-weight: 950;
}

.counter-summary-total strong {
  color: #0f7a30;
  font-size: clamp(42px, 4.5vw, 64px);
  line-height: 1;
  text-align: center;
}

.counter-summary-finish {
  margin: -78px 12px 12px;
  position: relative;
  z-index: 2;
}

.counter-summary-finish .counter-finish-btn {
  min-height: 60px;
  border-radius: 7px;
  background: linear-gradient(180deg, #19b957, #0e9a41) !important;
  border-color: #0e9a41 !important;
  box-shadow: 0 12px 24px rgba(16, 185, 129, .28);
  font-size: 20px;
  text-transform: uppercase;
}

.counter-favorites-card {
  padding: 12px;
  background: rgba(255, 255, 255, .92);
}

.counter-favorites-card .product-panel-heading h2 {
  color: #111827;
  font-size: 20px;
  text-transform: uppercase;
}

.counter-favorite-tile button {
  min-height: 64px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  border-color: #ead9ad;
  border-radius: 8px;
  background: #fff;
}

.counter-favorite-tile img,
.counter-favorite-tile .photo-fallback {
  width: 46px;
  height: 46px;
}

.counter-favorite-tile strong {
  font-size: 13px;
  font-weight: 950;
  white-space: normal;
}

.counter-favorite-tile small {
  color: #0f9b3e;
  font-size: 14px;
}

.counter-shortcut-bar {
  gap: 16px;
  padding: 16px 20px;
  border-top: 1px solid #f5c64b;
  background: linear-gradient(180deg, #fff9e7, #fff);
}

.counter-shortcut-bar label,
.counter-shortcut-bar button {
  min-height: 70px;
  border: 1px solid #ead9ad;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(93, 64, 8, .1);
}

.counter-shortcut-bar label strong,
.counter-shortcut-bar button strong {
  color: #1f2937;
  font-size: 24px;
}

.counter-shortcut-bar button.success {
  background: linear-gradient(180deg, #18b957, #0e9a41);
}

.counter-shortcut-bar button.success strong,
.counter-shortcut-bar button.success span {
  color: #fff;
}

.counter-shortcut-bar label.danger {
  color: #dc2626;
  background: #fff4f4;
}

body.counter-pdv-maximized .counter-pdv-layout {
  grid-template-columns: minmax(0, 1fr) 420px;
}

body.counter-pdv-maximized .counter-pdv-layout .order-left .page-head.compact {
  min-height: 142px;
  padding: 12px 16px;
}

body.counter-pdv-maximized .counter-summary-panel {
  top: 0;
}

@media (max-width: 1180px) {
  .counter-pdv-layout,
  body.counter-pdv-maximized .counter-pdv-layout {
    grid-template-columns: 1fr;
  }

  .counter-pdv-layout .order-left .page-head.compact {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .counter-pdv-layout .header-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .counter-pdv-layout .order-left .page-head.compact {
    grid-template-columns: 1fr;
  }

  .counter-brand-block img,
  .counter-brand-block span {
    width: 124px;
    height: 92px;
  }

  .counter-pdv-layout .page-head h1 {
    font-size: 40px;
  }

  .counter-pdv-layout .header-actions,
  .counter-pdv-layout .search-add {
    grid-template-columns: 1fr;
  }

  .counter-summary-finish {
    margin: 0;
  }
}

.online-catalog-page {
  padding-bottom: 40px !important;
}

.online-catalog-page .online-product-ok,
.online-catalog-page .online-add,
.online-catalog-page .online-sticky-order,
.online-catalog-page .online-checkout-card,
.online-catalog-page .online-modal {
  display: none !important;
}

.online-catalog-page .online-lunch-page,
.online-catalog-page .online-catalog-content {
  width: 100%;
}

.online-catalog-page .online-product {
  cursor: default;
}

@media (max-width: 900px) {
  .online-catalog-page.online-lunch-page {
    padding-bottom: 36px !important;
  }

  .online-catalog-page .online-lunch-page .online-product,
  .online-catalog-page .online-product {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  .online-catalog-page .online-group-card:not(.online-group-marmitex) .online-product-has-photo {
    grid-template-columns: 92px minmax(0, 1fr) !important;
  }

  .online-catalog-page .online-product-info p,
  .online-catalog-page .online-product-info strong {
    display: block !important;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.muted { color: var(--muted); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 238px;
  background: linear-gradient(180deg, #09334a 0%, #092b3f 55%, #071f30 100%);
  color: #eef2f7;
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  transition: transform .18s ease, width .18s ease;
  box-shadow: 12px 0 28px rgba(7,31,48,.18);
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 2px 6px 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand {
  width: 54px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(244,124,32,.28);
}
.sidebar nav {
  display: grid;
  gap: 5px;
  overflow-y: auto;
  padding-right: 4px;
}
.nav-section {
  display: grid;
  gap: 1px;
  padding: 2px 0 7px 48px;
}
.nav-section-wrap {
  display: grid;
  gap: 2px;
  border-radius: 9px;
}
.nav-section-wrap summary {
  width: 100%;
  min-height: 48px;
  list-style: none;
  display: grid;
  grid-template-columns: 34px 1fr 18px;
  align-items: center;
  gap: 11px;
  color: #f3f7fb;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  padding: 8px 8px;
  text-align: left;
  cursor: pointer;
  border-radius: 9px;
}
.nav-section-wrap summary::-webkit-details-marker {
  display: none;
}
.nav-section-wrap summary:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.nav-group-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 23px;
  line-height: 1;
}
.nav-group-icon.fiscal-nav-icon {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}
.chevron {
  color: #fff;
  font-size: 27px;
  line-height: 1;
  transition: transform .16s ease;
}
.nav-section-wrap[open] .chevron {
  transform: rotate(90deg);
}
.sidebar a:not(.brand) {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 7px;
  color: #c8d7e3;
  min-height: 34px;
  font-size: 14px;
}
.nav-dot {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.34);
}
.sidebar a.active, .sidebar a:hover {
  background: rgba(255,255,255,.11);
  color: #fff;
}
.sidebar a.active .nav-dot,
.sidebar a:hover .nav-dot {
  background: var(--orange);
}
.logout {
  margin-top: auto;
  min-height: 44px !important;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 12px !important;
}
.app-version {
  color: rgba(238, 242, 247, .58);
  font-size: 11px;
  line-height: 1.3;
  padding: 8px 10px 4px 44px;
  letter-spacing: 0;
  white-space: nowrap;
}

.sidebar-toggle {
  position: fixed;
  left: 226px;
  top: 78px;
  z-index: 30;
  width: 26px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 0 8px 8px 0;
  background: #092b3f;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 8px 0 16px rgba(7,31,48,.18);
  transition: left .18s ease, transform .18s ease;
}

body.sidebar-collapsed .sidebar {
  transform: translateX(-238px);
}

body.sidebar-collapsed .app-main {
  margin-left: 0;
}

body.sidebar-collapsed .topbar {
  left: 0;
}

body.sidebar-collapsed .sidebar-toggle {
  left: 0;
}

html.sidebar-collapsed-initial .sidebar {
  transform: translateX(-238px);
}

html.sidebar-collapsed-initial .app-main {
  margin-left: 0;
}

html.sidebar-collapsed-initial .topbar,
html.sidebar-collapsed-initial .sidebar-toggle {
  left: 0;
}

body.counter-pdv-body .sidebar {
  transform: translateX(-238px);
}

body.counter-pdv-body .app-main {
  margin-left: 0;
}

body.counter-pdv-body .sidebar,
body.counter-pdv-body .sidebar-toggle,
body.counter-pdv-body .topbar {
  display: none !important;
}

body.counter-pdv-body .topbar {
  left: 0;
}

body.counter-pdv-body .sidebar-toggle {
  left: 0;
}

.app-main { margin-left: 238px; min-height: 100vh; padding: 86px 24px 34px; transition: margin-left .18s ease; }
.topbar {
  position: fixed;
  left: 238px;
  right: 0;
  top: 0;
  z-index: 10;
  height: 64px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  transition: left .18s ease;
}
.topbar div { display: grid; gap: 2px; }
.topbar span, .page-head p { color: var(--muted); font-size: 14px; }

.auth-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(140deg, #222831, #343a40 45%, #f47c20);
}
.login-card {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  background: #fff;
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
}
.login-hero { padding: 54px; background: #252a31; color: #fff; }
.login-hero span { color: #ffb16e; font-weight: 700; text-transform: uppercase; font-size: 13px; }
.login-hero h1 { font-size: 42px; line-height: 1.05; margin: 18px 0; }
.login-hero p { color: #d5dbe3; font-size: 18px; }
.login-form { padding: 42px; display: grid; gap: 16px; align-content: center; }

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}
.header-actions, .panel-title-row, .list-filter, .header-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.header-filter input { width: auto; min-width: 150px; }
.panel-title-row {
  justify-content: space-between;
  margin-bottom: 12px;
}
.list-filter input {
  min-width: 260px;
}
.page-head h1, .panel h1, .panel h2 { margin: 0 0 6px; }
.compact { margin-bottom: 14px; }

.btn, .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn.danger { color: var(--red); border-color: #f4c2c7; }
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.action-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.pill { min-height: 34px; font-size: 13px; }

.flash {
  padding: 13px 16px;
  border-radius: 7px;
  margin-bottom: 18px;
  background: #e7f7ec;
  color: #146c2e;
}
.flash.danger { background: #fdecec; color: #9f1d2d; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.metrics article, .panel, .payment-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(24,39,75,.06);
}
.metrics article { padding: 22px; display: grid; gap: 12px; }
.metrics span { color: var(--muted); }
.metrics strong { font-size: 30px; }
.panel { padding: 22px; }
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  gap: 18px;
}
.bar-chart {
  min-height: 260px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 18px 0 4px;
  overflow-x: auto;
}
.bar-item {
  flex: 0 0 62px;
  height: 230px;
  display: grid;
  grid-template-rows: 24px 1fr auto;
  gap: 7px;
  align-items: end;
  justify-items: center;
}
.bar-item strong { color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.bar-item span {
  display: block;
  width: 28px;
  background: linear-gradient(180deg, #1d72b8, #f47c20);
  border-radius: 6px 6px 2px 2px;
}
.bar-item small { color: var(--muted); font-size: 11px; text-align: center; }
.report-panel { margin-top: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; }
td img { max-width: 100%; height: auto; }

.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 12px;
}
.delivery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.delivery-head { align-items: end; }
.delivery-grid-pro { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.delivery-card {
  min-height: 170px;
  display: grid;
  gap: 8px;
  align-content: start;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--orange);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(24,39,75,.06);
}
.delivery-card.pronto { border-left-color: var(--blue); }
.delivery-card.saiu { border-left-color: #7c3aed; }
.delivery-card.entregue { border-left-color: var(--green); }
.moto-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff3e8;
  color: var(--orange);
  font-size: 24px;
}
.delivery-card strong { font-size: 17px; }
.delivery-card small, .delivery-card em { color: var(--muted); font-style: normal; }
.delivery-card span:not(.moto-icon) { color: var(--blue); font-size: 12px; font-weight: 800; }
.delivery-card b { color: var(--green); font-size: 20px; }
.delivery-card-pro {
  min-height: 104px;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  align-content: center;
  gap: 3px 12px;
  padding: 12px 44px 12px 12px;
}
.delivery-card-pro .delivery-house {
  grid-row: 1 / span 2;
  grid-column: 1;
  transform: scale(.48);
  transform-origin: left center;
}
.delivery-card-pro div {
  display: grid;
  grid-column: 2;
  gap: 1px;
  min-width: 0;
}
.delivery-card-pro div b {
  color: var(--text);
  font-size: 14px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.delivery-card-pro span:not(.delivery-house),
.delivery-card-pro em,
.delivery-card-pro .delivery-total {
  grid-column: 2;
}
.delivery-card-pro small,
.delivery-card-pro em {
  font-size: 13px;
  line-height: 1.1;
}
.delivery-card-pro span:not(.delivery-house) {
  font-size: 11px;
}
.delivery-total { color: var(--green) !important; font-size: 17px !important; }
.online-order-badge,
.online-order-ribbon {
  width: fit-content;
  border: 0;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 9px;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.online-order-ribbon {
  display: inline-flex;
  margin-top: 6px;
}
.delivery-whatsapp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}
.btn.whatsapp,
.online-btn.whatsapp {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}
.delivery-toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 80;
  min-width: 300px;
  max-width: min(420px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #052e1a;
  color: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .22);
  border-left: 6px solid #22c55e;
}
.delivery-toast[hidden] { display: none; }
.delivery-toast strong,
.delivery-toast span {
  grid-column: 1;
}
.delivery-toast strong { font-size: 17px; }
.delivery-toast span { color: #dcfce7; }
.delivery-toast-link {
  grid-column: 1;
  width: fit-content;
  margin-top: 4px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}
.delivery-toast-link:hover {
  background: #22c55e;
  color: #fff;
}
.delivery-toast button {
  grid-column: 2;
  grid-row: 1 / span 3;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 800;
}
.delivery-toast button:hover {
  background: rgba(255, 255, 255, .22);
}
.delivery-house {
  width: 68px;
  height: 52px;
  position: relative;
  display: inline-block;
  background: #ffd6aa;
  border: 3px solid #c76d2a;
  border-top: 0;
}
.delivery-house::before {
  content: "";
  position: absolute;
  left: -7px;
  top: -24px;
  width: 76px;
  height: 34px;
  background: #ff7f1f;
  border: 3px solid #c76d2a;
  border-radius: 10px 10px 4px 4px;
  transform: skewX(-12deg);
}
.delivery-house::after {
  content: "";
  position: absolute;
  left: 25px;
  bottom: -3px;
  width: 18px;
  height: 24px;
  background: #fff;
  border: 3px solid #c76d2a;
  border-bottom: 0;
}
.delivery-house.small {
  transform: scale(.66);
  transform-origin: center;
}
.delivery-card-pro .delivery-house.small {
  transform: translateX(-8px) scale(.56);
  transform-origin: left center;
}
.table-card {
  position: relative;
  overflow: visible;
  min-height: 82px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  padding: 8px;
  box-shadow: 0 6px 14px rgba(24,39,75,.05);
}
.table-card strong { font-size: 23px; color: var(--blue); line-height: 1; }
.table-card small { color: var(--muted); font-size: 13px; line-height: 1.1; }
.table-card.open { border-color: #ffc078; background: #fff7ed; }

.table-client-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translate(-50%, 6px);
  min-width: max-content;
  max-width: 260px;
  background: #071f30;
  color: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 10px 22px rgba(7,31,48,.24);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
  z-index: 30;
}

.table-client-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #071f30;
}

.table-card.has-customer:hover .table-client-tooltip,
.table-card.has-customer:focus-visible .table-client-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.table-shape {
  width: 52px;
  height: 26px;
  border-radius: 50%;
  background: #9ad28b;
  border: 4px solid #d4d9de;
  box-shadow: -20px 0 0 -12px #d9dde2, 20px 0 0 -12px #d9dde2;
}

.table-quick-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #123b76;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

button.table-quick-shortcut {
  cursor: pointer;
  font: inherit;
}

.open-table-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  margin: 10px 0 4px;
}

.open-table-list button {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.open-table-list button:hover,
.open-table-list button:focus {
  border-color: #93c5fd;
  background: #eff6ff;
  outline: none;
}

.open-table-list span {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, .7fr);
  gap: 22px;
}

.order-layout.favorites-collapsed {
  grid-template-columns: minmax(0, 1fr) 48px;
}

.order-layout.favorites-collapsed .product-panel {
  display: block;
  padding: 10px 7px;
  align-self: start;
}

.order-layout.favorites-collapsed .product-panel-heading {
  justify-content: center;
  margin-bottom: 0;
}

.order-layout.favorites-collapsed .product-panel-heading h2,
.order-layout.favorites-collapsed .product-grid {
  display: none;
}

.order-layout.favorites-collapsed .panel-toggle {
  width: 32px;
  height: 42px;
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
.delivery-order-screen {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.delivery-main {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  min-height: 520px;
}
.delivery-side-icons {
  background: linear-gradient(180deg, #fff7ed, #ffffff);
  border-right: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 28px 22px;
  color: #9a3412;
}
.delivery-side-icons span,
.delivery-side-icons small {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}
.delivery-side-icons strong {
  color: var(--orange);
  font-size: 44px;
  line-height: 1;
  letter-spacing: 0;
}
.delivery-form-panel {
  padding: 28px;
  display: grid;
  gap: 18px;
  align-content: start;
}
.delivery-new-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.delivery-new-head span {
  color: #64748b;
  font-weight: 800;
}
.delivery-new-head h1 {
  margin: 4px 0 0;
  font-size: 34px;
  line-height: 1.1;
}
.delivery-back-button {
  min-width: 104px;
}
.delivery-top {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.delivery-number {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}
.delivery-number span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}
.delivery-number strong {
  color: #1d4ed8;
  font-size: 42px;
  line-height: 1;
}
.delivery-fields, .delivery-inline {
  display: grid;
  gap: 10px;
}
.delivery-inline {
  grid-template-columns: minmax(150px, .6fr) minmax(160px, .7fr) minmax(220px, 1fr);
}
.delivery-compact-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 12px;
}
.delivery-compact-grid label:nth-child(1),
.delivery-compact-grid label:nth-child(3) {
  grid-column: span 2;
}
.delivery-customer-head {
  padding: 14px 16px;
}
.delivery-customer-head h2 {
  margin: 0;
  font-size: 22px;
}
.delivery-new-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 4px;
}
.delivery-form-panel textarea { min-height: 64px; }
.delivery-create {
  min-height: 46px;
}
@media (max-width: 1100px) {
  .delivery-main {
    grid-template-columns: 1fr;
  }
  .delivery-side-icons {
    display: none;
  }
  .delivery-top,
  .delivery-inline,
  .delivery-compact-grid {
    grid-template-columns: 1fr;
  }
  .delivery-compact-grid label:nth-child(1),
  .delivery-compact-grid label:nth-child(3) {
    grid-column: auto;
  }
}
@media (max-width: 640px) {
  .delivery-form-panel {
    padding: 18px;
  }
  .delivery-new-head,
  .delivery-new-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .delivery-back-button,
  .delivery-new-actions .btn {
    width: 100%;
  }
}
.order-left, .product-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.order-left {
  padding: 16px;
}

.order-left .page-head.compact {
  padding: 20px 26px;
  margin-bottom: 16px;
}

.product-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.product-panel-heading h2 {
  margin: 0;
}

.panel-toggle {
  width: 34px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
}
.search-add {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px auto;
  gap: 10px;
  margin-bottom: 10px;
}
.product-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 80;
  display: grid;
  gap: 6px;
  max-height: min(60vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid #d6e0ec;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
  scrollbar-gutter: stable;
}
.product-suggestions[hidden] {
  display: none !important;
}
.product-suggestions button, .product-suggestions span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.product-suggestions button {
  min-height: 58px;
}
.product-suggestions button span {
  flex: 0 0 auto;
  border: 1px solid #dbe7f5;
  background: #f8fafc;
  color: #0f172a;
  white-space: nowrap;
  cursor: default;
}
.product-suggestions button:hover,
.product-suggestions button.is-active,
.product-suggestions button:focus-visible {
  border-color: var(--orange);
  background: #fff7ed;
  outline: 2px solid rgba(249, 115, 22, 0.18);
}
input, select, textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cfd6df;
  border-radius: 7px;
  padding: 9px 11px;
  background: #fff;
}
textarea { min-height: 90px; resize: vertical; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 14px; }
.table-customer-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.table-customer-form .customer-results { grid-column: 1 / -1; }
.table-order-note-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: -6px 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.table-order-note-form textarea {
  min-height: 64px;
}
.order-customer-change {
  grid-column: 1 / -1;
  margin-top: 2px;
}
.order-customer-change summary {
  width: max-content;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 8px 12px;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.order-customer-change summary::-webkit-details-marker {
  display: none;
}
.order-customer-change summary:hover,
.order-customer-change[open] summary {
  border-color: var(--orange);
  background: #fff7ed;
}
.order-customer-change .order-customer-form {
  margin-top: 10px;
  margin-bottom: 0;
}
.order-customer-form .customer-results {
  max-height: min(420px, 48vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.delivery-customer-summary {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 8px 16px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.delivery-customer-summary span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}
.delivery-customer-summary strong { font-size: 18px; color: var(--text); }
.delivery-customer-summary p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}
.order-items { display: grid; gap: 0; }
.order-items article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.order-items article > strong {
  font-size: 16px;
}
.item-additionals {
  grid-column: 1 / -1;
  margin: -8px 0 2px 18px;
  color: var(--muted);
  font-size: 13px;
}
.item-additionals li { margin: 2px 0; }
.item-note {
  grid-column: 1 / -1;
  display: block;
  padding: 8px 10px;
  border-left: 3px solid var(--orange);
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
  font-weight: 700;
}
.item-note-editor {
  grid-column: 1 / -1;
  color: var(--muted);
}
.item-note-editor summary {
  width: max-content;
  cursor: pointer;
  color: var(--blue);
  font-weight: 800;
  font-size: 14px;
}
.item-note-editor form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.item-note-editor textarea {
  min-height: 68px;
  resize: vertical;
}
.muted { opacity: .48; }
.link-danger { border: 0; background: none; color: var(--red); cursor: pointer; }
.order-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.order-current-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  padding: 14px 12px 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}
.order-current-total strong {
  color: var(--green);
  font-size: 24px;
}
.order-print-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.order-print-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.inline-form { display: flex; gap: 8px; }
.delivery-details-form {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.delivery-details-form .btn {
  align-self: end;
  min-height: 50px;
}
.delivery-neighborhood-fee-preview {
  display: block;
  margin-top: 6px;
  color: #0f8f3a;
  font-weight: 800;
}
.delivery-fee-highlight {
  padding: 8px;
  border-radius: 8px;
  background: #fff700;
  box-shadow: inset 0 0 0 1px rgba(202, 138, 4, .25);
}
.delivery-fee-highlight input {
  border-color: #eab308;
  background: #fffde7;
  font-weight: 800;
}
.delivery-change-preview {
  display: block;
  min-height: 18px;
  margin-top: 4px;
  color: var(--green);
  font-weight: 800;
}
.delivery-notes-field {
  grid-column: 1 / -1;
}
.delivery-notes-field textarea {
  min-height: 84px;
  resize: vertical;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 900;
}
.status-pill.closed {
  color: #166534;
  background: #dcfce7;
}
.delivery-readonly {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 800;
}
.autosave-status {
  align-self: center;
  color: var(--green);
  font-weight: 700;
}
.product-panel h2 { margin-top: 0; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.product-tile button {
  width: 100%;
  min-height: 138px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  padding: 8px;
  display: grid;
  gap: 7px;
  justify-items: center;
}
.product-tile.highlight button { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(244,124,32,.18); }
.product-tile img, .photo-fallback {
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: cover;
  border-radius: 6px;
  background: #eef1f5;
}
.photo-fallback {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 42px;
  font-weight: 800;
  background: var(--group);
}
.product-tile strong { font-size: 13px; text-align: center; }
.product-tile small { color: var(--green); font-weight: 700; font-size: 12px; }

.counter-pdv-layout {
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 14px;
  align-items: start;
}
.counter-pdv-layout.favorites-collapsed {
  grid-template-columns: minmax(0, 1fr) 380px;
}
.counter-pdv-layout .order-left,
.counter-summary-card {
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(24,39,75,.06);
}
.counter-pdv-layout .order-left .page-head.compact {
  align-items: center;
  min-height: 0;
  padding: 14px 18px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(90deg, #fff 0%, #fff7ed 100%);
}
.counter-pdv-layout .page-head h1 {
  margin-bottom: 4px;
  font-size: 30px;
  line-height: 1.05;
}
.counter-pdv-layout .page-head p {
  margin: 0;
  font-size: 13px;
}
.counter-pdv-layout .header-actions .btn {
  min-width: 112px;
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 8px;
  font-weight: 800;
}
.counter-pdv-layout .header-actions .btn.danger {
  background: #fff;
  border-color: #fecaca;
  color: #dc2626;
}
.counter-maximize-btn {
  gap: 8px;
  color: #1d4ed8;
}
.counter-maximize-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.counter-open-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.counter-pdv-layout .search-add {
  grid-template-columns: minmax(0, 1fr) 104px 116px;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.counter-pdv-layout .search-add input {
  min-height: 44px;
  font-size: 16px;
}
.counter-pdv-layout .search-add .btn.primary {
  min-height: 44px;
  display: grid;
  gap: 0;
  background: #16a34a;
  border-color: #16a34a;
}
.counter-pdv-layout .search-add .btn.primary small {
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
}
.counter-pdv-layout .order-items {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  align-content: start;
  grid-auto-rows: min-content;
}
.counter-items-head,
.counter-item-row {
  display: grid;
  grid-template-columns: 48px minmax(280px, 1fr) 76px 108px 108px 82px;
  align-items: center;
  gap: 12px;
}
.counter-items-head {
  padding: 10px 14px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.counter-pdv-layout .order-items article.counter-item-row {
  grid-template-columns: 48px minmax(280px, 1fr) 76px 108px 108px 82px;
  min-height: 56px;
  padding: 7px 14px;
}
.counter-item-row > strong {
  grid-column: 2;
  grid-row: 1;
  font-size: 13px;
  line-height: 1.25;
}
.counter-item-number {
  grid-column: 1;
  grid-row: 1;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.counter-item-qty {
  grid-column: 3;
  grid-row: 1;
  width: fit-content;
  min-width: 54px;
  justify-self: start;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
}
.counter-item-unit,
.counter-item-row > b {
  text-align: right;
  font-size: 13px;
}
.counter-item-unit {
  grid-column: 4;
  grid-row: 1;
}
.counter-item-unit.editable {
  justify-self: stretch;
  min-height: 34px;
  border: 1px dashed #f59e0b;
  border-radius: 7px;
  padding: 4px 8px;
  background: #fffbeb;
  color: #92400e;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.counter-item-unit.editable:hover,
.counter-item-unit.editable:focus-visible {
  border-style: solid;
  background: #fef3c7;
  outline: none;
}
.counter-item-row > b {
  grid-column: 5;
  grid-row: 1;
}
.counter-item-row .item-additionals,
.counter-item-row .item-note,
.counter-item-row .item-note-editor {
  grid-column: 2 / -1;
  grid-row: 2;
}
.counter-item-discount {
  grid-column: 2 / -1;
  grid-row: 3;
  color: #dc2626;
  font-size: 12px;
  font-weight: 800;
}
.counter-item-row > form {
  grid-column: 6;
  grid-row: 1;
  justify-self: end;
}
.counter-item-actions {
  grid-column: 6;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
}
.counter-item-actions form {
  margin: 0;
}
.counter-item-icon {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.counter-item-icon.discount {
  color: #0f766e;
  background: #f0fdfa;
  border-color: #99f6e4;
}
.counter-item-icon.discount.active {
  color: #92400e;
  background: #fffbeb;
  border-color: #fcd34d;
}
.counter-item-icon.danger {
  color: #dc2626;
  background: #fff1f2;
  border-color: #fecaca;
}
.counter-item-icon:hover {
  filter: brightness(.98);
}
.counter-summary-panel {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 12px;
}
.counter-summary-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
}
.counter-summary-card h2 {
  margin: 0;
  font-size: 24px;
}
.counter-summary-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.counter-summary-stats > div {
  display: grid;
  gap: 5px;
  justify-items: center;
  min-height: 82px;
  align-content: center;
  border-right: 1px solid var(--line);
}
.counter-summary-stats > div:last-child {
  border-right: 0;
}
.counter-summary-stats span,
.counter-summary-stats small {
  color: var(--muted);
}
.counter-summary-stats strong {
  color: #15803d;
  font-size: 30px;
  line-height: 1;
}
.counter-summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-weight: 900;
  text-transform: uppercase;
}
.counter-summary-total strong {
  color: #15803d;
  font-size: 30px;
  text-transform: none;
}
.counter-summary-finish {
  margin: 0;
}
.counter-finish-btn {
  width: 100%;
  min-height: 50px;
  background: #16a34a !important;
  border-color: #16a34a !important;
  font-size: 16px;
}

body.counter-pdv-maximized {
  overflow: hidden;
}

body.counter-pdv-maximized .sidebar,
body.counter-pdv-maximized .sidebar-toggle,
body.counter-pdv-maximized .topbar {
  display: none;
}

body.counter-pdv-maximized .app-main {
  margin-left: 0;
  min-height: 100vh;
  padding: 8px;
}

body.counter-pdv-maximized .counter-pdv-layout {
  min-height: calc(100vh - 16px);
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 10px;
}

body.counter-pdv-maximized .counter-pdv-layout .order-left {
  min-height: calc(100vh - 16px);
  display: flex;
  flex-direction: column;
}

body.counter-pdv-maximized .counter-pdv-layout .order-left .page-head.compact {
  padding: 10px 14px;
  margin-bottom: 8px;
}

body.counter-pdv-maximized .counter-pdv-layout .page-head h1 {
  font-size: 26px;
  margin-bottom: 2px;
}

body.counter-pdv-maximized .counter-open-badge {
  margin-top: 5px;
  padding: 3px 9px;
}

body.counter-pdv-maximized .counter-pdv-layout .search-add {
  padding: 8px;
  margin-bottom: 8px;
  grid-template-columns: minmax(0, 1fr) 96px 112px;
}

body.counter-pdv-maximized .counter-pdv-layout .search-add input,
body.counter-pdv-maximized .counter-pdv-layout .search-add .btn.primary {
  min-height: 40px;
}

body.counter-pdv-maximized .counter-pdv-layout .order-items {
  flex: 1;
  overflow: auto;
}

body.counter-pdv-maximized .counter-items-head {
  padding: 7px 10px;
  font-size: 11px;
}

body.counter-pdv-maximized .counter-pdv-layout .order-items article.counter-item-row {
  min-height: 42px;
  padding: 4px 10px;
}

body.counter-pdv-maximized .counter-item-row > strong,
body.counter-pdv-maximized .counter-item-number,
body.counter-pdv-maximized .counter-item-qty,
body.counter-pdv-maximized .counter-item-unit,
body.counter-pdv-maximized .counter-item-row > b {
  font-size: 12px;
}

body.counter-pdv-maximized .counter-item-qty {
  min-width: 48px;
  padding: 3px 8px;
}

body.counter-pdv-maximized .counter-item-icon {
  width: 34px;
  height: 34px;
}

body.counter-pdv-maximized .counter-summary-panel {
  top: 8px;
}

body.counter-pdv-maximized .counter-favorites-grid {
  max-height: calc(100vh - 430px);
}
.counter-favorites-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(24,39,75,.06);
}
.counter-favorites-card .product-panel-heading {
  margin: 0;
}
.counter-favorites-card .product-panel-heading h2 {
  font-size: 18px;
}
.counter-favorites-grid {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}
.counter-favorite-tile {
  margin: 0;
}
.counter-favorite-tile button {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.counter-favorite-tile button:hover {
  border-color: #fdba74;
  background: #fff7ed;
}
.counter-favorite-tile img,
.counter-favorite-tile .photo-fallback {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  object-fit: cover;
}
.counter-favorite-tile .photo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--group, #e2e8f0) 18%, #f8fafc);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.counter-favorite-tile strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.counter-favorite-tile small {
  color: #15803d;
  font-size: 12px;
  font-weight: 900;
}
.counter-pdv-layout.favorites-collapsed .counter-favorites-card {
  padding: 10px 12px;
}
.counter-pdv-layout.favorites-collapsed .counter-favorites-card .product-panel-heading h2,
.counter-pdv-layout.favorites-collapsed .counter-favorites-grid {
  display: none;
}
.counter-pdv-layout.favorites-collapsed .counter-favorites-card .product-panel-heading {
  justify-content: flex-end;
}
.counter-discount-modal label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 700;
}
.order-quantity-modal {
  width: min(420px, calc(100vw - 28px));
}
.order-quantity-modal input {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  font-size: 1.5rem;
  font-weight: 900;
  text-align: right;
}
.counter-discount-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-weight: 800;
}
.counter-discount-preview strong {
  color: #15803d;
  font-size: 24px;
}
.counter-shortcut-bar {
  position: sticky;
  bottom: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding: 10px 0;
  background: rgba(246, 247, 249, .94);
  backdrop-filter: blur(8px);
}
.counter-shortcut-bar form,
.counter-shortcut-bar button,
.counter-shortcut-bar label {
  min-width: 0;
}
.counter-shortcut-bar button,
.counter-shortcut-bar label {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}
.counter-shortcut-bar button strong,
.counter-shortcut-bar button span,
.counter-shortcut-bar label strong,
.counter-shortcut-bar label span {
  display: block;
}
.counter-shortcut-bar button.success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}
.counter-shortcut-bar button.danger,
.counter-shortcut-bar label.danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #dc2626;
}
@media (max-width: 1180px) {
  .counter-pdv-layout {
    grid-template-columns: 1fr;
  }
  .counter-summary-panel {
    position: static;
    grid-row: 2;
  }
}
@media (max-width: 760px) {
  .counter-pdv-layout .search-add,
  .counter-summary-stats,
  .counter-shortcut-bar {
    grid-template-columns: 1fr;
  }
  .counter-items-head {
    display: none;
  }
  .counter-pdv-layout .order-items article.counter-item-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }
  .counter-item-row > strong,
  .counter-item-row .item-additionals,
  .counter-item-row .item-note,
  .counter-item-row .item-note-editor,
  .counter-item-discount {
    grid-column: 2 / -1;
  }
  .counter-item-unit {
    grid-column: 2;
    text-align: left;
  }
  .counter-item-actions {
    grid-column: 3;
    grid-row: 1;
  }
  .counter-item-row > b,
  .counter-item-row form,
  .counter-item-actions {
    justify-self: end;
  }
}

/* Counter PDV operational mode */
body.counter-pdv-body {
  --pdv-bg: #eef2f6;
  --pdv-panel: #ffffff;
  --pdv-line: #d9e2ec;
  --pdv-ink: #07152a;
  --pdv-muted: #607086;
  --pdv-green: #16a34a;
  --pdv-blue: #075985;
  background: var(--pdv-bg);
}

body.counter-pdv-body .app-main {
  padding: 10px;
  background: var(--pdv-bg);
}

body.counter-pdv-body .topbar {
  height: 52px;
  background: #fff;
}

body.counter-pdv-body .topbar img,
body.counter-pdv-body .topbar .brand-logo {
  width: 42px;
  height: 42px;
}

body.counter-pdv-body .topbar strong {
  font-size: 16px;
}

body.counter-pdv-body .topbar span {
  font-size: 12px;
}

.counter-pdv-layout {
  height: calc(100vh - 20px);
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 10px;
  overflow: hidden;
}

.counter-pdv-layout .order-left {
  height: calc(100vh - 20px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--pdv-line);
  border-radius: 10px;
  background: var(--pdv-panel);
  box-shadow: none;
}

.counter-pdv-layout .order-left .page-head.compact {
  min-height: 54px;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--pdv-line);
  border-radius: 0;
  background: linear-gradient(90deg, #0f172a, #17345b);
  color: #fff;
}

.counter-pdv-layout .page-head h1 {
  margin: 0;
  color: #fff;
  font-size: 22px;
}

.counter-pdv-layout .page-head p {
  color: #cbd5e1;
  font-size: 12px;
}

.counter-open-badge {
  margin-top: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
}

.counter-pdv-layout .header-actions {
  gap: 8px;
}

.counter-pdv-layout .header-actions .btn {
  min-width: 0;
  min-height: 36px;
  padding: 0 12px;
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  color: #fff;
  font-size: 13px;
}

.counter-pdv-layout .header-actions .btn:hover {
  background: rgba(255,255,255,.18);
}

.counter-pdv-layout .header-actions .btn.danger {
  border-color: rgba(248,113,113,.35);
  background: rgba(127,29,29,.24);
  color: #fecaca;
}

.counter-maximize-btn {
  color: #bfdbfe !important;
}

.counter-pdv-layout .search-add {
  grid-template-columns: minmax(0, 1fr) 92px 132px;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 0;
  border-bottom: 1px solid var(--pdv-line);
  border-radius: 0;
  background: #f8fafc;
}

.counter-pdv-layout .search-add input {
  min-height: 50px;
  border: 2px solid #0f172a;
  border-radius: 7px;
  background: #fff;
  color: var(--pdv-ink);
  font-size: 18px;
  font-weight: 700;
}

.counter-pdv-layout .search-add input[name="quantity"] {
  text-align: center;
}

.counter-pdv-layout .search-add .btn.primary {
  min-height: 50px;
  border-radius: 7px;
  background: var(--pdv-green);
  border-color: var(--pdv-green);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.counter-pdv-layout .order-items {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.counter-pdv-layout .order-items:focus-within {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .14);
}

.counter-items-head,
.counter-item-row {
  grid-template-columns: 54px minmax(260px, 1fr) 74px 110px 118px 86px;
}

.counter-items-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 12px;
  border-bottom: 1px solid var(--pdv-line);
  background: #e8edf3;
  color: #334155;
}

.counter-pdv-layout .order-items article.counter-item-row {
  grid-template-columns: 54px minmax(260px, 1fr) 74px 110px 118px 86px;
  min-height: 50px;
  padding: 6px 12px;
  border-bottom: 1px solid #edf2f7;
  outline: none;
}

.counter-pdv-layout .order-items article.counter-item-row:nth-of-type(odd) {
  background: #fff;
}

.counter-pdv-layout .order-items article.counter-item-row:nth-of-type(even) {
  background: #f8fafc;
}

.counter-pdv-layout .order-items article.counter-item-row:focus,
.counter-pdv-layout .order-items article.counter-item-row.is-keyboard-selected {
  position: relative;
  z-index: 1;
  background: #dbeafe;
  box-shadow: inset 4px 0 0 #2563eb;
}

.counter-item-number {
  font-size: 14px;
  font-weight: 800;
}

.counter-item-row > strong {
  color: var(--pdv-ink);
  font-size: 14px;
  font-weight: 900;
}

.counter-item-qty {
  min-width: 50px;
  padding: 5px 8px;
  border-radius: 7px;
  background: #fff;
  font-size: 14px;
}

.counter-item-unit,
.counter-item-row > b {
  color: var(--pdv-ink);
  font-size: 14px;
}

.counter-item-row > b {
  font-size: 15px;
  font-weight: 900;
}

.counter-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.counter-pdv-layout .order-current-total {
  margin-top: auto;
  padding: 12px 16px;
  border-top: 1px solid var(--pdv-line);
  background: #f8fafc;
}

.counter-pdv-layout .order-current-total span {
  color: var(--pdv-muted);
  font-size: 14px;
}

.counter-pdv-layout .order-current-total strong {
  color: var(--pdv-green);
  font-size: 30px;
}

.counter-summary-panel {
  top: 62px;
  gap: 10px;
}

.counter-summary-card,
.counter-favorites-card {
  border: 1px solid var(--pdv-line);
  border-radius: 10px;
  box-shadow: none;
}

.counter-summary-card {
  padding: 0;
  overflow: hidden;
}

.counter-summary-card h2 {
  margin: 0;
  padding: 12px 14px;
  background: #0f172a;
  color: #fff;
  font-size: 18px;
}

.counter-summary-stats {
  gap: 0;
  border-bottom: 1px solid var(--pdv-line);
}

.counter-summary-stats > div {
  min-height: 76px;
  border-right: 1px solid var(--pdv-line);
}

.counter-summary-stats span,
.counter-summary-stats small {
  color: var(--pdv-muted);
  font-size: 12px;
}

.counter-summary-stats strong {
  color: var(--pdv-green);
  font-size: 28px;
}

.counter-summary-total {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 16px;
  border: 0;
  background: linear-gradient(135deg, #ecfdf5, #fff);
}

.counter-summary-total span {
  color: #14532d;
  font-size: 14px;
}

.counter-summary-total strong {
  color: #0f7a3b;
  font-size: 42px;
  line-height: 1;
  text-align: right;
}

.counter-finish-btn {
  min-height: 58px;
  border-radius: 8px;
  box-shadow: none;
  font-size: 18px;
  font-weight: 900;
}

.counter-favorites-card {
  padding: 10px;
}

.counter-favorites-card .product-panel-heading {
  padding-bottom: 2px;
}

.counter-favorites-card .product-panel-heading h2 {
  font-size: 17px;
}

.counter-favorites-grid {
  max-height: calc(100vh - 434px);
  gap: 7px;
}

.counter-favorite-tile button {
  min-height: 48px;
  border-radius: 7px;
  background: #fff;
}

.counter-favorite-tile strong {
  font-size: 12px;
}

.counter-shortcut-bar {
  flex-shrink: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 9px 10px;
  border-top: 1px solid var(--pdv-line);
  background: #e8edf3;
  backdrop-filter: none;
}

.counter-shortcut-bar form {
  margin: 0;
}

.counter-shortcut-bar label,
.counter-shortcut-bar button {
  min-height: 46px;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.counter-shortcut-bar label strong,
.counter-shortcut-bar button strong {
  font-size: 15px;
}

.counter-shortcut-bar label span,
.counter-shortcut-bar button span {
  color: var(--pdv-muted);
  font-size: 12px;
}

.counter-shortcut-bar button.success {
  background: #16a34a;
  color: #fff;
}

.counter-shortcut-bar button.success span {
  color: #dcfce7;
}

.counter-shortcut-bar label.danger,
.counter-shortcut-bar button.danger {
  background: #fff1f2;
}

body.counter-pdv-maximized .app-main {
  background: var(--pdv-bg);
}

body.counter-pdv-maximized .counter-pdv-layout {
  height: calc(100vh - 16px);
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 390px;
}

body.counter-pdv-maximized .counter-pdv-layout .order-left {
  height: calc(100vh - 16px);
  min-height: 0;
}

body.counter-pdv-maximized .counter-pdv-layout .order-left .page-head.compact,
body.counter-pdv-maximized .counter-pdv-layout .search-add {
  margin-bottom: 0;
}

body.counter-pdv-maximized .counter-summary-panel {
  top: 8px;
}

body.counter-pdv-maximized .counter-favorites-grid {
  max-height: calc(100vh - 402px);
}

@media (max-width: 1180px) {
  .counter-pdv-layout {
    grid-template-columns: 1fr;
  }

  .counter-pdv-layout .order-left {
    min-height: auto;
  }

  .counter-summary-panel {
    top: auto;
  }
}

@media (max-width: 760px) {
  body.counter-pdv-body .app-main {
    padding: 70px 8px 10px;
  }

  .counter-pdv-layout .order-left .page-head.compact {
    display: grid;
    grid-template-columns: 1fr;
  }

  .counter-pdv-layout .search-add {
    grid-template-columns: 1fr;
  }

  .counter-pdv-layout .order-items article.counter-item-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  .counter-item-row > b {
    grid-column: 2;
    text-align: left;
  }

  .counter-shortcut-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 18px;
}
.fiscal-products-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.fiscal-products-layout .panel {
  min-width: 0;
}
.fiscal-products-table-wrap {
  max-height: 520px;
  overflow: auto;
}
.fiscal-products-table {
  min-width: 1160px;
  font-size: 13px;
}
.fiscal-products-table th,
.fiscal-products-table td {
  padding: 9px 10px;
  vertical-align: middle;
}
.fiscal-products-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--paper);
}
.fiscal-products-table th:last-child,
.fiscal-products-table td:last-child {
  width: 104px;
  text-align: right;
  white-space: nowrap;
}
.fiscal-products-table .fiscal-product-name {
  min-width: 260px;
}
.fiscal-products-table .mono {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fiscal-products-table .selected-row {
  background: #fff7ed;
}
.fiscal-products-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}
.fiscal-products-list-meta strong {
  color: var(--ink);
}
.fiscal-product-filters {
  margin: 14px 0 16px;
  align-items: center;
}
.fiscal-product-filters input[name="q"] {
  min-width: 240px;
}
.fiscal-diagnostic-grid {
  align-items: start;
}
.fiscal-checklist {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.fiscal-check {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.fiscal-check > span {
  display: inline-flex;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.fiscal-check.ok > span {
  background: #dcfce7;
  color: #166534;
}
.fiscal-check.pending > span {
  background: #fff7ed;
  color: #c2410c;
}
.fiscal-check strong {
  display: block;
  color: var(--ink);
}
.fiscal-check p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.sefaz-status-result {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.sefaz-status-result.ok {
  border-color: #86efac;
  background: #f0fdf4;
}
.sefaz-status-result.pending {
  border-color: #fed7aa;
  background: #fff7ed;
}
.sefaz-status-result p {
  margin: 5px 0;
}
.sefaz-status-result small {
  color: var(--muted);
}
.btn.fiscal-action {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}
.btn.compact-action {
  min-height: 34px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1;
}
.btn.compact-action span:first-child {
  min-width: 24px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, .22);
  font-size: 11px;
  font-weight: 900;
}
.btn.compact-action:not(.fiscal-action) span:first-child {
  background: #eef2ff;
  color: #3730a3;
}
.fiscal-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
  text-decoration: none;
}
.fiscal-status-legacy {
  display: none;
}
.fiscal-status-main {
  min-height: 34px;
  padding: 6px 9px;
}
.fiscal-status-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
}
.fiscal-status-pill.authorized {
  background: #dcfce7;
  color: #166534;
}
.fiscal-status-pill.cancelled {
  background: #fee2e2;
  color: #991b1b;
}
.fiscal-status-pill.voided {
  background: #eef2ff;
  color: #3730a3;
}
.fiscal-status-pill.signed {
  background: #e0f2fe;
  color: #075985;
}
.fiscal-status-pill.rejected,
.fiscal-status-pill.denied {
  background: #fee2e2;
  color: #991b1b;
}
.modern-table tbody tr.fiscal-row-cancelled {
  background: #fff1f2;
}
.modern-table tbody tr.fiscal-row-cancelled td {
  border-bottom-color: #fecaca;
}
.modern-table tbody tr.fiscal-row-cancelled:hover {
  background: #ffe4e6;
}
.fiscal-rejection-modal {
  max-width: 620px;
}
.fiscal-rejection-box {
  padding: 14px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #7f1d1d;
  line-height: 1.45;
  white-space: normal;
}
.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.purchases-layout {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  align-items: start;
}
.purchases-layout-clean {
  display: grid;
  gap: 18px;
}
.purchases-hero {
  align-items: center;
}
.purchases-detail.full {
  width: 100%;
}
.nfe55-index-layout {
  grid-template-columns: minmax(540px, 660px) minmax(520px, 1fr);
  align-items: start;
}
.nfe55-list-layout {
  display: grid;
  gap: 18px;
}
.nfse-page {
  display: grid;
  gap: 12px;
}
.nfse-page .panel {
  padding: 16px 18px;
  border-radius: 8px;
}
.nfse-hero {
  position: relative;
  overflow: hidden;
  min-height: 0;
  align-items: center;
  padding: 18px 22px;
  border-color: #bfdbfe;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}
.nfse-new-hero {
  padding: 24px 34px;
  background:
    radial-gradient(circle at 66% 38%, rgba(79, 70, 229, .12), transparent 16%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}
.nfse-new-hero::after {
  content: "";
  position: absolute;
  right: 34%;
  top: 26px;
  width: 96px;
  height: 112px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(99, 102, 241, .12), rgba(99, 102, 241, .04)),
    #eef2ff;
  transform: rotate(17deg);
  opacity: .65;
}
.nfse-new-hero::before {
  content: "";
  position: absolute;
  right: calc(34% + 72px);
  bottom: 22px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(79, 70, 229, .14);
  box-shadow: inset 14px -13px 0 -9px rgba(79, 70, 229, .75);
  z-index: 0;
}
.nfse-new-hero > * {
  position: relative;
  z-index: 1;
}
.nfse-hero span {
  font-size: 11px;
  letter-spacing: .03em;
}
.nfse-new-hero > div:first-child > span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 7px;
  background: #eef2ff;
  color: #1d4ed8;
}
.nfse-hero h1 {
  margin: 3px 0 2px;
  font-size: 28px;
  line-height: 1.05;
}
.nfse-new-hero h1 {
  margin-top: 10px;
  font-size: 36px;
}
.nfse-hero p {
  font-size: 16px;
}
.nfse-hero .products-hero-actions {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nfse-hero .btn {
  min-height: 38px;
  padding: 9px 14px;
}
.nfse-new-hero .btn {
  min-width: 136px;
  min-height: 46px;
  border-radius: 8px;
}
.nfse-new-hero .products-hero-actions .btn:last-child {
  border-color: #4338ca;
  background: #4338ca;
  color: #fff;
  box-shadow: 0 16px 28px rgba(67, 56, 202, .2);
}
.nfse-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.nfse-alert {
  border-color: #fed7aa;
  background: #fff7ed;
}
.nfse-alert strong,
.nfse-alert p {
  margin: 0;
}
.nfse-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.nfse-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}
.nfse-filter-form label {
  display: grid;
  gap: 6px;
  color: #5c6a7c;
  font-weight: 700;
}
.nfse-filter-form input,
.nfse-filter-form select {
  min-height: 42px;
  min-width: 160px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  color: #0f172a;
}
.nfse-total-card {
  display: grid;
  gap: 2px;
  min-width: 210px;
  padding: 14px 18px;
  border: 1px solid #fdba74;
  border-radius: 8px;
  background: #fff7ed;
}
.nfse-total-card span,
.nfse-total-card small {
  color: #5c6a7c;
  font-weight: 800;
}
.nfse-total-card strong {
  color: #047857;
  font-size: 1.6rem;
  line-height: 1;
}
.nfse-documents-panel {
  display: grid;
  gap: 14px;
}
.nfse-documents-table td {
  vertical-align: middle;
}
.nfse-documents-table td strong,
.nfse-documents-table td small {
  display: block;
}
.nfse-documents-table td small {
  margin-top: 3px;
  color: #64748b;
  font-weight: 700;
}
.nfse-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  font-weight: 900;
}
.nfse-status.pending {
  background: #eef2ff;
  color: #3730a3;
}
.nfse-status.processing {
  background: #e0f2fe;
  color: #0369a1;
}
.nfse-status.authorized {
  background: #dcfce7;
  color: #047857;
}
.nfse-status.cancelled,
.nfse-status.rejected {
  background: #fee2e2;
  color: #b91c1c;
}
.nfse-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 220px;
}
.nfse-card h2,
.nfse-card p {
  margin: 0;
}
.nfse-card-kicker {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
}
.nfse-checklist {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.nfse-checklist li {
  padding: 9px 10px;
  border: 1px solid #dbe7f5;
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}
.nfse-settings-form {
  display: grid;
  gap: 16px;
}
.nfse-draft-form {
  display: grid;
  gap: 12px;
}
.nfse-page .nfse-draft-form {
  padding: 20px 22px;
  border-color: #dbe7f5;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .06);
}
.nfse-form-section {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  gap: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.nfse-form-section > div:first-child {
  padding: 12px 22px 12px 6px;
  border-right: 1px solid #e5ecf6;
}
.nfse-form-aside {
  align-content: start;
}
.nfse-aside-icon {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 10px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(67, 56, 202, .08);
}
.nfse-aside-icon.service {
  background: #ecfeff;
  color: #0e7490;
}
.nfse-form-section h2,
.nfse-form-section p {
  margin: 0;
}
.nfse-form-section h2 {
  position: relative;
  padding-bottom: 18px;
  color: #0f172a;
  font-size: 23px;
  line-height: 1.1;
}
.nfse-form-section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 7px;
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: #4338ca;
}
.nfse-form-section p {
  font-size: 15px;
  line-height: 1.45;
}
.nfse-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
}
.nfse-form-grid .settings-wide {
  grid-column: 1 / -1;
}
.nfse-form-grid .nfse-two-cols {
  grid-column: span 2;
}
.nfse-form-grid label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-size: 14px;
  font-weight: 800;
}
.nfse-form-grid input,
.nfse-form-grid select,
.nfse-form-grid textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #fff;
  padding: 9px 12px;
  color: #0f172a;
  font: inherit;
}
.nfse-input-icon {
  position: relative;
  display: block;
}
.nfse-input-icon input {
  padding-left: 42px;
}
.nfse-input-icon::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  opacity: .62;
  pointer-events: none;
}
.nfse-input-icon.search::before {
  border: 2px solid #64748b;
  border-radius: 999px;
  box-shadow: 8px 8px 0 -6px #64748b;
}
.nfse-input-icon.person::before {
  border: 2px solid #64748b;
  border-radius: 999px 999px 8px 8px;
}
.nfse-input-icon.document::before,
.nfse-input-icon.email::before,
.nfse-input-icon.home::before,
.nfse-input-icon.building::before,
.nfse-input-icon.city::before,
.nfse-input-icon.globe::before,
.nfse-input-icon.map::before {
  border: 2px solid #64748b;
  border-radius: 4px;
}
.nfse-input-icon.phone::before {
  border-left: 3px solid #64748b;
  border-bottom: 3px solid #64748b;
  border-radius: 0 0 0 9px;
  transform: translateY(-50%) rotate(-35deg);
}
.nfse-input-icon.pin::before {
  border: 2px solid #64748b;
  border-radius: 999px 999px 999px 2px;
  transform: translateY(-60%) rotate(-45deg);
}
.nfse-form-grid input,
.nfse-form-grid select {
  font-size: 15px;
}
.nfse-form-grid textarea {
  min-height: 76px;
  resize: vertical;
}
.nfse-customer-search-wrap {
  position: relative;
}
.nfse-customer-results {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
  border-radius: 8px;
}
.nfse-document-field span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.nfse-document-field > span > .nfse-input-icon {
  min-width: 0;
}
.nfse-document-field .btn {
  min-height: 42px;
  border-color: #c7d2fe;
  color: #3730a3;
  white-space: nowrap;
}
.nfse-lookup-status {
  min-height: 20px;
  margin: 0;
}
.nfse-form-tip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid #e0e7ff;
  border-radius: 8px;
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
  color: #1e1b4b;
}
.nfse-form-tip > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #4338ca;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(67, 56, 202, .24);
}
.nfse-form-tip strong,
.nfse-form-tip small {
  display: block;
}
.nfse-form-tip strong {
  color: #3730a3;
}
.nfse-form-tip small {
  margin-top: 2px;
  color: #334155;
  font-weight: 700;
}
.nfse-draft-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #fdba74;
  border-radius: 8px;
  background: #fff7ed;
}
.nfse-draft-summary div {
  display: grid;
  gap: 3px;
}
.nfse-draft-summary span {
  color: #5c6a7c;
  font-weight: 800;
}
.nfse-draft-summary strong {
  color: #047857;
  font-size: 1.45rem;
  line-height: 1;
}
.nfse-draft-summary .form-actions-inline,
.form-actions-inline {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.nfse-view-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.nfse-view-total {
  display: grid;
  gap: 3px;
  align-content: start;
  min-width: 0;
  border-color: #dbe7f5;
}
.nfse-view-total span,
.nfse-view-total small {
  color: #5c6a7c;
  font-size: 13px;
  font-weight: 800;
}
.nfse-view-total strong {
  color: #0f172a;
  min-width: 0;
  max-width: 100%;
  font-size: 1.18rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.nfse-view-total .nfse-status {
  justify-self: start;
  min-height: 26px;
  padding: 4px 10px;
  font-size: .88rem;
}
.nfse-view-total-wide {
  grid-column: span 2;
}
.nfse-view-total-wide strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .98rem;
  line-height: 1.28;
}
.nfse-view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.nfse-view-card,
.nfse-description-card {
  display: grid;
  gap: 10px;
}
.nfse-view-card h2,
.nfse-description-card h2,
.nfse-description-card h3,
.nfse-description-card p {
  margin: 0;
}
.nfse-view-card h2,
.nfse-description-card h2 {
  font-size: 22px;
  line-height: 1.1;
}
.nfse-data-list {
  display: grid;
  gap: 0;
  margin: 0;
}
.nfse-data-list div {
  display: grid;
  grid-template-columns: minmax(118px, 170px) minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #edf2f7;
}
.nfse-data-list dt {
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}
.nfse-data-list dd {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.nfse-documents-panel {
  gap: 10px;
}
.nfse-documents-panel .section-heading h2,
.nfse-description-card h3 {
  font-size: 20px;
}
.nfse-documents-table th,
.nfse-documents-table td {
  padding-top: 9px;
  padding-bottom: 9px;
}
.nfse-settings-section {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #fff;
}
.nfse-settings-section h2,
.nfse-settings-section p {
  margin: 0;
}
.nfse-settings-section .settings-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1100px) {
  .nfse-grid {
    grid-template-columns: 1fr;
  }
  .nfse-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .nfse-filter-form,
  .nfse-filter-form label,
  .nfse-total-card {
    width: 100%;
  }
  .nfse-filter-form input,
  .nfse-filter-form select,
  .nfse-filter-form .btn {
    width: 100%;
  }
  .nfse-settings-section,
  .nfse-form-section,
  .nfse-form-grid,
  .nfse-view-summary,
  .nfse-view-grid,
  .nfse-settings-section .settings-card-grid {
    grid-template-columns: 1fr;
  }
  .nfse-data-list div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .nfse-new-hero {
    padding: 22px;
  }
  .nfse-new-hero::before,
  .nfse-new-hero::after {
    display: none;
  }
  .nfse-form-section > div:first-child {
    padding: 0 0 14px;
    border-right: 0;
    border-bottom: 1px solid #e5ecf6;
  }
  .nfse-form-grid .nfse-two-cols {
    grid-column: 1 / -1;
  }
  .nfse-document-field span {
    grid-template-columns: 1fr;
  }
  .nfse-draft-summary {
    align-items: stretch;
    flex-direction: column;
  }
  .nfse-draft-summary .btn {
    width: 100%;
  }
  .form-actions-inline {
    width: 100%;
  }
}
.nfse-print-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 auto 16px;
  max-width: 980px;
}
.nfse-print-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px;
  background: #fff;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  color: #0f172a;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}
.nfse-print-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 2px solid #0f172a;
}
.nfse-print-header span,
.nfse-print-info span {
  color: #5c6a7c;
  font-weight: 800;
  text-transform: uppercase;
  font-size: .78rem;
}
.nfse-print-header h1 {
  margin: 6px 0;
  font-size: 2rem;
  line-height: 1.05;
}
.nfse-print-header p,
.nfse-print-grid p,
.nfse-print-footer p {
  margin: 0;
}
.nfse-print-number {
  min-width: 160px;
  padding: 14px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  text-align: right;
}
.nfse-print-number small,
.nfse-print-table small {
  display: block;
  color: #64748b;
  font-weight: 700;
}
.nfse-print-number strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
}
.nfse-print-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.nfse-print-grid article,
.nfse-print-section,
.nfse-print-info {
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  padding: 16px;
}
.nfse-print-grid h2,
.nfse-print-section h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}
.nfse-print-grid strong {
  display: block;
  margin-bottom: 8px;
}
.nfse-print-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.nfse-print-info div {
  display: grid;
  gap: 4px;
}
.nfse-print-info strong,
.nfse-print-values dd {
  overflow-wrap: anywhere;
}
.nfse-print-section {
  margin-top: 18px;
}
.nfse-print-table {
  width: 100%;
  border-collapse: collapse;
}
.nfse-print-table th,
.nfse-print-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e5edf7;
  text-align: left;
  vertical-align: top;
}
.nfse-print-table th {
  color: #5c6a7c;
  font-size: .78rem;
  text-transform: uppercase;
}
.nfse-print-values dl {
  display: grid;
  gap: 8px;
  margin: 0;
}
.nfse-print-values dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf2f7;
}
.nfse-print-values dt {
  color: #64748b;
  font-weight: 800;
}
.nfse-print-values dd {
  margin: 0;
  font-weight: 900;
}
.nfse-print-footer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #dbe7f5;
  color: #64748b;
  font-size: .85rem;
}
@media (max-width: 760px) {
  .nfse-print-page {
    padding: 18px;
  }
  .nfse-print-header,
  .nfse-print-grid,
  .nfse-print-info {
    grid-template-columns: 1fr;
  }
  .nfse-print-number {
    text-align: left;
  }
}
@media print {
  @page {
    size: A4 portrait;
    margin: 7mm;
  }
  html,
  body {
    width: auto;
    min-height: 0;
    overflow: visible;
  }
  .nfse-print-page {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    font-size: 9.5pt;
  }
  .nfse-print-header {
    gap: 8px;
    padding-bottom: 7px;
  }
  .nfse-print-header span,
  .nfse-print-info span,
  .nfse-print-table th {
    font-size: 7pt;
  }
  .nfse-print-header h1 {
    margin: 2px 0;
    font-size: 20pt;
  }
  .nfse-print-header p,
  .nfse-print-grid p,
  .nfse-print-footer p {
    line-height: 1.22;
  }
  .nfse-print-number,
  .nfse-print-grid article,
  .nfse-print-section,
  .nfse-print-info {
    padding: 8px 10px;
    border-radius: 5px;
  }
  .nfse-print-number {
    min-width: 120px;
  }
  .nfse-print-number strong {
    font-size: 11pt;
  }
  .nfse-print-grid,
  .nfse-print-info,
  .nfse-print-section,
  .nfse-print-footer {
    gap: 8px;
    margin-top: 8px;
  }
  .nfse-print-grid h2,
  .nfse-print-section h2 {
    margin-bottom: 5px;
    font-size: 10pt;
  }
  .nfse-print-grid strong {
    margin-bottom: 4px;
  }
  .nfse-print-info {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .nfse-print-table th,
  .nfse-print-table td {
    padding: 5px 6px;
  }
  .nfse-print-table small {
    line-height: 1.18;
  }
  .nfse-print-values dl {
    gap: 4px;
  }
  .nfse-print-values dl div {
    padding-bottom: 4px;
  }
  .nfse-print-footer {
    padding-top: 7px;
    font-size: 7.5pt;
  }
  .nfse-print-grid,
  .nfse-print-info,
  .nfse-print-section,
  .nfse-print-values {
    break-inside: avoid;
  }
}
.nfe55-list-layout .actions-cell {
  flex-wrap: nowrap;
  gap: 5px;
  white-space: nowrap;
}
.nfe55-list-panel .modern-table {
  font-size: 12px;
}
.nfe55-list-table {
  min-width: 1120px;
  table-layout: fixed;
}
.nfe55-list-table th,
.nfe55-list-table td {
  padding: 8px 9px;
  line-height: 1.2;
}
.nfe55-list-table th:nth-child(1) {
  width: 70px;
}
.nfe55-list-table th:nth-child(2) {
  width: 92px;
}
.nfe55-list-table th:nth-child(3) {
  width: 96px;
}
.nfe55-list-table th:nth-child(4) {
  width: 92px;
}
.nfe55-list-table th:nth-child(5) {
  width: 260px;
}
.nfe55-list-table th:nth-child(6) {
  width: 98px;
}
.nfe55-list-table th:nth-child(7) {
  width: 150px;
}
.nfe55-list-table th:nth-child(8) {
  width: 255px;
}
.nfe55-list-table tbody tr[data-nfe-row] {
  cursor: pointer;
}
.nfe55-list-table tbody tr[data-nfe-row]:focus {
  outline: 2px solid #93c5fd;
  outline-offset: -2px;
}
.nfe55-list-table tbody tr[data-nfe-row].is-selected {
  background: #eff6ff;
  box-shadow: inset 3px 0 0 #2563eb;
}
.nfe-destination-cell {
  overflow: hidden;
  text-overflow: ellipsis;
}
.nfe-destination-cell small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}
.nfe-cfop-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
}
.nfe-actions-cell {
  gap: 4px;
}
.nfe-actions-cell .counter-icon-action {
  width: 40px;
  min-height: 34px;
  border-radius: 7px;
}
.nfe-actions-cell .counter-icon-action svg {
  width: 15px;
  height: 15px;
}
.nfe-actions-cell .compact-action {
  min-height: 34px;
  padding: 4px 9px;
  font-size: 11px;
}
.nfe-actions-cell .nfe-cancel-action {
  min-height: 34px;
  padding: 0 9px 0 5px;
  font-size: 11px;
}
.nfe-items-detail {
  border: 1px solid #dbeafe;
  background: #fff;
}
.nfe-items-grid-head,
.nfe-items-grid-row {
  grid-template-columns: minmax(0, 1fr) 74px 110px 105px 95px 110px;
}
.nfe-items-grid-row strong small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.nfe-list-filters input {
  width: 100%;
}
.nfe-list-filters select {
  min-height: 42px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  color: #0f172a;
  font-weight: 700;
}
.nfe-filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px 14px;
  margin: 0 0 14px;
}
.nfe-filter-toolbar .nfe-list-filters {
  flex: 1 1 720px;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}
.nfe-filter-toolbar .nfe-list-filters label {
  min-width: 138px;
}
.nfe-filter-toolbar .nfe-list-filters .nfe-filter-search {
  flex: 1 1 230px;
}
.nfe-filter-toolbar .nfe-list-filters select,
.nfe-filter-toolbar .nfe-list-filters input {
  min-height: 42px;
}
@media (max-width: 760px) {
  .nfe-filter-toolbar,
  .nfe-filter-toolbar .nfe-list-filters {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .nfe-filter-toolbar .counter-filter-total {
    width: 100%;
  }
}
.nfe-cancel-action {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px 0 6px;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  background: #fff1f2;
  color: #dc2626;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.nfe-cancel-icon {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  font-weight: 900;
}
.nfe-cancel-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(220, 38, 38, .14);
}
.nfe55-index-layout > .panel,
.nfe55-form,
.nfe-form-tabs,
.nfe-tab-panel {
  min-width: 0;
}
.nfe55-index-layout .nfe-form-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.nfe55-index-layout .nfe-tab-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px;
}
.nfe55-index-layout .nfe-form-tabs button {
  min-width: 0;
  white-space: normal;
}
.nfe55-issue-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}
.nfe55-issue-actions form {
  margin: 0;
}
.nfe55-issue-actions .btn {
  min-width: 170px;
}
.nfe55-email-form {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(420px, 100%);
}
.nfe55-email-form input[type="email"] {
  min-width: 220px;
}
.nfe-detail-page {
  padding: 0;
  overflow: hidden;
  border: 1px solid #dbe4ef;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .08);
}
.nfe-detail-page .nfe-detail-hero {
  margin: 0;
  padding: 16px 22px;
  border-bottom: 1px solid #e2e8f0;
  background:
    linear-gradient(135deg, rgba(255, 247, 237, .98), rgba(239, 246, 255, .86)),
    #fff;
}
.nfe-detail-page .nfe-detail-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 6px;
  padding: 4px 9px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.nfe-detail-page .nfe-detail-hero h2 {
  margin: 0;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.1;
}
.nfe-detail-page .nfe-detail-hero p {
  margin: 5px 0 0;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}
.nfe-detail-page .purchase-head-actions {
  align-items: flex-end;
}
.nfe-detail-page .purchase-head-actions .fiscal-status-pill {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.nfe-detail-page .nfe-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin: 12px 22px 12px;
  padding: 0;
  background: transparent;
}
.nfe-detail-page .nfe-summary-grid span {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
  align-content: center;
}
.nfe-detail-page .nfe-summary-grid span:last-child {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #047857;
}
.nfe-detail-page .nfe-summary-grid strong {
  display: block;
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
}
.nfe-detail-page > .alert {
  margin: 0 22px 12px;
}
.nfe-detail-page .nfe55-form,
.nfe-detail-page .nfe-item-picker {
  margin: 0 22px 12px;
  border-color: #dbe4ef;
  border-radius: 12px;
  background: #fbfdff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.nfe-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 22px 8px;
}
.nfe-section-title h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
}
.nfe-section-title p {
  margin: 2px 0 0;
  color: #64748b;
  font-weight: 700;
}
.nfe-items-table {
  margin: 0 22px 14px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}
.nfe-items-table .modern-table thead th {
  background: #f8fafc;
  color: #475569;
}
.nfe-items-table .modern-table tbody tr:hover {
  background: #fff7ed;
}
.nfe-items-table .modern-table td:first-child strong {
  color: #0f172a;
}
.nfe-items-table .modern-table td:first-child small {
  color: #64748b;
}
.nfe-item-number {
  width: 54px;
  text-align: center;
  color: #f97316;
}
.nfe-item-number strong {
  display: inline-flex;
  min-width: 32px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
}
.nfe-detail-actions {
  margin: 0 22px 20px;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #f8fafc;
}
.nfe-detail-actions .nfe55-issue-actions,
.nfe-detail-actions .nfe55-post-actions {
  gap: 10px;
}
.nfe-detail-actions .nfe55-issue-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(640px, 100%);
  margin: 0 auto;
  justify-content: center;
}
.nfe-detail-actions .nfe55-issue-actions > .btn,
.nfe-detail-actions .nfe55-issue-actions > form:not(.nfe55-email-form),
.nfe-detail-actions .nfe55-issue-actions > form:not(.nfe55-email-form) .btn,
.nfe-detail-actions .nfe55-issue-actions > .nfe55-email-form {
  grid-column: 1 / -1;
  width: 100%;
}
.nfe-detail-actions .nfe55-issue-actions > form:not(.nfe55-email-form):nth-last-child(-n+2) {
  grid-column: auto;
}
.nfe-detail-actions .nfe55-issue-actions .nfe55-email-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .95fr);
}
.nfe-detail-actions .nfe55-issue-actions .nfe55-email-form input[type="email"],
.nfe-detail-actions .nfe55-issue-actions .nfe55-email-form .btn {
  width: 100%;
}
.nfe-detail-actions .btn {
  min-height: 44px;
  border-radius: 8px;
  font-weight: 800;
}
.nfe-detail-actions .nfe55-email-form {
  min-width: min(520px, 100%);
}
.nfe-detail-actions .nfe55-email-form input[type="email"] {
  min-height: 44px;
  border-radius: 8px;
}
.nfe-new-page .nfe55-form {
  margin: 22px 28px 28px;
}
.nfe-new-page .nfe-tab-panel,
.nfe-detail-page .nfe-tab-panel {
  border-color: #dbe4ef;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.nfe-new-page .nfe-tab-panel h3,
.nfe-detail-page .nfe-tab-panel h3 {
  padding: 0 0 4px;
  color: #0f172a;
  font-size: 18px;
}
.nfe-new-page .nfe-tab-panel label,
.nfe-detail-page .nfe-tab-panel label {
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}
.nfe-new-page .nfe-tab-panel input,
.nfe-new-page .nfe-tab-panel select,
.nfe-new-page .nfe-tab-panel textarea,
.nfe-detail-page .nfe-tab-panel input,
.nfe-detail-page .nfe-tab-panel select,
.nfe-detail-page .nfe-tab-panel textarea {
  border-color: #cbd5e1;
  border-radius: 8px;
  background: #fff;
  min-height: 36px;
  font-size: 14px;
  padding: 6px 10px;
}
.nfe-detail-page .nfe55-form > h3 {
  font-size: 18px;
}
.shortcut-key {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 30px;
  margin-right: 6px;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .92);
  color: #0f172a;
  font-weight: 900;
}
.nfe-item-picker-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.nfe-item-picker-head h3 {
  margin: 0;
}
.nfe-item-picker-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-weight: 700;
}
.nfe-item-picker > label {
  min-width: min(100%, 620px);
}
.nfe-item-picker [data-nfe-item-feedback] {
  align-self: center;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}
.nfe-item-picker [data-nfe-item-feedback].error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc2626;
}
.nfe-detail-page .nfe-item-picker {
  grid-template-columns: minmax(360px, 1fr) minmax(280px, .9fr);
  gap: 10px 14px;
  padding: 14px 16px;
  background: #fff;
}
.nfe-detail-page .nfe-item-picker-head {
  align-items: center;
  padding-bottom: 2px;
  border-bottom: 1px solid #eef2f7;
}
.nfe-detail-page .nfe-item-picker-head h3 {
  font-size: 18px;
  line-height: 1.15;
}
.nfe-detail-page .nfe-item-picker-head p {
  margin-top: 2px;
  font-size: 13px;
}
.nfe-detail-page .nfe-item-picker > label {
  min-width: 0;
}
.nfe-detail-page .nfe-item-picker > label input[data-nfe-product-search] {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 700;
}
.nfe-detail-page .nfe-item-picker [data-nfe-item-feedback] {
  grid-column: auto;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.25;
}
.nfe-detail-page .nfe-section-title {
  align-items: center;
  margin-top: 10px;
  margin-bottom: 6px;
}
.nfe-detail-page .nfe-section-title h3 {
  font-size: 18px;
  line-height: 1.15;
}
.nfe-detail-page .nfe-section-title p {
  margin-top: 1px;
  font-size: 13px;
}
.nfe-detail-page .nfe-items-table {
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .045);
}
.nfe-detail-page .nfe-items-table .modern-table th {
  padding: 10px 14px;
  font-size: 11px;
  letter-spacing: 0;
}
.nfe-detail-page .nfe-items-table .modern-table td {
  padding: 10px 14px;
  vertical-align: middle;
}
.nfe-detail-page .nfe-items-table .modern-table td:first-child strong {
  font-size: 14px;
  line-height: 1.2;
}
.nfe-detail-page .nfe-items-table .modern-table td:first-child small {
  font-size: 12px;
}
.nfe-detail-page .nfe-items-table .modern-table td:nth-child(4),
.nfe-detail-page .nfe-items-table .modern-table td:nth-child(5),
.nfe-detail-page .nfe-items-table .modern-table td:nth-child(6) {
  white-space: nowrap;
}
.nfe-detail-page .nfe-items-table .actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}
.nfe-detail-page .nfe-items-table .actions .btn.small {
  min-height: 34px;
  padding: 0 12px;
}
.nfe-detail-page .nfe-detail-actions {
  padding: 10px 14px;
  background: #fff;
}
.nfe-detail-page .nfe-detail-actions .nfe55-issue-actions {
  width: 100%;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.nfe-detail-page .nfe-detail-actions .nfe55-issue-actions > form {
  margin: 0;
}
.nfe-detail-page .nfe-detail-actions .nfe55-issue-actions > form:not(.nfe55-email-form),
.nfe-detail-page .nfe-detail-actions .nfe55-issue-actions > form:not(.nfe55-email-form) .btn {
  width: auto;
}
.nfe-detail-page .nfe-detail-actions .btn {
  min-height: 42px;
  padding-inline: 18px;
  font-size: 15px;
}
.nfe-detail-page .nfe-detail-actions .shortcut-key {
  min-width: 38px;
  min-height: 28px;
}
.dfe-toolbar {
  display: grid;
  gap: 14px;
}
.dfe-nsu-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.dfe-nsu-box span {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
.dfe-nsu-box strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.dfe-search {
  justify-content: flex-start;
}
.dfe-search select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  font: inherit;
}
.dfe-table {
  font-size: 13px;
}
.dfe-table th,
.dfe-table td {
  padding: 8px 10px;
  vertical-align: middle;
}
.dfe-table small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.15;
  margin-top: 2px;
}
.dfe-invoice-cell {
  width: 120px;
  white-space: nowrap;
}
.dfe-invoice-cell strong {
  font-size: 13px;
}
.dfe-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}
.dfe-row-actions form {
  margin: 0;
}
.dfe-row-actions details {
  position: relative;
}
.dfe-row-actions summary {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
  white-space: nowrap;
}
.dfe-row-actions summary::-webkit-details-marker {
  display: none;
}
.dfe-row-actions .btn.small {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 13px;
  white-space: nowrap;
}
.dfe-row-actions .dfe-import-purchase {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.dfe-row-actions .dfe-imported-purchase {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #075985;
}
.dfe-row-actions details[open] .stack-form {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 15;
  width: min(300px, 78vw);
  padding: 10px;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
}
.dfe-row-actions details[open] .stack-form label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  font-size: 13px;
  font-weight: 700;
}
.dfe-row-actions details[open] .stack-form input[type="radio"] {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.dfe-row-actions textarea {
  min-height: 58px;
  padding: 8px;
  font-size: 13px;
}
.fiscal-export-panel {
  display: grid;
  gap: 12px;
}
.fiscal-export-filter {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(220px, 300px) auto;
  gap: 12px;
  align-items: end;
}
.fiscal-export-filter label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}
.fiscal-export-filter input,
.fiscal-export-filter select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  font: inherit;
  color: var(--text);
}
.fiscal-export-dashboard {
  margin-bottom: 18px;
}
.fiscal-export-actions {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  align-items: stretch;
}
.fiscal-export-actions .panel {
  align-content: start;
}
.fiscal-export-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}
.fiscal-export-buttons form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(190px, 1fr);
  gap: 10px;
  align-items: end;
  margin: 0;
}
.fiscal-export-buttons label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}
.fiscal-export-buttons input,
.fiscal-export-buttons select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  font: inherit;
  color: var(--text);
}
.fiscal-export-buttons button {
  min-height: 42px;
  min-width: 170px;
  white-space: nowrap;
}
.purchases-side,
.purchases-detail {
  display: grid;
  gap: 16px;
}
.purchase-side-head {
  display: grid;
  gap: 6px;
}
.purchase-side-head h2 {
  margin: 0;
}
.purchase-side-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.purchase-upload {
  display: grid;
  gap: 12px;
}
.purchase-file-field {
  display: grid;
  gap: 8px;
  color: #475569;
  font-weight: 700;
}
.purchase-file-field input {
  width: 100%;
}
.purchase-side-actions {
  display: grid;
  gap: 10px;
}
.purchase-dfe-box {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.purchase-dfe-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 3px;
}
.purchase-dfe-item {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}
.purchase-dfe-item strong,
.purchase-dfe-item small {
  overflow-wrap: anywhere;
}
.purchase-dfe-item span,
.purchase-dfe-item small,
.purchase-dfe-empty {
  color: var(--muted);
  line-height: 1.35;
}
.purchase-dfe-item div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}
.purchase-dfe-item b {
  color: var(--text);
}
.purchase-folder-modal-card {
  width: min(760px, 100%);
}
.purchase-folder-settings {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}
.purchase-folder-settings label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}
.purchase-folder-settings input {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #f8fafc;
  color: var(--text);
  font: inherit;
}
.purchase-folder-list {
  min-height: 90px;
  max-height: min(440px, 52vh);
}
.purchase-folder-status {
  margin: 14px 0 10px;
}
@media (max-width: 700px) {
  .purchase-folder-settings {
    grid-template-columns: 1fr;
  }
}
.purchase-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
}
.purchase-dashboard span {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  align-content: center;
}
.purchase-dashboard strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}
.purchase-list-table th:last-child,
.purchase-list-table td:last-child {
  width: 170px;
  white-space: nowrap;
}
.purchase-invoice-cell {
  width: 150px;
  max-width: 160px;
}
.purchase-invoice-cell,
.purchase-supplier-cell {
  overflow-wrap: anywhere;
}
.purchase-invoice-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.purchase-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: nowrap;
}
.purchase-row-actions form {
  margin: 0;
}
.purchase-row-actions .icon-action {
  width: 54px;
  min-height: 44px;
}
.icon-action.success {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #15803d;
}
.purchase-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;
}
.purchase-list-item {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
}
.purchase-list-item.active,
.purchase-list-item:hover {
  border-color: var(--primary);
  background: #fff7ed;
}
.purchase-list-item span,
.purchase-list-item small {
  color: var(--muted);
}
.nfe-return-modal {
  width: min(720px, 100%);
}
.nfe-return-modal label {
  display: grid;
  gap: 7px;
  color: #64748b;
  font-weight: 700;
}
.nfe-return-modal input[type="search"] {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  font: inherit;
}
.nfe-return-list {
  margin-top: 14px;
  max-height: min(52vh, 480px);
}
.purchase-detail-head,
.purchase-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.purchase-detail-head h2 {
  margin: 0 0 4px;
}
.purchase-detail-head p {
  margin: 0;
  color: var(--muted);
}
.purchase-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.purchase-head-actions form {
  margin: 0;
}
.purchase-summary {
  justify-content: flex-start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}
.purchase-summary span {
  display: grid;
  gap: 2px;
  min-width: 120px;
}
.purchase-summary strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.purchase-default-group {
  max-width: 360px;
  margin-bottom: 12px;
}
.purchase-payment-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}
.purchase-payment-box h3,
.purchase-payment-box p {
  grid-column: 1 / -1;
  margin: 0;
}
.purchase-payment-box p {
  color: var(--muted);
}

.pix-payment-modal {
  max-width: 460px;
}

.pix-qr-wrap {
  display: grid;
  place-items: center;
  margin: 14px 0;
}

.pix-qr-wrap img {
  width: min(260px, 100%);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.pix-payment-modal textarea {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  resize: vertical;
}

.pix-payment-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.purchase-product-picker {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: min(380px, 100%);
}
.purchase-product-search-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.purchase-product-search-row input[type="search"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  font-weight: 700;
}
.purchase-product-selected {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}
.purchase-product-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 290px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .18);
}
.purchase-product-option {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.purchase-product-option:hover,
.purchase-product-option:focus {
  background: #fff7ed;
  outline: none;
}
.purchase-product-option strong {
  overflow-wrap: anywhere;
}
.purchase-product-option small,
.purchase-product-empty {
  color: var(--muted);
  line-height: 1.35;
}
.purchase-product-empty {
  padding: 12px;
}
.nfe55-form {
  grid-template-columns: 1fr;
  align-items: start;
  margin-bottom: 18px;
}
.nfe55-form > h3 {
  margin: 0;
}
.nfe-form-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
}
.nfe-form-tabs button {
  min-height: 36px;
  border: 1px solid #fdba74;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
}
.nfe-form-tabs button.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
.nfe-tab-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.nfe-tab-panel[hidden] {
  display: none;
}
.nfe-tab-panel h3 {
  grid-column: 1 / -1;
  margin: 0;
  padding: 4px 0 0;
  font-size: 18px;
}
.nfe-tab-panel .wide {
  grid-column: 1 / -1;
}
.nfe-tab-panel .nfe-field-sm {
  max-width: 260px;
}
.nfe-tab-panel .nfe-field-sm input,
.nfe-tab-panel .nfe-field-sm select {
  min-height: 36px;
  padding: 6px 10px;
}
.nfe-detail .nfe-tab-panel {
  gap: 10px 14px;
}
.nfe-check {
  align-self: end;
  min-height: 40px;
}
.nfe-final-consumer-check {
  align-self: end;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #f8fafc;
}
.nfe-tab-panel textarea {
  min-height: 78px;
}
.nfe-item-picker {
  grid-template-columns: minmax(260px, 520px) 1fr;
}
.nfe-item-modal-card {
  width: min(980px, calc(100vw - 34px));
  max-height: calc(100vh - 46px);
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  display: grid;
  gap: 0;
}
.nfe-item-modal-tabs {
  margin: 6px;
}
.nfe-item-tab-panel {
  display: grid;
  grid-template-columns: 140px minmax(260px, 1fr) 180px 180px;
  gap: 22px 12px;
  min-height: 470px;
  padding: 38px 40px;
  border-top: 1px solid var(--line);
  align-content: start;
}
.nfe-item-tab-panel[hidden] {
  display: none;
}
.nfe-item-tab-panel label {
  display: grid;
  gap: 7px;
  color: #64748b;
  font-weight: 800;
}
.nfe-item-tab-panel input,
.nfe-item-tab-panel textarea {
  border: 0;
  border-bottom: 1px solid #9ca3af;
  border-radius: 0;
  padding: 8px 0;
  font-size: 20px;
  background: transparent;
}
.nfe-item-tab-panel input[readonly] {
  color: var(--text);
}
.nfe-item-tab-panel .wide {
  grid-column: span 2;
}
.nfe-item-barcode {
  grid-column: 1 / span 2;
  align-self: end;
  font-size: 20px;
}
.nfe-item-total {
  grid-column: 3 / span 2;
  justify-self: end;
  align-self: end;
  display: grid;
  gap: 6px;
  color: #64748b;
  font-weight: 800;
  text-align: right;
}
.nfe-item-total strong {
  color: var(--text);
  font-size: 22px;
}
.nfe-item-modal-actions {
  padding: 18px 40px 20px;
  border-top: 1px solid var(--line);
  margin-top: 0;
}
.nfe55-post-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}
.nfe55-post-actions > .btn {
  width: auto;
}
.nfe55-post-actions > form .btn {
  width: auto;
}
.nfe55-post-actions .nfe55-email-form {
  margin: 0;
}
.nfe55-post-actions details {
  min-width: min(320px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.nfe55-post-actions summary {
  padding: 11px 14px;
  font-weight: 800;
  cursor: pointer;
}
.nfe55-post-actions .stack-form {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}
.nfe55-post-actions textarea {
  min-height: 88px;
}
.nfe-event-history {
  grid-column: 1 / -1;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.nfe-event-history h3 {
  margin: 0;
}
.nfe-event-text {
  max-width: 520px;
  white-space: normal;
}
.nfe-event-history .fiscal-status-pill {
  max-width: 360px;
  white-space: normal;
}
.nfe-item-fiscal-row td {
  background: #f8fafc;
  padding-top: 10px;
}
.nfe-item-fiscal-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  align-items: end;
}
.nfe-item-fiscal-form label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
}
.nfe-item-fiscal-form input {
  height: 38px;
  margin-top: 4px;
  padding: 8px 10px;
}
.nfe-fiscal-item-card {
  width: min(1080px, calc(100vw - 34px));
  max-height: calc(100vh - 46px);
  max-height: calc(100dvh - 46px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}
.nfe-fiscal-item-card .modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}
.nfe-fiscal-item-card .modal-header h2 {
  margin: 0;
  color: var(--text);
}
.nfe-fiscal-item-card .modal-header p {
  margin: 4px 0 0;
  color: var(--muted);
}
.nfe-fiscal-item-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.nfe-fiscal-item-grid label {
  display: grid;
  gap: 6px;
  color: #52657f;
  font-weight: 800;
}
.nfe-fiscal-item-grid input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
  font-weight: 700;
}
.nfe-fiscal-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}
.nfe-fiscal-item-footer > strong {
  color: #fb7416;
  font-size: 22px;
}
@media (max-width: 980px) {
  .nfe-fiscal-item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nfe-fiscal-item-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .nfe-fiscal-item-footer .modal-actions {
    justify-content: stretch;
  }
  .nfe-fiscal-item-footer .modal-actions .btn {
    flex: 1;
  }
}
@media (max-width: 640px) {
  .nfe-fiscal-item-grid {
    grid-template-columns: 1fr;
  }
}
.nfe55-void-box {
  margin-top: 22px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff;
}
.nfe55-void-box summary {
  padding: 14px 16px;
  color: #991b1b;
  font-weight: 900;
  cursor: pointer;
}
.nfe55-void-box .form-panel {
  padding: 0 16px 16px;
}
@media (max-width: 980px) {
  .nfe-form-tabs,
  .nfe-tab-panel,
  .nfe55-index-layout,
  .nfe-item-picker,
  .nfe-item-tab-panel {
    grid-template-columns: 1fr;
  }
  .nfe-item-tab-panel .wide,
  .nfe-item-barcode,
  .nfe-item-total {
    grid-column: 1;
    justify-self: stretch;
    text-align: left;
  }
}
.purchase-installments-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}
.purchase-installment-row {
  display: grid;
  grid-template-columns: 56px minmax(160px, 1fr) minmax(140px, 1fr);
  gap: 8px;
  align-items: center;
}
.purchase-installment-row span {
  font-weight: 800;
  color: var(--muted);
}
.purchase-items-table td:first-child {
  min-width: 280px;
}
.purchase-items-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}
.purchase-items-table input,
.purchase-items-table select {
  min-height: 38px;
}
.purchase-conversion-field {
  display: grid;
  grid-template-columns: max-content minmax(72px, 96px) max-content;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.purchase-conversion-field input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  text-align: center;
  font-weight: 900;
}
.purchase-create-check {
  margin-top: 8px;
  min-height: auto;
  font-size: 13px;
}
.purchase-modal .product-modal-card {
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 42px);
  overflow-y: auto;
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}
.purchase-dfe-modal-card {
  width: min(860px, calc(100vw - 28px)) !important;
}
.additionals-layout {
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  align-items: start;
  margin-bottom: 18px;
}
.additional-group-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(260px, 420px) minmax(260px, 1fr);
  align-items: end;
  gap: 14px;
  margin-bottom: 18px;
}
.additional-group-toolbar p {
  margin: 0 0 10px;
}
.additional-copy-panel {
  margin-bottom: 18px;
}
.additional-copy-panel .gdoor-import-form {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
}
.additional-copy-panel select {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
}
.form-panel > p.muted {
  margin: -2px 0 2px;
  line-height: 1.35;
}
.additional-form {
  gap: 12px;
}
.additional-form input,
.additional-form select {
  min-height: 38px;
  padding: 7px 10px;
}
.additional-form label {
  position: relative;
}
.additionals-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.additionals-list-head h2,
.additionals-list-head p {
  margin: 0;
}
.additionals-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.additional-row-inactive {
  position: relative;
  background: #fff1f2;
}
.additional-row-inactive td {
  border-top-color: #fecdd3;
  border-bottom-color: #fecdd3;
}
.additional-row-inactive td:first-child {
  box-shadow: inset 5px 0 0 #dc2626;
}
.additional-status-active,
.additional-status-inactive {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.additional-status-active {
  background: #dcfce7;
  color: #166534;
}
.additional-status-inactive {
  background: #fee2e2;
  color: #991b1b;
}
.compact-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: end;
}
.category-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.category-picker .btn {
  min-height: 38px;
  padding: 0 12px;
}
.form-panel textarea[name="names"] {
  min-height: 190px;
  line-height: 1.45;
}
.compact-suggestions {
  left: 0;
  right: 0;
  width: 100%;
  max-height: 238px;
  overflow-y: auto;
}
.compact-suggestions button,
.compact-suggestions span {
  min-height: 42px;
  padding: 9px 10px;
}
.compact-suggestions small {
  color: var(--muted);
  font-size: 12px;
}
.settings-layout {
  grid-template-columns: minmax(320px, 520px) minmax(280px, 1fr);
  align-items: start;
}
.settings-layout .form-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.settings-layout .form-panel h2,
.settings-layout .form-panel .btn,
.settings-layout .form-panel > h1 {
  grid-column: 1 / -1;
}
.store-hours {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}
.store-hour-row {
  display: grid;
  grid-template-columns: 120px 120px 1fr 1fr;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}
.store-hour-row strong { align-self: center; }
.compact-check {
  min-height: 46px;
  align-items: center;
}
.delivery-neighborhoods {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}
.delivery-neighborhoods-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.delivery-neighborhoods-head h3 {
  margin: 0 0 4px;
}
.delivery-neighborhoods-head p {
  margin: 0;
}
.delivery-neighborhood-save-status {
  display: inline-flex;
  margin-top: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 800;
}
.delivery-neighborhood-save-status[data-status="saving"] {
  background: #eff6ff;
  color: #1d4ed8;
}
.delivery-neighborhood-save-status[data-status="error"],
.delivery-neighborhood-save-status[data-status="warning"] {
  background: #fff7ed;
  color: #c2410c;
}
.delivery-neighborhood-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.delivery-neighborhood-toolbar span {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 10px;
  background: #eef2ff;
  color: #1e3a8a;
  font-weight: 800;
}
.delivery-neighborhood-list {
  display: grid;
  gap: 8px;
}
.delivery-neighborhood-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.delivery-neighborhood-row div {
  display: grid;
  gap: 2px;
}
.delivery-neighborhood-row span {
  color: var(--muted);
  font-size: 13px;
}
.delivery-neighborhood-row b {
  color: var(--green);
}
.neighborhood-modal .additional-modal {
  width: min(100%, 440px);
}
.manage-layout {
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  align-items: start;
}
.manage-layout .panel {
  box-shadow: 0 14px 38px rgba(24,39,75,.07);
}
.products-layout {
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
}
.products-layout table,
.customers-layout table {
  font-size: 14px;
}
.products-layout tbody tr:hover,
.customers-layout tbody tr:hover {
  background: #f8fafc;
}
.customers-search {
  max-width: 760px;
}
.customers-list-tools {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1;
}
.customers-list-tools .customers-search {
  flex: 1;
}
.customers-columns-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
}
.customers-columns-button:hover {
  color: #1d4ed8;
  border-color: #bcd0f7;
  background: #f8fbff;
}
.customers-columns-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.customers-columns-popover {
  position: absolute;
  top: 92px;
  right: 28px;
  z-index: 20;
  width: 190px;
  padding: 10px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .12);
}
.customers-columns-popover div {
  display: grid;
  gap: 2px;
  margin-bottom: 6px;
}
.customers-columns-popover strong {
  color: #0f172a;
  font-size: 12px;
}
.customers-columns-popover span {
  color: #64748b;
  font-size: 11px;
}
.customers-columns-popover label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 24px;
  color: #334155;
  font-size: 12px;
}
.customers-columns-popover input[type="checkbox"] {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  accent-color: #2563eb;
}
.customers-columns-popover .btn {
  width: 100%;
  min-height: 30px;
  margin-top: 6px;
  padding: 5px 9px;
}
.customers-table {
  font-size: 12px;
}
.customers-table th {
  font-size: 11px;
  padding: 8px 10px;
}
.customers-table td {
  padding: 8px 10px;
}
.customers-table td:first-child {
  width: 92px;
  min-width: 92px;
}
.customers-table td:nth-child(2) {
  min-width: 220px;
}
.customers-table .product-name {
  font-size: 13px;
  line-height: 1.15;
}
.customers-table td small,
.customer-code-cell small {
  font-size: 11px;
}
.customer-code-cell strong {
  display: block;
  color: var(--blue);
  font-size: 13px;
}
.customers-table .product-actions {
  gap: 4px;
}
.customers-table .icon-action {
  width: 48px;
  min-height: 36px;
  padding: 4px 5px;
}
.customers-table .icon-action svg {
  width: 14px;
  height: 14px;
}
.customers-table .icon-action span {
  font-size: 10px;
}
.customers-table td:nth-child(5) {
  color: #475569;
}
.agenda-search {
  max-width: 980px;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 190px) auto auto;
}
.agenda-form {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(260px, 1fr) minmax(220px, 360px);
  gap: 12px;
  align-items: end;
}
.agenda-form label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 800;
}
.agenda-form .wide {
  grid-column: span 2;
}
.agenda-form .full,
.agenda-form-actions {
  grid-column: 1 / -1;
}
.agenda-form textarea {
  resize: vertical;
}
.agenda-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.agenda-table td:nth-child(4) {
  min-width: 280px;
}
.agenda-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
}
.agenda-status.scheduled {
  background: #f59e0b;
  color: #fff;
}
.agenda-status.done {
  background: #dcfce7;
  color: #047857;
}
.suppliers-search {
  max-width: 760px;
}
.suppliers-table td:first-child {
  min-width: 280px;
}
.suppliers-table td:nth-child(4) {
  color: #475569;
}
.customer-cnpj-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #f8fafc;
}
.customer-cnpj-strip .btn {
  min-height: 48px;
}
.form-panel form, .form-panel, .grid-form { display: grid; gap: 14px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; min-height: auto; }
.swatch { display: inline-block; width: 28px; height: 22px; border-radius: 5px; border: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.actions form { margin: 0; }
.log-danger-row {
  background: #fff1f2;
  color: #991b1b;
}
.log-danger-row td {
  border-bottom-color: #fecdd3;
}
.log-danger-row strong {
  color: #dc2626;
}
.log-danger-row small {
  display: block;
  margin-top: 3px;
  color: #b91c1c;
  font-size: 12px;
}
.thumb {
  max-width: 54px;
  min-width: 54px;
  width: 54px;
  height: 42px;
  max-height: 42px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #eef1f5;
  display: inline-block;
}
.thumb.empty::after { content: "Sem foto"; font-size: 10px; color: var(--muted); display: grid; place-items: center; height: 100%; }
.edit-photo {
  width: 120px;
  height: 92px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--line);
}
.products-page {
  display: grid;
  gap: 22px;
}
.products-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  padding: 28px 30px;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff, #f8fbff);
  box-shadow: 0 18px 38px rgba(15, 23, 42, .06);
}
.products-hero span {
  color: #2563eb;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .04em;
}
.products-hero h1 {
  margin: 6px 0;
  font-size: 34px;
  color: #0f172a;
}
.products-hero p {
  margin: 0;
  color: var(--muted);
}
.products-new-link {
  min-width: 150px;
}
.products-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.products-label-link {
  min-width: 116px;
}
.products-price-link {
  min-width: 154px;
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.exchanges-page {
  gap: 16px;
}
.exchange-search-panel {
  padding: 14px 16px;
}
.exchange-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.exchange-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.section-title.compact {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.section-title.compact h2 {
  margin: 0;
}
.section-title.compact p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.exchange-list-scroll {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}
.exchange-order-card {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
}
.exchange-order-card.active {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: inset 3px 0 0 #2563eb;
}
.exchange-order-card span,
.exchange-order-card small {
  color: var(--muted);
  font-size: 13px;
}
.exchange-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.exchange-summary > div {
  padding: 12px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #f8fafc;
}
.exchange-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.exchange-summary strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
}
.compact-table table {
  font-size: 14px;
}
.compact-table th,
.compact-table td {
  padding: 10px 12px;
}
.exchange-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}
.exchange-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.exchange-form-grid .wide {
  grid-column: span 2;
}
.exchange-form-grid .full {
  grid-column: 1 / -1;
}
.exchange-form-grid textarea {
  min-height: 82px;
}
.exchange-given-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d7e1ef;
  border-radius: 12px;
  background: #f8fafc;
}
.exchange-given-header {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.exchange-given-header strong,
.exchange-given-header small {
  display: block;
}
.exchange-given-header small {
  color: #64748b;
}
.exchange-given-items {
  display: grid;
  gap: 10px;
}
.exchange-given-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 120px 140px 46px;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.exchange-given-row .exchange-product-field {
  min-width: 0;
}
.exchange-returned-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: -6px;
}
.exchange-returned-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 160px 46px;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid #d7e1ef;
  border-radius: 10px;
  background: #f8fafc;
}
.exchange-remove-returned {
  min-width: 44px;
  height: 46px;
  margin-top: 24px;
  padding: 0;
}
.exchange-remove-product {
  min-width: 44px;
  height: 46px;
  margin-top: 24px;
  padding: 0;
}
.exchange-product-results {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
  margin-top: 6px;
}
.exchange-product-option,
.exchange-product-empty {
  width: 100%;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  background: #fff;
  padding: 9px 12px;
  text-align: left;
}
.exchange-product-option {
  cursor: pointer;
}
.exchange-product-option:hover,
.exchange-product-option:focus {
  border-color: #f47c20;
  background: #fff7ed;
  outline: none;
}
.exchange-product-option strong,
.exchange-product-option span {
  display: block;
}
.exchange-product-option span,
.exchange-product-empty,
[data-exchange-product-selected] {
  color: #5f6f86;
  font-size: 13px;
}
@media (max-width: 1100px) {
  .exchange-layout,
  .exchange-summary,
  .exchange-form-grid {
    grid-template-columns: 1fr;
  }
  .exchange-form-grid .wide,
  .exchange-form-grid .full {
    grid-column: auto;
  }
  .exchange-given-row,
  .exchange-returned-row {
    grid-template-columns: 1fr;
  }
  .exchange-given-header {
    flex-direction: column;
    align-items: stretch;
  }
  .exchange-remove-product,
  .exchange-remove-returned {
    width: 100%;
    margin-top: 0;
  }
}
.products-dashboard {
  display: grid;
  grid-template-columns: minmax(310px, 430px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.products-list-panel.full {
  width: 100%;
}
.product-editor,
.products-list-panel {
  border: 1px solid #e6edf5;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .07);
}
.product-panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.product-panel-title h2 {
  margin: 0;
  color: #0f172a;
}
.product-panel-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.product-title-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eaf2ff;
  color: #2563eb;
  font-weight: 900;
  font-size: 20px;
}
.product-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #fff;
}
.product-form-grid .wide {
  grid-column: 1 / -1;
}

.product-profit-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid #cfd6df;
  border-radius: 7px;
  background: #fff;
}

.product-profit-field input {
  min-height: 40px;
  border: 0;
  border-radius: 0;
  padding-right: 6px;
}

.product-profit-field span {
  padding: 0 12px;
  color: var(--ink);
  font-weight: 800;
}
.product-fiscal-menu {
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}
.product-fiscal-menu summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  color: #0f172a;
  font-weight: 900;
  list-style: none;
}
.product-fiscal-menu summary::-webkit-details-marker {
  display: none;
}
.product-fiscal-menu summary::after {
  content: ">";
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eaf2ff;
  color: #2563eb;
  font-weight: 900;
}
.product-fiscal-menu[open] summary::after {
  transform: rotate(90deg);
}
.product-fiscal-menu summary strong {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}
.product-fiscal-grid {
  border: 0;
  border-top: 1px solid #dbe5f0;
  border-radius: 0;
}
.product-history-menu {
  background: #fff;
}
.product-history-content {
  display: grid;
  gap: 16px;
  padding: 14px 16px 16px;
  border-top: 1px solid #dbe5f0;
}
.product-history-content section {
  display: grid;
  gap: 8px;
}
.product-history-content h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
}
.product-history-table {
  max-height: 260px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.product-history-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.product-history-table th,
.product-history-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
}
.product-history-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #475569;
  font-weight: 900;
  z-index: 1;
}
.product-history-table tr:last-child td {
  border-bottom: 0;
}
.product-history-table a {
  color: #1d4ed8;
  font-weight: 900;
  text-decoration: none;
}
.product-history-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
}
.product-history-note {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}
.customer-history-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}
.customer-history-summary article {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.customer-history-summary span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.customer-history-summary strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 18px;
}
.customer-history-summary article:first-child {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.customer-history-summary article:first-child strong {
  color: #047857;
}
.customer-history-summary article:nth-child(3) {
  border-color: #fecaca;
  background: #fff1f2;
}
.customer-history-summary article:nth-child(3) strong,
.customer-history-overdue td {
  color: #991b1b;
}

.customer-credit-list,
.credit-positive {
  color: #047857;
}

.credit-negative {
  color: #b91c1c;
}

.customer-credit-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  margin: 8px 0 12px;
  border: 1px solid #d9eadf;
  border-radius: 8px;
  background: #fbfefc;
}

.customer-credit-panel span,
.customer-credit-panel small {
  display: block;
  color: #64748b;
}

.customer-credit-panel span {
  font-size: 12px;
  line-height: 1.2;
}

.customer-credit-panel small {
  font-size: 11px;
  line-height: 1.25;
  max-width: 360px;
}

.customer-credit-panel strong {
  display: block;
  margin: 1px 0;
  color: #047857;
  font-size: 1.15rem;
  line-height: 1.1;
}

.customer-credit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.customer-credit-actions .btn.small {
  min-height: 34px;
  padding: 7px 10px;
}

.customer-credit-modal-card {
  max-width: 460px;
}

.customer-credit-modal-card label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.product-editor label,
.product-modal-card label {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}
.product-editor input,
.product-editor select,
.product-modal-card input,
.product-modal-card select,
.product-modal-card textarea {
  margin-top: 7px;
}
.product-modal-card textarea {
  min-height: 108px;
}
.product-photo-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}
.product-photo-preview img {
  width: 84px;
  height: 64px;
  object-fit: cover;
  border-radius: 7px;
}
.product-photo-preview span {
  color: var(--muted);
  font-size: 13px;
}
.product-checks {
  display: grid;
  gap: 8px;
  padding: 0 2px;
}
.product-form-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
}
.product-form-actions .btn {
  width: 100%;
}
.product-tip {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}
.products-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.products-search {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.products-search input {
  width: min(100%, 390px);
}
.product-filter-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #dbe5f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.product-filter-chip input {
  width: auto;
  min-height: auto;
  margin: 0;
}
.product-filter-chip.active {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
}
.product-filter-chip.active.negative {
  border-color: #fecaca;
  background: #fff1f2;
  color: #dc2626;
}
.product-filter-chip.active.warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}
.products-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 800;
}
.products-bulk-bar span {
  margin-right: auto;
}
.products-bulk-bar .btn.success {
  border-color: #86efac;
  background: #16a34a;
  color: #fff;
}
.products-bulk-bar .btn.danger {
  border-color: #fecdd3;
  background: #dc2626;
  color: #fff;
}
.product-select-col {
  width: 42px;
  text-align: center;
}
.product-select-col input {
  width: 18px;
  height: 18px;
  min-height: auto;
  margin: 0;
}
.products-table-wrap {
  overflow-x: auto;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
}
.products-table {
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
}
.products-table th {
  background: #f8fafc;
  color: #2563eb;
  font-size: 12px;
  text-transform: uppercase;
}
.products-table td {
  vertical-align: middle;
}
.products-table th:nth-child(9),
.products-table td.product-price {
  width: 104px;
  white-space: nowrap;
}
.products-table th:last-child,
.products-table td:last-child {
  width: 136px;
}
.products-table tbody tr:hover {
  background: #f8fbff;
}
.product-thumb {
  width: 56px;
  height: 50px;
  display: inline-grid;
  place-items: center;
  object-fit: cover;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}
.product-code {
  font-family: Consolas, monospace;
  color: #334155;
}
.product-name {
  display: block;
  color: #0f172a;
}
.products-table small {
  display: block;
  margin-top: 4px;
  max-width: 280px;
  color: var(--muted);
  line-height: 1.25;
}
.products-table:not(.customers-table) {
  font-size: 12px;
}
.products-table:not(.customers-table) th {
  font-size: 11px;
  padding: 8px 10px;
}
.products-table:not(.customers-table) td {
  padding: 8px 10px;
}
.products-table:not(.customers-table) .product-name {
  font-size: 13px;
  line-height: 1.15;
}
.products-table:not(.customers-table) small {
  font-size: 11px;
}
.products-table:not(.customers-table) .icon-action {
  width: 48px;
  min-height: 36px;
  padding: 4px 5px;
}
.products-table:not(.customers-table) .icon-action svg {
  width: 14px;
  height: 14px;
}
.products-table:not(.customers-table) .icon-action span {
  font-size: 10px;
}
.status-dot {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.status-dot.yes {
  background: #dcfce7;
  color: #15803d;
}
.status-dot.no {
  background: #fee2e2;
  color: #dc2626;
}
.stock-value {
  font-weight: 800;
}
.stock-value.positive {
  color: #16a34a;
}
.stock-value.negative {
  color: #dc2626;
}
.product-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
}
.product-actions form {
  margin: 0;
}
.icon-action {
  width: 58px;
  min-height: 48px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 6px;
  border: 1px solid #dbe5f0;
  border-radius: 7px;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.icon-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-action span {
  font-size: 11px;
  line-height: 1;
}
.icon-action.edit {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}
.icon-action.delete {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #dc2626;
}
.product-modal .product-modal-card {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 42px);
  overflow-y: auto;
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15,23,42,.22);
}
.product-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}
.product-modal-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-weight: 900;
  cursor: pointer;
}
.products-empty {
  text-align: center;
  color: var(--muted);
}
.products-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 14px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}
.products-pagination .btn.disabled {
  pointer-events: none;
  opacity: .48;
}

.price-adjust-modal {
  z-index: 260;
  padding: 10px;
  align-items: center;
}
.price-adjust-card {
  width: min(1680px, calc(100vw - 24px));
  max-height: calc(100vh - 22px);
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 18px;
  box-sizing: border-box;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15,23,42,.22);
}
.price-adjust-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #f8fafc;
}
.price-adjust-search label {
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}
.price-adjust-search input {
  margin-top: 6px;
}
.price-adjust-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 12px;
  min-height: 410px;
}
.price-invoice-list,
.price-adjust-grid-panel {
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #fff;
}
.price-invoice-list {
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding: 8px;
}
.price-invoice-list h3 {
  margin: 4px 6px 10px;
  font-size: 15px;
}
.price-invoice-list a {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #0f172a;
  text-decoration: none;
}
.price-invoice-list a:hover,
.price-invoice-list a.active {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.price-invoice-list span,
.price-invoice-list small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.price-adjust-grid-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
}
.price-adjust-meta {
  display: grid;
  grid-template-columns: 160px minmax(180px, 1fr) 150px;
  gap: 8px;
}
.price-adjust-meta div {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.price-adjust-meta span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.price-adjust-meta strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 14px;
}
.price-cost-check {
  margin: 0;
  padding: 8px 2px;
  color: #475569;
  font-weight: 800;
}
.price-adjust-tools {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.price-adjust-tools label:not(.check) {
  display: grid;
  gap: 4px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}
.price-adjust-tools input[type="number"] {
  width: 118px;
  min-height: 32px;
  padding: 6px 8px;
}
.price-adjust-tools .btn {
  min-height: 32px;
}
.price-adjust-tools .price-cost-check {
  margin-left: auto;
  padding: 0;
}
.price-adjust-table-wrap {
  max-height: calc(100vh - 380px);
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.price-adjust-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 11px;
}
.price-adjust-table th,
.price-adjust-table td {
  padding: 6px 7px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
}
.price-adjust-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #475569;
  font-weight: 900;
  text-transform: uppercase;
}
.price-adjust-table td:nth-child(2) {
  min-width: 220px;
  white-space: normal;
}
.price-adjust-table td:nth-child(2) strong,
.price-adjust-table td:nth-child(2) small {
  display: block;
}
.price-adjust-table td:nth-child(2) small,
.price-adjust-muted {
  color: #dc2626;
  font-size: 11px;
  font-weight: 800;
}
.price-adjust-table input[type="number"] {
  width: 78px;
  min-height: 30px;
  padding: 5px 7px;
  font-size: 12px;
}
.price-adjust-table tr.unlinked {
  background: #fff7ed;
}
.price-adjust-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.price-adjust-empty,
.price-adjust-placeholder {
  margin: 0;
  padding: 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
}
.price-adjust-placeholder {
  align-self: center;
  text-align: center;
}
.price-adjust-placeholder h3 {
  margin: 0 0 6px;
  color: #0f172a;
}
.price-adjust-placeholder p {
  margin: 0;
}

.labels-page {
  display: grid;
  gap: 22px;
}
.labels-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 22px;
}
.labels-template-panel,
.labels-preview-panel,
.labels-print-panel,
.labels-result-panel {
  border-radius: 8px;
}
.labels-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.labels-section-head h2 {
  margin: 0 0 4px;
  font-size: 24px;
}
.labels-section-head p {
  margin: 0;
  color: var(--muted);
}
.labels-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.labels-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.labels-preview-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}
.label-preview-card {
  width: min(100%, 260px);
  min-height: 160px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 8px;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .03);
}
.label-preview-card span,
.label-preview-card small {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.label-preview-card strong {
  font-size: 16px;
  line-height: 1.15;
}
.label-preview-card b {
  font-size: 22px;
}
.fake-barcode {
  height: 44px;
  background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 5px, #111 5px 6px, transparent 6px 10px);
  border-radius: 2px;
}
.labels-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.labels-tabs a {
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--ink);
  font-weight: 800;
  background: #fff;
  text-decoration: none;
}
.labels-tabs a.active {
  border-color: #fb923c;
  background: #fff7ed;
  color: #c2410c;
}
.labels-search {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  margin-bottom: 16px;
}
.labels-print-options {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.labels-print-options label {
  min-width: 150px;
}
.labels-table th:first-child,
.labels-table td:first-child {
  width: 48px;
  text-align: center;
}
.label-qty-input {
  max-width: 90px;
}
.labels-invoice-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.labels-invoice-list a {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 90px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
}
.labels-invoice-list a:hover {
  border-color: #fb923c;
  background: #fff7ed;
}
.labels-manual-grid {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 140px 220px 120px;
  gap: 12px;
}
.labels-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
@media (max-width: 1120px) {
  .products-dashboard {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .products-hero,
  .products-list-head {
    align-items: stretch;
    flex-direction: column;
  }
  .products-new-link,
  .products-search,
  .products-search input,
  .products-search .btn {
    width: 100%;
  }
  .products-search {
    display: grid;
    grid-template-columns: 1fr;
  }
  .product-form-grid,
  .product-form-actions {
    grid-template-columns: 1fr;
  }
  .products-hero h1 {
    font-size: 30px;
  }
}
.customer-results {
  display: grid;
  gap: 6px;
}
[data-delivery-customer-results] {
  max-height: min(560px, 58vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.receivable-customer-filter {
  position: relative;
  min-width: min(100%, 360px);
}
[data-receivable-customer-results] {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: min(430px, 52vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
[data-receivable-customer-results]:empty {
  display: none;
}
.customer-result {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--ink);
}
.customer-result-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}
.customer-result-main strong {
  overflow-wrap: anywhere;
}
.customer-result-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.customer-result:hover,
.customer-result.is-active,
.customer-result:focus-visible {
  border-color: var(--orange);
  background: #fff7ed;
  outline: 2px solid rgba(249, 115, 22, 0.18);
}
.muted-result {
  color: var(--muted);
  cursor: default;
}

.cashier-screen {
  min-height: calc(100vh - 130px);
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #20242b, #343a40);
  border-radius: 8px;
  padding: 24px;
}
.payment-box { width: min(820px, 100%); padding: 28px; }
.payment-box form { display: grid; gap: 14px; }
.cashier-customer {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.cashier-customer span, .cashier-customer small { color: var(--muted); }
.cashier-customer strong { color: var(--text); }
.cashier-customer-button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: #86efac;
  background: #16a34a;
  color: #fff;
  box-shadow: 0 10px 22px rgba(22, 163, 74, .2);
}
.cashier-customer-button:hover {
  background: #15803d;
  color: #fff;
}
.btn.success {
  border-color: #86efac;
  background: #16a34a;
  color: #fff;
}
.btn.success:hover {
  background: #15803d;
  color: #fff;
}
.cashier-customer-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cashier-credit-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 800;
}

.cashier-credit-balance .btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.cashier-manual-customer {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(220px, 1fr);
  gap: 12px;
  margin-top: 14px;
}
@media (max-width: 720px) {
  .cashier-manual-customer {
    grid-template-columns: 1fr;
  }
}
.cashier-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 16px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: #f8fafc;
}
.cashier-summary span { color: var(--muted); }
.cashier-total {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 22px;
}
.cashier-buttons { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.credit-preview {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.credit-preview div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.print-page { background: #fff; padding: 20px; }
.receipt {
  width: 72mm;
  font-family: "Courier New", monospace;
  color: #000;
  padding: 1mm 1.5mm;
  font-size: 12px;
  line-height: 1.18;
}
.receipt-header {
  text-align: center;
}
.receipt-header h2 {
  font-size: 14px;
  margin: 0 0 6px;
  text-transform: uppercase;
}
.receipt-header p {
  margin: 3px 0;
}
.receipt-header strong {
  display: block;
  margin-top: 8px;
  font-size: 14px;
}
.receipt-info p {
  margin: 7px 0;
}
.receipt-section-title {
  text-align: center;
  font-weight: 800;
  margin: 8px 0;
}
.receipt-line { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0; }
.receipt-line span { max-width: 48mm; }
.receipt-additional { padding-left: 12px; font-size: 12px; }
.receipt-line.total { font-size: 18px; }
.receipt-payment-block {
  margin: 10px 0;
  padding: 8px 0;
  border-bottom: 1px dashed #cbd5e1;
}
.receipt-payment-block p {
  margin: 3px 0;
}
.receipt-note {
  margin: 10px 0;
  text-align: center;
  font-size: 12px;
}
.receipt-signature {
  margin-top: 28px;
  text-align: center;
}
.receipt-signature span {
  display: block;
  width: 62mm;
  max-width: 100%;
  margin: 0 auto 6px;
  border-top: 1px solid #111827;
}
.receipt-signature strong {
  font-size: 12px;
}
.print-monitor-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.print-monitor-controls label { max-width: 320px; }
.print-monitor-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.print-monitor-tabs .active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
.print-monitor-hint {
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
}
.print-monitor iframe {
  width: 100%;
  min-height: 380px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.print-history table button { white-space: nowrap; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow-y: auto;
  background: rgba(17, 24, 39, .54);
}
.modal-backdrop[hidden] { display: none; }
.counter-discard-toggle:not(:checked) + .counter-discard-modal {
  display: none;
}
.counter-discard-toggle:checked + .counter-discard-modal {
  display: grid;
}
.counter-discard-modal label.btn {
  cursor: pointer;
  user-select: none;
}
.additional-modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
  padding: 22px;
}
.additional-modal h2 { margin: 0 0 4px; }
.additional-modal p { color: var(--muted); margin: 0 0 16px; }
.counter-receivable-open-btn {
  gap: 8px;
  border-color: #bbf7d0 !important;
  background: #f0fdf4 !important;
  color: #15803d !important;
}

.counter-receivable-open-btn span:last-child {
  display: grid;
  gap: 1px;
  line-height: 1.05;
}

.counter-receivable-open-btn strong {
  color: inherit;
  font-size: 12px;
}

.counter-receivable-icon {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: #22c55e;
  color: #ffffff;
}

.counter-receivable-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.counter-receivable-modal {
  width: min(1080px, calc(100vw - 32px));
  max-height: min(820px, calc(100dvh - 32px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  padding: 0;
}

.counter-receivable-modal form {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.counter-receivable-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.counter-receivable-head p {
  margin-bottom: 0;
}

.counter-receivable-close {
  width: 38px;
  height: 38px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff1f2;
  color: #e11d48;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

.counter-receivable-search {
  display: grid;
  gap: 6px;
  padding: 14px 22px 0;
  color: var(--muted);
  font-weight: 750;
}

.counter-receivable-search input {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 17px;
  font-weight: 750;
}

.counter-receivable-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 210px) 160px minmax(150px, 190px) auto auto;
  align-items: end;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}

.counter-receivable-actions > div {
  display: grid;
  gap: 4px;
}

.counter-receivable-actions > div span {
  color: var(--muted);
  font-size: 13px;
}

.counter-receivable-actions label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.counter-receivable-actions select,
.counter-receivable-actions input {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 750;
}

.counter-receivable-list {
  min-height: 0;
  overflow: auto;
  padding: 0 22px 22px;
}

.counter-receivable-row {
  display: grid;
  grid-template-columns: 42px minmax(220px, 1.35fr) 130px minmax(190px, 1fr) 120px 120px;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
  color: #0f172a;
}

.counter-receivable-row[hidden] {
  display: none !important;
}

.counter-receivable-row:not(.counter-receivable-row-head) {
  cursor: pointer;
}

.counter-receivable-row:not(.counter-receivable-row-head):hover,
.counter-receivable-row:has(input:checked) {
  background: #eff6ff;
}

.counter-receivable-row-head {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 44px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.counter-receivable-check input {
  width: 22px;
  height: 22px;
}

.counter-receivable-row small,
.counter-receivable-row em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.counter-receivable-row strong:last-child {
  color: #15803d;
  text-align: right;
  white-space: nowrap;
}

.counter-receivable-empty {
  padding: 22px;
  color: #15803d;
  font-weight: 850;
}

.counter-receivable-confirm-backdrop {
  z-index: 120;
  background: rgba(15, 23, 42, .66);
}

.counter-receivable-confirm-modal {
  width: min(560px, calc(100vw - 32px));
  text-align: center;
  border: 1px solid #fed7aa;
}

.counter-receivable-confirm-icon {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 16px;
  background: #fff7ed;
  color: #f97316;
  font-size: 28px;
  font-weight: 950;
}

.counter-receivable-confirm-modal h2 {
  color: #0f172a;
  font-size: 24px;
}

.counter-receivable-confirm-modal p {
  max-width: 440px;
  margin: 8px auto 18px;
  color: #475569;
}

.counter-receivable-confirm-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
  text-align: left;
}

.counter-receivable-confirm-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.counter-receivable-confirm-summary span {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.counter-receivable-confirm-summary strong {
  color: #0f172a;
  font-size: 18px;
  white-space: nowrap;
}

.counter-receivable-confirm-balance {
  border-color: #fecaca !important;
  background: #fff1f2 !important;
}

.counter-receivable-confirm-balance strong {
  color: #dc2626;
}

.counter-receivable-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.counter-receivable-confirm-actions .btn {
  min-height: 46px;
}

@media (max-width: 980px) {
  .counter-receivable-actions {
    grid-template-columns: 1fr 1fr;
  }

  .counter-receivable-actions > div,
  .counter-receivable-actions .btn.primary {
    grid-column: 1 / -1;
  }

  .counter-receivable-row {
    grid-template-columns: 36px minmax(180px, 1fr) minmax(120px, .7fr);
  }

  .counter-receivable-row > span:nth-child(4),
  .counter-receivable-row > span:nth-child(5) {
    display: none;
  }

  .counter-receivable-row-head {
    display: none;
  }
}
.quote-price-history-modal {
  width: min(980px, calc(100vw - 48px));
  max-height: min(760px, calc(100dvh - 48px));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.quote-price-history-modal .product-modal-head {
  align-items: start;
}
.quote-price-history-results {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.quote-price-history-results table {
  min-width: 860px;
}
.quote-price-history-results th,
.quote-price-history-results td {
  padding: 10px 12px;
  vertical-align: middle;
}
.quote-price-history-results td:nth-child(3) {
  min-width: 260px;
}
.quote-price-history-results small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}
.quote-history-create-modal {
  width: min(1180px, calc(100vw - 48px));
  height: min(820px, calc(100vh - 48px));
  height: min(820px, calc(100dvh - 48px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 18px;
}
.quote-history-create-modal h2 {
  font-size: 24px;
  line-height: 1.15;
}
.quote-history-create-modal p {
  margin-bottom: 10px;
  font-size: 15px;
}
.quote-history-create-modal form {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 9px;
  overflow: hidden;
}
.quote-history-create-modal label {
  display: grid;
  gap: 5px;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
}
.quote-history-create-modal input {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
}
.quote-history-create-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 14px;
}
.quote-history-create-grid > div {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}
.quote-history-create-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 16px;
}
.quote-history-create-results,
.quote-history-create-selected {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.quote-history-create-results table {
  min-width: 600px;
}
.quote-history-create-selected table {
  min-width: 450px;
}
.quote-history-create-results th,
.quote-history-create-results td,
.quote-history-create-selected th,
.quote-history-create-selected td {
  padding: 6px 8px;
  font-size: 14px;
  line-height: 1.15;
  vertical-align: middle;
}
.quote-history-create-results th,
.quote-history-create-selected th {
  font-size: 12px;
}
.quote-history-create-results small,
.quote-history-create-selected small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}
.history-create-qty {
  width: 72px;
  height: 32px !important;
  font-weight: 800;
}
.btn.mini {
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1;
}
.history-create-remove {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}
.history-create-remove svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
@media (max-width: 980px) {
  .quote-history-create-modal {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 16px;
  }
  .quote-history-create-grid {
    grid-template-columns: 1fr;
  }
}
.nfe-import-quote-modal {
  width: min(900px, calc(100vw - 48px));
  max-height: min(760px, calc(100dvh - 48px));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}
.nfe-import-quote-modal form {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
}
.nfe-import-quote-modal label {
  display: grid;
  gap: 7px;
  color: #64748b;
  font-weight: 700;
}
.nfe-import-quote-modal input[type="search"] {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
}
.nfe-quote-selected {
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #14532d;
  padding: 10px 12px;
  font-weight: 800;
}
.nfe-quote-selected span {
  display: block;
  margin-top: 3px;
  color: #166534;
  font-weight: 700;
}
.nfe-sale-selected {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 10px 12px;
  font-weight: 850;
}
.nfe-sale-selected span {
  display: block;
  margin-top: 3px;
  color: #1d4ed8;
  font-weight: 750;
}
.nfe-sale-result input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}
.nfe-sale-result small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.nfe-sale-result.is-disabled {
  opacity: .48;
  cursor: not-allowed;
}
.nfe-quote-results {
  min-height: 0;
  max-height: min(48vh, 430px);
  overflow-y: scroll;
  scrollbar-gutter: stable;
  display: grid;
  gap: 8px;
  padding-right: 2px;
}
.nfe-quote-result {
  width: 100%;
  display: grid;
  grid-template-columns: 96px minmax(240px, 1fr) 120px 130px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
}
.nfe-quote-result.nfe-sale-result {
  grid-template-columns: 34px 76px minmax(0, 1fr) 120px;
  gap: 12px;
}
.nfe-quote-result.nfe-sale-result .nfe-quote-result-customer strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nfe-quote-result.nfe-sale-result .nfe-quote-result-total {
  justify-self: end;
}
.nfe-quote-result:hover,
.nfe-quote-result:focus-visible,
.nfe-quote-result.is-selected,
.nfe-sale-result.is-active {
  border-color: var(--orange);
  background: #fff7ed;
  outline: 2px solid rgba(249, 115, 22, 0.16);
}
.nfe-quote-result-number,
.nfe-quote-result-total {
  font-weight: 900;
  white-space: nowrap;
}
.nfe-quote-result-customer {
  min-width: 0;
}
.nfe-quote-result-customer strong,
.nfe-quote-result-customer small {
  display: block;
}
.nfe-quote-result-customer strong {
  overflow-wrap: anywhere;
}
.nfe-quote-result-customer small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}
.nfe-quote-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}
@media (max-width: 760px) {
  .nfe-import-quote-modal {
    width: calc(100vw - 28px);
    max-height: calc(100dvh - 28px);
    padding: 18px;
  }
  .nfe-quote-result {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}
.payable-entry-modal {
  width: min(760px, 100%);
}
.payable-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.payable-entry-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}
.payable-entry-grid .full {
  grid-column: 1 / -1;
}
.payable-entry-grid input,
.payable-entry-grid select,
.payable-entry-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 700;
}
.payable-entry-grid textarea {
  resize: vertical;
}
.payable-entry-grid .payable-check {
  justify-content: flex-end;
  flex-direction: row;
  align-items: center;
  color: var(--ink);
}
.payable-entry-grid .payable-check input {
  width: auto;
}
.payable-supplier-search {
  position: relative;
}
.payable-supplier-results {
  position: absolute;
  z-index: 3;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: grid;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .14);
}
.payable-supplier-results[hidden] {
  display: none;
}
.payable-supplier-results button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.payable-supplier-results button:last-child {
  border-bottom: 0;
}
.payable-supplier-results button:hover,
.payable-supplier-results button.is-active {
  background: #eff6ff;
}
.payable-supplier-results span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.payable-payment-modal {
  width: min(540px, 100%);
}
.product-lookup-modal {
  width: min(1180px, calc(100vw - 48px));
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-lookup-modal label {
  color: var(--muted);
  font-weight: 700;
}
.product-lookup-modal input {
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 20px;
  font-weight: 800;
}
.product-lookup-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: min(58vh, 560px);
}
.product-lookup-table {
  min-width: 920px;
}
.product-lookup-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f7fb;
}
.product-lookup-row {
  cursor: pointer;
}
.product-lookup-row.is-active,
.product-lookup-row:hover {
  background: #dff0ff;
}
.product-lookup-row.out-of-stock {
  color: #dc3545;
}
.product-lookup-row td {
  padding-top: 9px;
  padding-bottom: 9px;
  white-space: nowrap;
}
.product-lookup-row td:nth-child(3) {
  white-space: normal;
  min-width: 340px;
}
.product-lookup-footer {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.table-open-modal label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}
.table-open-modal input {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  color: var(--ink);
}
.fiscal-file-backdrop {
  align-items: center;
}
.fiscal-file-modal {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
}
.fiscal-file-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.fiscal-file-head > div:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 14px;
  align-items: center;
}
.fiscal-file-head h2,
.fiscal-file-head p {
  margin: 0;
}
.fiscal-file-head p {
  grid-column: 2;
  color: var(--muted);
}
.fiscal-file-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  grid-row: span 2;
  border-radius: 8px;
  background: #eaf2ff;
  color: var(--blue);
  font-weight: 900;
}
.fiscal-file-body {
  max-height: calc(100vh - 188px);
  overflow-y: auto;
  display: grid;
  gap: 16px;
  padding: 18px 24px;
  background: #f8fafc;
}
.fiscal-file-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.fiscal-file-section h3 {
  margin: 0;
  color: var(--ink);
}
.fiscal-file-section label:not(.fiscal-check):not(.fiscal-radio) {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}
.fiscal-file-section input[type="date"],
.fiscal-file-section select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  font: inherit;
  color: var(--text);
}
.fiscal-file-grid {
  display: grid;
  gap: 14px;
}
.fiscal-file-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.fiscal-file-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.fiscal-check,
.fiscal-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 800;
}
.fiscal-check:last-child,
.fiscal-radio:last-child {
  border-bottom: 0;
}
.fiscal-check.inline {
  flex-wrap: wrap;
  gap: 10px 16px;
}
.fiscal-check input,
.fiscal-radio input {
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
}
.fiscal-check.disabled,
.fiscal-radio.disabled {
  color: var(--muted);
}
.fiscal-check .btn.compact {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}
.fiscal-xml-zip-modal .fiscal-check span {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.fiscal-file-actions {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
}
@media (max-width: 760px) {
  .fiscal-file-modal {
    width: min(100%, calc(100vw - 18px));
  }
  .fiscal-file-head,
  .fiscal-file-body,
  .fiscal-file-actions {
    padding-left: 14px;
    padding-right: 14px;
  }
  .fiscal-file-grid.two {
    grid-template-columns: 1fr;
  }
}
.confirm-modal {
  width: min(460px, 100%);
  text-align: center;
  border-radius: 14px;
  padding: 28px;
}
.confirm-modal-icon {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 999px;
  background: #fff1f2;
  color: var(--red);
  font-size: 30px;
  font-weight: 900;
}
.confirm-modal h2 {
  margin: 0 0 10px;
  color: var(--ink);
}
.confirm-modal p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.confirm-modal .modal-actions {
  justify-content: center;
  margin-top: 22px;
}
.confirm-modal-action {
  background: var(--red);
  border-color: var(--red);
  color: #fff !important;
  font-weight: 800;
  min-width: 156px;
}
.fiscal-result-modal.success .confirm-modal-icon {
  width: auto;
  min-width: 52px;
  padding: 0 12px;
  background: #dcfce7;
  color: #166534;
  font-size: 18px;
}
.fiscal-result-modal.danger .confirm-modal-icon {
  background: #fee2e2;
  color: #991b1b;
}
.additional-modal textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
}
.additional-options {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}
.additional-option {
  grid-template-columns: auto 1fr auto;
  display: grid;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  color: var(--ink);
}
.additional-option input { width: auto; min-height: auto; }
.additional-category {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}
.additional-category + .additional-category {
  margin-top: 10px;
}
.additional-category h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}
.additional-category h3 small {
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
}
.additional-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.mobile-shell { display: none; }

@media (max-width: 860px) {
  .sidebar, .topbar { display: none; }
  .app-main { margin-left: 0; padding: 16px; }
  .login-card, .order-layout, .split, .metrics, .dashboard-grid, .delivery-top, .delivery-compact-grid, .delivery-inline, .additional-group-toolbar { grid-template-columns: 1fr; }
  .additional-group-toolbar p { margin: 0; }
  .delivery-main { grid-template-columns: 1fr; }
  .delivery-side-icons { display: none; }
  .login-hero { padding: 34px; }
  .login-hero h1 { font-size: 32px; }
  .search-add { grid-template-columns: 1fr; }
  .order-items article { grid-template-columns: 1fr auto; }
  .delivery-customer-summary, .delivery-details-form, .table-customer-form, .table-order-note-form { grid-template-columns: 1fr; }
  .delivery-main, .delivery-top, .delivery-inline, .delivery-compact-grid { grid-template-columns: 1fr; }
  .delivery-side-icons { display: none; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-hour-row { grid-template-columns: 1fr; }
  .delivery-toast { right: 16px; bottom: 86px; }
}

@media (max-width: 680px) {
  body.mobile-body { background: #fff; }
  body.mobile-body .app-main { padding: 0; }
  body.mobile-body > .sidebar, body.mobile-body .topbar { display: none; }
  .mobile-shell {
    min-height: 100vh;
    display: block;
    padding: 26px 18px 92px;
    background: #fff;
  }
  .sector-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 58px;
    background: linear-gradient(135deg, #ff8a35, #f47720);
    color: #fff;
    border-radius: 8px;
    padding: 0 18px;
    font-size: 17px;
    box-shadow: 0 10px 22px rgba(244,124,32,.22);
  }
  .sector-banner span { font-size: 34px; line-height: 1; }
  .mobile-title {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 10px;
    margin: 26px 0 22px;
  }
  .mobile-title h1 { margin: 0; font-size: 30px; font-weight: 500; }
  .mobile-title a { font-size: 18px; color: #333; }
  .icon-btn {
    width: 44px;
    height: 44px;
    border: 0;
    background: #fff;
    font-size: 30px;
    cursor: pointer;
  }
  .mobile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 42px;
  }
  .mobile-table {
    min-height: 118px;
    position: relative;
    display: grid;
    justify-items: center;
    align-content: start;
    color: #2f3337;
  }
  .chairs {
    position: absolute;
    top: 30px;
    width: 100%;
    height: 32px;
  }
  .chairs::before, .chairs::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 32px;
    background: #d5d5d5;
    border-radius: 4px;
    box-shadow: inset 0 0 0 2px #c8c8c8;
  }
  .chairs::before { left: 0; }
  .chairs::after { right: 0; }
  .round-table {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: #a8db9b;
    border: 3px solid #95c98b;
    margin-top: 7px;
  }
  .mobile-table.open .round-table {
    background:
      radial-gradient(circle at 35% 42%, #fff 0 5px, transparent 6px),
      radial-gradient(circle at 65% 38%, #ffdf8a 0 7px, transparent 8px),
      radial-gradient(circle at 50% 58%, #e85d04 0 12px, transparent 13px),
      #5fa65d;
  }
  .mobile-table strong {
    min-width: 64px;
    margin-top: -10px;
    padding: 5px 16px;
    background: #fff;
    border: 1px solid #cfcfcf;
    border-radius: 999px;
    font-size: 28px;
    font-weight: 400;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
  }
  .mobile-table small { color: var(--orange); font-weight: 700; margin-top: 4px; }
  .float-add {
    position: fixed;
    right: 20px;
    bottom: 76px;
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    background: var(--orange);
    color: #fff;
    font-size: 42px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(244,124,32,.35);
  }
  .mobile-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 70px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #fff;
    border-top: 1px solid #ececec;
    box-shadow: 0 -8px 24px rgba(0,0,0,.08);
  }
  .mobile-tabs a {
    display: grid;
    place-items: center;
    gap: 3px;
    color: #555;
    font-size: 13px;
  }
  .mobile-tabs span { font-size: 21px; color: #555; }
  .mobile-tabs a.active { color: var(--orange); border-top: 3px solid var(--orange); }
  .mobile-tabs a.active span { color: var(--orange); }
  .mobile-tabs.has-dashboard { grid-template-columns: repeat(4, 1fr); }
  .mobile-tabs.has-dashboard a { font-size: 11px; }
  .mobile-tabs.has-dashboard span { font-size: 18px; }

  .mobile-admin-dashboard { padding: 22px 18px 104px; background: #f4f6fb; }
  .mobile-admin-top { display: grid; grid-template-columns: 44px 1fr 46px; gap: 12px; align-items: start; margin: 12px 0 16px; }
  .mobile-admin-top .icon-btn { width: 44px; height: 44px; border: 0; background: transparent; font-size: 32px; color: var(--text); }
  .mobile-admin-top span { display: inline-block; color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
  .mobile-admin-top h1 { margin: 0; color: var(--text); font-size: 30px; font-weight: 800; }
  .mobile-admin-top p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
  .mobile-admin-refresh { width: 44px; height: 44px; display: grid; place-items: center; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 14px; font-size: 26px; box-shadow: 0 8px 18px rgba(15,23,42,.08); text-decoration: none; }
  .mobile-admin-filter { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; padding: 12px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 10px 24px rgba(15,23,42,.06); }
  .mobile-admin-filter label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
  .mobile-admin-filter input { min-height: 42px; border: 1px solid var(--border); border-radius: 11px; padding: 0 10px; }
  .mobile-admin-filter button { grid-column: 1 / -1; min-height: 44px; border-radius: 12px; }
  .mobile-admin-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 14px 0; }
  .mobile-admin-card { min-height: 124px; display: grid; align-content: space-between; gap: 8px; padding: 16px; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 12px 26px rgba(15,23,42,.08); text-decoration: none; }
  .mobile-admin-card.wide { grid-column: 1 / -1; }
  .mobile-admin-card span { color: var(--muted); font-weight: 700; font-size: 13px; }
  .mobile-admin-card strong { font-size: 25px; line-height: 1.1; color: var(--text); }
  .mobile-admin-card small { color: #94a3b8; font-weight: 700; }
  .mobile-admin-card.green strong { color: #16a34a; }
  .mobile-admin-card.blue strong { color: #1d4ed8; }
  .mobile-admin-card.orange strong { color: #f97316; }
  .mobile-admin-card.yellow strong { color: #ca8a04; }
  .mobile-admin-card.slate strong { color: #475569; }
  .mobile-admin-card.red { background: linear-gradient(180deg,#fff,#fff5f5); border-color: #fecaca; }
  .mobile-admin-card.red strong { color: #b91c1c; }
  .mobile-admin-panel { margin-top: 14px; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 12px 26px rgba(15,23,42,.08); }
  .mobile-panel-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
  .mobile-panel-title h2 { margin: 0; font-size: 20px; }
  .mobile-panel-title a { color: var(--orange); font-weight: 800; }
  .mobile-mini-chart { min-height: 170px; display: flex; align-items: end; gap: 14px; overflow-x: auto; padding: 10px 2px 4px; }
  .mobile-mini-chart div { min-width: 56px; display: grid; justify-items: center; gap: 7px; }
  .mobile-mini-chart strong { color: var(--text); font-size: 11px; }
  .mobile-mini-chart span { width: 32px; border-radius: 12px 12px 5px 5px; background: linear-gradient(180deg,#fb923c,#f47c20); }
  .mobile-mini-chart small { color: var(--muted); font-weight: 700; }
  .mobile-ranking { list-style: none; display: grid; gap: 10px; padding: 0; margin: 0; }
  .mobile-ranking li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: #f8fafc; }
  .mobile-ranking li > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: #fff7ed; color: var(--orange); font-weight: 800; }
  .mobile-ranking strong { display: block; color: var(--text); font-size: 14px; }
  .mobile-ranking small { color: var(--muted); }
  .mobile-ranking li.mobile-empty, .mobile-empty { display: block; text-align: center; color: var(--muted); padding: 18px; }
    .mobile-delivery-title {
      grid-template-columns: 44px minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      margin-top: 34px;
    }
    .mobile-delivery-title h1 {
      min-width: 0;
      font-size: 38px;
      line-height: 1;
    }
    .mobile-delivery-title a {
      white-space: nowrap;
      font-size: 22px;
      color: var(--text);
    }
    .delivery-summary {
      display: grid;
      gap: 4px;
      margin: 16px 0 24px;
    }
    .delivery-summary span {
      color: var(--muted);
      font-size: 17px;
    }
    .delivery-summary strong {
      color: var(--text);
      font-size: 15px;
    }
    .mobile-filter {
      width: 150px;
      margin: 8px 0 24px;
    }
  .mobile-filter select {
    min-height: 54px;
    border-radius: 999px;
    font-size: 18px;
  }
  .mobile-delivery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
      column-gap: 22px;
      row-gap: 30px;
      padding-bottom: 120px;
    }
    .mobile-delivery-card {
      min-height: 176px;
      display: grid;
      justify-items: center;
      align-content: start;
      color: var(--text);
      text-align: center;
      text-decoration: none;
    }
    .mobile-delivery-card .delivery-house {
      transform: scale(.9);
      transform-origin: center top;
      margin-bottom: 0;
    }
    .mobile-delivery-card strong {
      min-width: 76px;
      margin-top: -16px;
    padding: 4px 14px;
    border: 1px solid #cfcfcf;
    border-radius: 999px;
    background: #fff;
    text-align: center;
    font-size: 24px;
    font-weight: 400;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    z-index: 1;
  }
    .mobile-delivery-card small {
      max-width: 130px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: var(--muted);
      margin-top: 8px;
    }
    .mobile-delivery-card .online-order-badge {
      max-width: 132px;
      margin-top: 6px;
      transform: scale(.86);
      transform-origin: center;
    }
    .mobile-delivery-card em {
      color: var(--green);
      font-style: normal;
      font-size: 20px;
      font-weight: 800;
      margin-top: 6px;
    }
  }

@media print {
  @page {
    size: 80mm auto;
    margin: 0;
  }
  .sidebar, .topbar, .no-print { display: none !important; }
  .app-main { margin: 0; padding: 0; }
  body { background: #fff; }
  .print-page { padding: 0; }
  .receipt { width: 72mm; padding: 1mm 1.5mm; }
}

.auto-print-frame {
  position: fixed;
  width: 0;
  height: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.dashboard-shell {
  display: grid;
  gap: 18px;
}

.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #dfe4ea;
  box-shadow: 0 10px 26px rgba(24,39,75,.07);
}

.dashboard-topbar h1 {
  margin: 2px 0 4px;
  font-size: 34px;
}

.dashboard-topbar p {
  margin: 0;
  color: var(--muted);
}

.dashboard-filter {
  display: flex;
  align-items: end;
  gap: 10px;
}

.dashboard-filter label {
  margin: 0;
  color: var(--muted);
}

.dashboard-filter input {
  min-width: 150px;
}

.dash-card-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dash-stat {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  padding: 16px 18px;
  border-radius: 6px;
  color: #fff;
  box-shadow: 0 10px 22px rgba(24,39,75,.16);
}

.dash-stat::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 12px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(0,0,0,.12);
}

.dash-stat span,
.dash-stat strong,
.dash-stat small {
  position: relative;
  z-index: 1;
}

.dash-stat span {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.dash-stat strong {
  display: block;
  margin-top: 20px;
  font-size: 30px;
  line-height: 1;
}

.dash-stat small {
  display: block;
  margin-top: 16px;
  font-weight: 700;
  opacity: .9;
  text-align: right;
}

.dash-stat.blue { background: linear-gradient(135deg, #08a3df, #087bb0); }
.dash-stat.green { background: linear-gradient(135deg, #09b567, #058b48); }
.dash-stat.red { background: linear-gradient(135deg, #ff5148, #d93830); }
.dash-stat.orange { background: linear-gradient(135deg, #ff9d16, #f47c20); }

.dash-board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
  gap: 14px;
}

.dash-panel {
  min-height: 360px;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid #dfe4ea;
  background: #fff;
  box-shadow: 0 10px 26px rgba(24,39,75,.07);
}

.dash-panel-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 18px;
}

.dash-panel-title h2 {
  margin: 0;
  font-size: 22px;
}

.dash-panel-title span {
  color: var(--muted);
  font-size: 13px;
}

.dash-bars {
  min-height: 280px;
  display: flex;
  align-items: end;
  gap: 16px;
  padding: 24px 10px 8px;
  border-top: 1px solid #eef1f5;
}

.dash-bar {
  min-width: 54px;
  flex: 1;
  display: grid;
  justify-items: center;
  align-items: end;
  gap: 7px;
}

.dash-bar strong {
  color: #587086;
  font-size: 11px;
  font-weight: 800;
}

.dash-bar span {
  width: 28px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #16c7c2, #087d87);
}

.dash-bar small {
  color: #687385;
  font-weight: 700;
}

.dash-table th {
  color: #5d6b7d;
  font-size: 12px;
  text-transform: uppercase;
}

.dash-table td {
  font-size: 14px;
}

.tabs-line {
  display: flex;
  gap: 8px;
  margin: -8px 0 18px;
}

.tabs-line a {
  padding: 10px 14px;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.tabs-line a.active {
  border-color: var(--orange);
  background: #fff7ed;
  color: var(--orange);
  font-weight: 800;
}

.timeline-list {
  display: grid;
  gap: 10px;
}

.timeline-list article {
  padding: 12px;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  background: #f8fafc;
}

.timeline-list span,
.timeline-list small {
  display: block;
}

@media (max-width: 1120px) {
  .dash-card-row,
  .dash-board-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .dashboard-topbar,
  .dashboard-filter {
    display: grid;
    align-items: stretch;
  }

  .dash-card-row,
  .dash-board-grid {
    grid-template-columns: 1fr;
  }
}

/* Dashboard gerencial */
.dash-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid rgba(243, 244, 246, .95);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #f97316;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}

.dash-head h1 {
  margin: 0;
  font-size: 30px;
  color: #111827;
}

.dash-head p {
  margin: 6px 0 0;
  color: #6b7280;
}

.dash-head .header-filter {
  display: flex;
  gap: 10px;
  align-items: end;
  background: #fff;
  padding: 14px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

.dash-head .header-filter label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

.dash-head .header-filter input {
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 10px;
}

.modern-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.modern-metrics article {
  background: linear-gradient(180deg, #fff, #fff7ed);
  border: 1px solid #fed7aa;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
  min-height: 126px;
}

.modern-metrics article::after {
  display: none;
}

.modern-metrics article span {
  display: block;
  font-size: 13px;
  color: #6b7280;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: none;
  letter-spacing: 0;
}

.modern-metrics article strong {
  display: block;
  font-size: 24px;
  color: #111827;
}

.modern-metrics article small {
  display: block;
  margin-top: 8px;
  color: #9ca3af;
}

.modern-metrics article.danger {
  background: linear-gradient(180deg, #fff, #fef2f2);
  border-color: #fecaca;
}

.modern-metrics article.danger strong {
  color: #991b1b;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.dashboard-grid .panel {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
  border: 1px solid #f3f4f6;
}

.dashboard-grid .panel-title {
  margin-bottom: 18px;
}

.dashboard-grid .panel-title h2 {
  margin: 0;
  font-size: 18px;
  color: #111827;
}

.dashboard-grid .panel-title p {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.bar-chart {
  min-height: 240px;
  display: flex;
  align-items: end;
  gap: 14px;
  overflow-x: auto;
  padding: 10px 4px 0;
}

.bar-item {
  min-width: 62px;
  text-align: center;
}

.bar-item strong {
  display: block;
  font-size: 11px;
  color: #374151;
  margin-bottom: 8px;
}

.bar-item span {
  display: block;
  width: 34px;
  margin: 0 auto;
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(180deg, #fb923c, #ea580c);
}

.bar-item small {
  display: block;
  margin-top: 8px;
  color: #6b7280;
  font-weight: 600;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
}

.modern-table th {
  text-align: left;
  font-size: 12px;
  color: #6b7280;
  padding: 12px;
  background: #f9fafb;
}

.modern-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}

.modern-table td:last-child {
  color: #374151;
}

.empty-state {
    width: 100%;
    padding: 30px;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 14px;
}

/* Public online ordering */
.public-order-body {
  background: #f3f5f8;
}
.public-main {
  min-height: 100vh;
}
.online-page {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 42px;
}
.online-hero {
  min-height: 230px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 30px;
  border-radius: 22px;
  background:
    linear-gradient(120deg, rgba(7,31,48,.95), rgba(244,124,32,.78)),
    url("/uploads/products/prod_6a1882a9bed10.30045841.png");
  background-size: cover;
  background-position: center;
  color: #fff;
  box-shadow: 0 22px 50px rgba(15, 23, 42, .18);
}
.online-hero-copy {
  min-width: 0;
}
.online-hero-logo {
  display: block;
  width: 112px;
  height: 112px;
  object-fit: contain;
  margin-bottom: 18px;
  padding: 8px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .22);
}
.online-hero-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffedd5;
  margin-bottom: 6px;
}
.online-hero h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 54px);
  line-height: 1;
}
.online-hero p {
  width: min(560px, 100%);
  margin: 10px 0 0;
  color: #fff7ed;
  font-size: 17px;
}
.online-cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
}
.online-cart-pill strong {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
}
.online-customer-card,
.online-cart,
.online-empty,
.online-success {
  margin-top: 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 14px 34px rgba(24, 39, 75, .08);
}
.online-customer-card h2,
.online-cart h2,
.online-group h2 {
  margin: 0 0 14px;
  color: #111827;
}
.online-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.online-fields label {
  display: grid;
  gap: 6px;
  color: #64748b;
  font-weight: 700;
  font-size: 13px;
}
.online-fields input,
.online-fields select {
  height: 48px;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  padding: 0 12px;
  color: #111827;
  background: #fff;
}
.online-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
  margin-top: 20px;
}
.online-group {
  margin-bottom: 24px;
}
.online-products {
  display: grid;
  gap: 14px;
}
.online-product {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(24, 39, 75, .07);
}
.online-product img,
.online-photo-fallback {
  width: 138px;
  height: 108px;
  object-fit: cover;
  border-radius: 14px;
  background: #eef2f7;
}
.online-photo-fallback {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 44px;
  font-weight: 900;
  background: var(--group, #64748b);
}
.online-product h3 {
  margin: 0;
  color: #111827;
  font-size: 20px;
}
.online-product p {
  margin: 6px 0 10px;
  color: #64748b;
}
.online-product strong {
  color: #16a34a;
  font-size: 18px;
}
.online-add,
.online-btn {
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #ff7a00, #ff5b00);
  color: #fff;
  min-height: 46px;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(255, 107, 0, .24);
}
.online-cart {
  position: sticky;
  top: 18px;
}
.online-cart-items {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}
.online-cart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef2f7;
}
.online-cart-row small {
  display: block;
  color: #64748b;
  margin-top: 3px;
}
.online-cart-row button {
  grid-column: 1 / -1;
  justify-self: start;
  border: 0;
  background: transparent;
  color: #dc2626;
  padding: 0;
  cursor: pointer;
}
.online-cart-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid #e5e7eb;
  font-size: 20px;
  font-weight: 900;
}
.online-cart .online-btn {
  width: 100%;
}
.online-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow-y: auto;
  background: rgba(15, 23, 42, .55);
}
.online-modal[hidden] {
  display: none;
}
.online-modal-card {
  width: min(460px, 100%);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  padding: 22px;
  position: relative;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}
.online-modal-card h2 {
  margin: 0 0 14px;
}
.online-modal-card label {
  display: grid;
  gap: 7px;
  color: #64748b;
  font-weight: 800;
}
.online-modal-card input[type="number"] {
  height: 46px;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  padding: 0 12px;
}
.online-modal-close {
  position: absolute;
  right: 14px;
  top: 12px;
  border: 0;
  background: transparent;
  font-size: 30px;
  cursor: pointer;
}
.online-additionals {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}
.online-additional-option {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
}
.online-modal-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  font-size: 18px;
  font-weight: 900;
}
.online-success {
  max-width: 680px;
  margin: 80px auto;
  text-align: center;
}
.online-success span {
  color: #16a34a;
  font-weight: 900;
}
.online-success h1 {
  margin: 10px 0;
  font-size: 36px;
}
@media (max-width: 900px) {
  .purchases-layout,
  .online-layout,
  .online-fields {
    grid-template-columns: 1fr;
  }
  .purchase-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .purchase-row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .online-cart {
    position: static;
  }
}
@media (max-width: 620px) {
  .purchase-dashboard {
    grid-template-columns: 1fr;
  }
  .online-page {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }
  .online-hero {
    min-height: 210px;
    padding: 22px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-end;
  }
  .online-hero-logo {
    width: 86px;
    height: 86px;
    margin-bottom: 12px;
    border-radius: 16px;
  }
  .online-product {
    grid-template-columns: 94px minmax(0, 1fr);
  }
  .online-product img,
  .online-photo-fallback {
    width: 94px;
    height: 88px;
  }
  .online-add {
    grid-column: 1 / -1;
    width: 100%;
  }
  .online-modal {
    place-items: end stretch;
    padding: 0;
    overflow: hidden;
  }
  .online-modal-card {
    width: 100%;
    height: min(92dvh, 92vh);
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px 22px 0 0;
    padding: 16px 14px calc(16px + env(safe-area-inset-bottom));
  }
  .online-modal-card h2 {
    flex: 0 0 auto;
    max-width: calc(100% - 42px);
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.2;
  }
  .online-modal-card > label {
    flex: 0 0 auto;
    font-size: 12px;
  }
  .online-modal-card input[type="number"] {
    height: 42px;
    border-radius: 10px;
  }
  .online-modal-close {
    right: 12px;
    top: 9px;
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    font-size: 26px;
    line-height: 1;
  }
  .online-additionals {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 10px -2px 10px 0;
    padding-right: 4px;
    gap: 10px;
  }
  .online-additionals .additional-category {
    padding: 10px;
    border-radius: 14px;
  }
  .online-additionals .additional-category h3 {
    margin-bottom: 8px;
    font-size: 12px;
  }
  .online-additional-option {
    min-height: 48px;
    padding: 10px;
    border-radius: 10px;
    font-size: 12px;
  }
  .online-additional-option input[type="checkbox"] {
    width: 22px;
    height: 22px;
  }
  .online-additional-option strong {
    font-size: 11px;
  }
  .online-modal-total {
    flex: 0 0 auto;
    margin: 8px 0 10px;
    padding-top: 10px;
    font-size: 16px;
  }
  .online-modal-card > .online-btn {
    flex: 0 0 auto;
    width: 100%;
    min-height: 52px;
  }
}

.delivery-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  margin: 0 0 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.delivery-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 800;
}
.delivery-tabs a.active {
  color: var(--text);
  background: #fff7ed;
}
.delivery-tabs strong {
  color: var(--orange);
}
.counter-tabs {
  display: flex;
  width: max-content;
  margin: 0;
}
.counter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px 14px;
  margin-bottom: 12px;
}
.counter-filter-total {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 10px 14px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff7ed;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.counter-filter-total-toggle {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(244, 124, 32, .35);
  border-radius: 12px;
  background: #fff;
  color: var(--orange);
  cursor: pointer;
}
.counter-filter-total-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.counter-filter-total-toggle .icon-hidden,
.counter-filter-total.is-hidden .counter-filter-total-toggle .icon-visible {
  display: none;
}
.counter-filter-total.is-hidden .counter-filter-total-toggle .icon-hidden {
  display: block;
}
.counter-filter-total div {
  display: grid;
  gap: 2px;
  min-width: 142px;
}
.counter-filter-total span,
.counter-filter-total small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.counter-filter-total strong {
  color: #15803d;
  font-size: 24px;
  line-height: 1;
  white-space: nowrap;
}
.counter-filter-total [data-counter-filter-total-hidden],
.counter-filter-total.is-hidden [data-counter-filter-total-value] {
  display: none;
}
.counter-filter-total.is-hidden [data-counter-filter-total-hidden] {
  display: inline;
  color: var(--ink);
}
.page-head.counter-page-head {
  min-height: 0;
  padding: 20px 28px;
  margin-bottom: 12px;
}
.page-head.counter-page-head h1 {
  margin-bottom: 3px;
  font-size: 34px;
}
.page-head.counter-page-head p {
  margin: 0;
  font-size: 14px;
}
.counter-filter {
  flex: 1;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.counter-filter label {
  gap: 3px;
  font-size: 12px;
}
.counter-filter input {
  min-height: 42px;
}
.counter-filter input[type="search"] {
  min-width: 260px;
}
.counter-search-field {
  flex: 1;
  min-width: 240px;
}
.counter-filter .btn {
  min-height: 42px;
  padding: 0 18px;
}
.counter-panel {
  padding: 12px 16px;
}
.counter-sales-panel .table-wrap {
  max-height: 330px;
  overflow: auto;
  padding-right: 4px;
}
.counter-sales-panel .modern-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
@media (min-height: 900px) {
  .counter-sales-panel .table-wrap {
    max-height: 390px;
  }
}
.counter-panel .modern-table {
  width: 100%;
  min-width: 1060px;
  font-size: 12px;
}
.counter-panel .modern-table th,
.counter-panel .modern-table td {
  padding: 8px 10px;
  line-height: 1.2;
}
.counter-panel tbody tr[data-counter-sale-row] {
  cursor: pointer;
}
.counter-panel tbody tr[data-counter-sale-row]:focus {
  outline: 2px solid #93c5fd;
  outline-offset: -2px;
}
.counter-panel tbody tr[data-counter-sale-row].is-selected {
  background: #eff6ff;
  box-shadow: inset 3px 0 0 #2563eb;
}
.counter-panel .actions-cell {
  gap: 5px;
  flex-wrap: nowrap;
  min-width: 500px;
}
.counter-panel .fiscal-status-pill {
  min-height: 30px;
  padding: 5px 8px;
  gap: 5px;
  font-size: 11px;
  border-radius: 7px;
}
.counter-panel .fiscal-status-icon {
  width: 16px;
  height: 16px;
  font-size: 11px;
}
.counter-panel .counter-icon-action {
  width: 48px;
  min-height: 36px;
  border-radius: 7px;
}
.counter-panel .counter-icon-action svg {
  width: 16px;
  height: 16px;
}
.counter-panel .counter-icon-action span {
  font-size: 9px;
}
.counter-items-detail {
  margin-top: 12px;
  padding: 14px 16px;
}
.counter-items-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 10px;
}
.counter-items-detail-head div {
  display: grid;
  gap: 2px;
}
.counter-items-detail-head span,
.counter-items-detail-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.counter-items-detail-head strong {
  font-size: 20px;
}
.counter-items-grid {
  display: none;
}
.counter-items-grid.active {
  display: block;
}
.counter-items-grid-head,
.counter-items-grid-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 120px 110px 120px;
  gap: 10px;
  align-items: center;
}
.counter-items-grid-head {
  padding: 9px 12px;
  border-radius: 8px;
  background: #f6f8fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.counter-items-grid-row {
  padding: 9px 12px;
  border-bottom: 1px solid #edf1f5;
  font-size: 13px;
}
.counter-items-grid-row strong {
  font-size: 13px;
}
.counter-items-grid-row .counter-item-discount {
  display: block;
  grid-column: auto;
  grid-row: auto;
  margin-top: 3px;
}
.counter-items-grid-row .counter-item-discount-amount {
  color: #dc2626;
}
.counter-items-grid-row span:not(:first-child) {
  font-weight: 700;
}
.counter-items-adjustments {
  width: min(420px, 100%);
  margin: 10px 0 0 auto;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid #e5e7eb;
  color: #475569;
  font-size: 13px;
}
.counter-items-adjustments div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.counter-items-adjustments strong {
  color: #0f172a;
  white-space: nowrap;
}
.counter-items-adjustments .discount span,
.counter-items-adjustments .discount strong {
  color: #dc2626;
}
.counter-items-adjustments .total {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #dbe4ef;
  font-size: 15px;
  font-weight: 900;
}
.counter-items-adjustments .total strong {
  color: #15803d;
}
.counter-items-empty {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 13px;
}
.actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.counter-icon-action {
  width: 58px;
  min-height: 44px;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
  place-items: center;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}
.counter-icon-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.counter-icon-action span {
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.counter-icon-action.view {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.counter-icon-action.print,
.counter-icon-action.nf-print {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}
.counter-icon-action.xml {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}
.counter-icon-action.pdf {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}
.counter-icon-action.email {
  background: #ecfeff;
  border-color: #a5f3fc;
  color: #0e7490;
}
.counter-icon-action.delete,
.counter-icon-action.danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #dc2626;
}
.counter-icon-action:disabled {
  cursor: not-allowed;
  opacity: .5;
  transform: none;
  box-shadow: none;
}
.counter-icon-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .10);
}
.delivery-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}
.sales-filter label {
  min-width: 180px;
}
.sales-toolbar .sales-filter {
  flex: 1;
  margin: 0;
}
.sales-toolbar .sales-filter label {
  gap: 3px;
  font-size: 12px;
}
.sales-toolbar .sales-filter select,
.sales-toolbar .sales-filter input {
  min-height: 42px;
}
.bulk-fiscal-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin: 14px 0 16px;
  padding: 14px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
}
.bulk-fiscal-form p {
  margin: 5px 0 10px;
}
.bulk-fiscal-form .btn {
  white-space: nowrap;
}
.bulk-fiscal-form .check {
  margin: 0;
  min-height: 38px;
}
.bulk-check-cell {
  width: 42px;
  text-align: center;
}
.bulk-check-cell input {
  width: 18px;
  height: 18px;
  accent-color: #f97316;
}
.delivery-filter label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}
.counter-toolbar .counter-filter {
  flex: 1;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.counter-toolbar .counter-filter label {
  gap: 3px;
  font-size: 12px;
}
.counter-toolbar .counter-search-field {
  flex: 1;
  min-width: 240px;
}
.counter-toolbar .counter-filter input[type="search"] {
  min-width: 260px;
}
.delivery-card-shell {
  position: relative;
  min-width: 0;
}
.delivery-card-shell .delivery-card {
  min-height: 100%;
}
.delivery-card-shell.completed {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 330px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--orange);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(24,39,75,.06);
}
.delivery-card-shell.completed.pronto { border-left-color: var(--blue); }
.delivery-card-shell.completed.saiu { border-left-color: #7c3aed; }
.delivery-card-shell.completed.entregue { border-left-color: var(--green); }
.delivery-card-shell.completed .delivery-card {
  flex: 1 1 auto;
  min-height: 230px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.delivery-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.delivery-card-actions .inline-form {
  display: contents;
}
.delivery-card-actions .btn {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  justify-content: center;
  font-size: 12px;
}
.delivery-delete-form {
  position: absolute;
  right: 10px;
  top: 10px;
}
.delivery-card-shell .icon-danger {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}
.delivery-card-shell .delivery-trash-action {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
}
.delivery-card-shell .delivery-trash-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-danger {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff;
  color: #dc2626;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.delivery-closed-at {
  grid-column: 2;
  color: var(--muted);
}

.online-success {
  width: min(100%, 680px);
  padding: 34px 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .10);
  overflow: hidden;
}
.online-success-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.online-success .online-btn {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  line-height: 1.15;
}

.modern-metrics {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.modern-metrics article.success {
  background: linear-gradient(180deg, #fff, #ecfdf5);
  border-color: #bbf7d0;
}
.modern-metrics article.success strong {
  color: #15803d;
}
.modern-metrics article.warning {
  background: linear-gradient(180deg, #fff, #eff6ff);
  border-color: #bfdbfe;
}
.modern-metrics article.warning strong {
  color: #1d4ed8;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.settings-layout .form-panel {
  max-width: none;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px 22px;
  padding: 26px;
}
.settings-layout .form-panel h2 {
  margin: 10px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  border: 1px solid #fed7aa;
  color: #0f172a;
}
.settings-layout .form-panel > p.muted {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
}
.settings-layout .panel:not(.form-panel) {
  margin-top: 18px;
}
.store-hour-row {
  grid-template-columns: minmax(110px, 1fr) 120px minmax(120px, 1fr) minmax(120px, 1fr);
}
.settings-layout .form-panel .delivery-neighborhoods-head .btn {
  grid-column: auto;
}
.delivery-neighborhoods {
  padding: 18px;
}
.delivery-neighborhood-list {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 12px;
}
.delivery-neighborhood-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 14px;
  align-items: start;
  padding: 14px;
  border-color: #e5e7eb;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .04);
}
.delivery-neighborhood-row b {
  justify-self: end;
  font-size: 17px;
}
.delivery-neighborhood-row .delivery-neighborhood-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}
.settings-layout .form-panel .delivery-neighborhood-actions .btn {
  grid-column: auto;
  flex: 1;
  min-height: 34px;
}

.settings-layout .form-panel {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  align-items: end;
}
.settings-layout .form-panel > h2,
.settings-layout .form-panel > p.muted,
.settings-layout .form-panel > .check,
.settings-layout .form-panel > .delivery-neighborhoods,
.settings-layout .form-panel > .online-appearance-settings,
.settings-layout .form-panel > .store-hours,
.settings-layout .form-panel > .product-form-grid,
.settings-layout .form-panel > .issuer-logo-preview,
.settings-layout .form-panel > .btn {
  grid-column: 1 / -1;
}
.settings-field {
  justify-self: start;
  width: 100%;
  max-width: 100%;
}
.settings-field-xs { max-width: 150px; }
.settings-field-sm { max-width: 230px; }
.settings-field-md { max-width: 360px; }
.settings-field-lg { max-width: 560px; }
.settings-field input,
.settings-field select {
  width: 100%;
}
.store-hours {
  max-width: 760px;
}
.store-hour-row {
  grid-template-columns: 112px 96px 116px 116px;
  width: fit-content;
  max-width: 100%;
}
.store-hour-row label {
  min-width: 0;
}
.store-hour-row input[type="time"] {
  width: 116px;
}
.store-hour-row .compact-check {
  width: 96px;
}
.settings-layout .product-form-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  align-items: end;
}
.settings-layout .product-form-grid .wide {
  grid-column: span 2;
}
.settings-layout input[name="issuer_uf"],
.settings-layout input[name="issuer_address_number"] {
  max-width: 120px;
}
.online-appearance-settings {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: 16px;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  background: #f8fafc;
}
.online-appearance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.online-appearance-head h3 {
  margin: 0;
  color: #0f172a;
}
.online-appearance-head img {
  width: 220px;
  aspect-ratio: 16 / 5.2;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}
.online-appearance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.online-appearance-grid label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}
.online-appearance-grid .wide {
  grid-column: span 3;
}
.online-appearance-grid input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}
.online-appearance-grid input[type="file"] {
  padding: 8px;
}
.online-appearance-grid small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .online-success {
    margin: 42px auto;
    padding: 28px 18px;
  }
  .online-success h1 {
    font-size: 36px;
    line-height: 1.16;
  }
  .online-success-actions {
    grid-template-columns: 1fr;
  }
  .delivery-tabs,
  .delivery-filter {
    width: 100%;
  }
  .delivery-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .settings-layout .form-panel,
  .settings-layout .product-form-grid,
  .store-hour-row {
    grid-template-columns: 1fr;
  }
  .settings-field,
  .settings-field-xs,
  .settings-field-sm,
  .settings-field-md,
  .settings-field-lg,
  .store-hours,
  .store-hour-row,
  .store-hour-row input[type="time"],
  .store-hour-row .compact-check {
    width: 100%;
    max-width: 100%;
  }
  .settings-layout .product-form-grid .wide {
    grid-column: auto;
  }
  .online-appearance-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .online-appearance-head img {
    width: 100%;
  }
  .online-appearance-grid {
    grid-template-columns: 1fr;
  }
  .online-appearance-grid .wide {
    grid-column: auto;
  }
  .delivery-neighborhoods-head,
  .delivery-neighborhood-row {
    grid-template-columns: 1fr;
  }
  .delivery-neighborhoods-head .btn,
  .delivery-neighborhood-actions .btn {
    width: 100%;
  }
  .delivery-neighborhood-row b {
    justify-self: start;
  }
}

/* Settings tabs */
.settings-layout .settings-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}
.settings-form .settings-tab-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.settings-tabs {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}
.settings-tabs label {
  flex: 0 0 auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  color: #475569;
  background: #f8fafc;
  font-weight: 800;
  cursor: pointer;
}
#settings-tab-issuer:checked ~ .settings-tabs label[for="settings-tab-issuer"],
#settings-tab-restaurant:checked ~ .settings-tabs label[for="settings-tab-restaurant"],
#settings-tab-print:checked ~ .settings-tabs label[for="settings-tab-print"],
#settings-tab-integrations:checked ~ .settings-tabs label[for="settings-tab-integrations"],
#settings-tab-general:checked ~ .settings-tabs label[for="settings-tab-general"] {
  color: #fff;
  border-color: var(--orange);
  background: var(--orange);
  box-shadow: 0 10px 20px rgba(244, 124, 32, .16);
}
.settings-tab-panels {
  grid-column: 1 / -1;
  padding: 18px;
  background: #f8fafc;
}
.settings-tab-panel {
  display: none;
  gap: 16px;
}
#settings-tab-issuer:checked ~ .settings-tab-panels [data-settings-panel="issuer"],
#settings-tab-restaurant:checked ~ .settings-tab-panels [data-settings-panel="restaurant"],
#settings-tab-print:checked ~ .settings-tab-panels [data-settings-panel="print"],
#settings-tab-integrations:checked ~ .settings-tab-panels [data-settings-panel="integrations"],
#settings-tab-general:checked ~ .settings-tab-panels [data-settings-panel="general"] {
  display: grid;
}
.settings-section-head,
.settings-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #fff;
}
.settings-section-head {
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  border-color: #fed7aa;
}
.settings-layout .settings-form .settings-section-head h2,
.settings-layout .settings-form .settings-card h3,
.settings-layout .settings-form .settings-card h4 {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0f172a;
}
.settings-layout .settings-form .settings-section-head p,
.settings-layout .settings-form .settings-card p.muted {
  margin: 0;
}
.settings-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
}
.settings-card-grid label,
.settings-card label {
  min-width: 0;
}
.settings-wide {
  grid-column: 1 / -1;
}
.online-payment-settings {
  display: grid;
  gap: 10px;
}
.online-payment-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #f8fafc;
}
.online-payment-options .check {
  margin: 0;
}
.print-test-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.print-test-actions .btn {
  width: auto;
}
.print-diagnostic-box {
  display: grid;
  gap: 4px;
  margin-top: 2px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  padding: 12px 14px;
  color: #7f1d1d;
}
.print-diagnostic-box strong {
  color: #991b1b;
}
.print-diagnostic-box span {
  color: #9f1239;
  font-size: 13px;
  font-weight: 800;
}
.print-diagnostic-box p {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}
.settings-layout .settings-form .product-form-grid,
.settings-layout .settings-form .online-appearance-settings,
.settings-layout .settings-form .delivery-neighborhoods,
.settings-layout .settings-form .store-hours,
.settings-layout .settings-form .issuer-logo-preview {
  grid-column: auto;
}
.settings-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding: 14px 18px 18px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}
.settings-actions .btn {
  min-width: 230px;
}
.settings-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.integration-card {
  align-content: start;
}

.integration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.integration-grid .settings-card {
  margin: 0;
}

.integration-card-featured {
  grid-column: 1 / -1;
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.provider-card {
  position: relative;
  overflow: hidden;
}

.provider-card::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -42px;
  width: 116px;
  height: 116px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  pointer-events: none;
}

.provider-card-itau::after {
  background: rgba(249, 115, 22, 0.12);
}

.provider-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.provider-mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #fff;
  background: #2563eb;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.18);
}

.provider-mark.itau {
  background: #f97316;
  box-shadow: 0 12px 22px rgba(249, 115, 22, 0.2);
}

.integration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.provider-card-disabled {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  opacity: 0.82;
  background: #f8fafc;
}

.integration-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #9a3412;
  background: #fff7ed;
  font-size: 13px;
  font-weight: 900;
}

.integration-status.active {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

@media (max-width: 980px) {
  .integration-grid {
    grid-template-columns: 1fr;
  }
}
.database-check-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #f8fafc;
}
.database-check-summary strong,
.database-check-summary span {
  display: block;
}
.database-check-summary span {
  margin-top: 3px;
  color: #64748b;
  font-size: 14px;
}
.database-check-summary.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.database-check-summary.warning {
  border-color: #fed7aa;
  background: #fff7ed;
}
.database-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.database-check-list span {
  padding: 6px 10px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
}
.database-check-table table {
  width: 100%;
  border-collapse: collapse;
}
.database-check-table th,
.database-check-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}
.database-check-table th {
  color: #64748b;
  font-size: 13px;
  text-transform: uppercase;
}
.database-check-table code {
  white-space: normal;
  color: #334155;
}
.database-check-errors {
  display: grid;
  gap: 8px;
}
.database-check-errors div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
}
.updates-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  align-items: start;
  gap: 18px;
  min-width: 0;
}
.update-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.update-command-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.update-command-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.update-command-actions form {
  margin: 0;
}
.update-command-actions .btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
}
.update-card,
.update-preview,
.update-result {
  display: grid;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
}
.update-card-head,
.update-preview-head,
.update-actions,
.update-counters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}
.update-card h2,
.update-preview h2,
.update-result h2,
.update-sql-list h3,
.update-result h3 {
  margin: 0;
}
.update-settings-form,
.update-select-form,
.update-apply-form {
  display: grid;
  gap: 14px;
}
.update-select-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.update-settings-form input,
.update-select-form select {
  width: 100%;
}
.update-manifest-example {
  width: 100%;
  min-width: 0;
  max-height: 280px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 13px;
}
.update-preview-head {
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
  align-items: flex-start;
}
.update-preview-head > div:first-child > span {
  color: #f97316;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
}
.update-counters div {
  min-width: 112px;
  padding: 12px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #f8fafc;
}
.update-counters strong,
.update-counters span {
  display: block;
}
.update-counters strong {
  color: #0f172a;
  font-size: 26px;
}
.update-counters span {
  color: #64748b;
}
.update-compare-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sync-status-pill.pending {
  color: #1d4ed8;
  background: #dbeafe;
  border-color: #bfdbfe;
}
.sync-status-pill.warning {
  color: #b45309;
  background: #fff7ed;
  border-color: #fed7aa;
}
.update-notes {
  margin: 0;
  padding: 14px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
}
.update-file-table table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.update-file-table th,
.update-file-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.update-file-table th:first-child,
.update-file-table td:first-child {
  width: 32%;
}
.update-file-table th:nth-child(2),
.update-file-table td:nth-child(2) {
  width: 32%;
}
.update-file-table th:nth-child(3),
.update-file-table td:nth-child(3) {
  width: 18%;
}
.update-file-table th:last-child,
.update-file-table td:last-child {
  width: 18%;
}
.update-file-table th {
  color: #64748b;
  font-size: 13px;
  text-transform: uppercase;
}
.update-catalog-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}
.update-catalog-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}
.update-catalog-item.selected {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.update-catalog-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.update-catalog-version {
  color: #0f172a;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.update-catalog-version:hover {
  color: #f97316;
}
.update-catalog-date {
  color: #64748b;
  font-size: 13px;
}
.update-catalog-notes {
  margin: 0;
  color: #334155;
  line-height: 1.35;
}
.update-catalog-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  white-space: nowrap;
}
.update-catalog-meta .btn {
  padding: 9px 14px;
}
.update-history-table table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}
.update-history-table th,
.update-history-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: middle;
}
.update-history-table th {
  color: #64748b;
  font-size: 13px;
  text-transform: uppercase;
}
.update-history-table th:nth-child(1),
.update-history-table td:nth-child(1) {
  width: 130px;
  white-space: nowrap;
}
.update-history-table th:nth-child(2),
.update-history-table td:nth-child(2) {
  width: 130px;
  white-space: nowrap;
}
.update-history-table th:nth-child(3),
.update-history-table td:nth-child(3) {
  width: 150px;
}
.update-history-table th:nth-child(4),
.update-history-table td:nth-child(4),
.update-history-table th:nth-child(5),
.update-history-table td:nth-child(5) {
  width: 82px;
  white-space: nowrap;
}
.update-history-table th:nth-child(6),
.update-history-table td:nth-child(6) {
  width: 140px;
}
.update-backup-path small {
  display: block;
  max-width: 420px;
  overflow: hidden;
  color: #64748b;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.update-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}
.update-status-same {
  color: #047857;
  background: #dcfce7;
}
.update-status-different {
  color: #1d4ed8;
  background: #dbeafe;
}
.update-status-missing {
  color: #b45309;
  background: #fff7ed;
}
.update-status-remote_error {
  color: #991b1b;
  background: #fee2e2;
}
.update-sql-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.update-sql-list h3,
.update-sql-list p {
  flex-basis: 100%;
}
.update-sql-list span {
  padding: 6px 10px;
  border: 1px solid #dbe5f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  overflow-wrap: anywhere;
}

@media (max-width: 960px) {
  .settings-card-grid,
  .settings-layout .settings-form .product-form-grid,
  .settings-layout .settings-form .online-appearance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-layout .settings-form .online-appearance-grid .wide {
    grid-column: span 2;
  }
  .updates-layout {
    grid-template-columns: 1fr;
  }
  .update-command-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .update-command-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .settings-tabs {
    padding: 10px;
  }
  .settings-tabs label {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 14px;
  }
  .settings-tab-panels {
    padding: 12px;
  }
  .settings-section-head,
  .settings-card {
    padding: 14px;
  }
  .settings-card-grid,
  .settings-layout .settings-form .product-form-grid,
  .settings-layout .settings-form .online-appearance-grid {
    grid-template-columns: 1fr;
  }
  .settings-layout .settings-form .product-form-grid .wide,
  .settings-layout .settings-form .online-appearance-grid .wide {
    grid-column: auto;
  }
  .settings-actions {
    justify-content: stretch;
    padding: 12px;
  }
  .settings-actions .btn {
    width: 100%;
    min-width: 0;
  }
  .settings-card-title-row,
  .database-check-summary {
    align-items: stretch;
    flex-direction: column;
  }
  .update-card-head,
  .update-preview-head,
  .update-actions,
  .update-select-form,
  .update-counters,
  .update-catalog-item {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }
  .update-catalog-meta {
    align-items: stretch;
    flex-direction: column;
    white-space: normal;
  }
  .update-actions .btn,
  .update-command-actions .btn,
  .update-apply-form .btn,
  .update-catalog-meta .btn {
    width: 100%;
  }
  .update-command-actions form {
    width: 100%;
  }
}

/* Cashier professional layout */
.pdv-screen {
  min-height: calc(100vh - 90px);
  display: block;
  background: #f4f7fb;
  border-radius: 0;
  padding: 28px 32px;
}
.pdv-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0;
}
.pdv-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.pdv-header-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, #061a32, #0b3b5a);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(7, 27, 51, .22);
  flex: 0 0 auto;
}
.pdv-header h1 {
  margin: 0;
  color: #0f172a;
  font-size: 34px;
  line-height: 1.05;
  font-weight: 900;
}
.pdv-header p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 15px;
}
.pdv-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 24px;
  align-items: stretch;
}
.pdv-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
  overflow: hidden;
}
.pdv-form-card {
  padding: 28px;
}
.pdv-customer {
  margin-bottom: 22px;
  border-radius: 14px;
  border-color: #dbeafe;
  background: #f8fbff;
}
.pdv-field {
  display: block;
  margin-bottom: 24px;
}
.pdv-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}
.pdv-step {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #eef6ff;
  color: #0d4f8b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
}
.pdv-input-wrap {
  display: grid !important;
  grid-template-columns: 58px 64px 1fr 58px;
  align-items: center;
  width: 100%;
  height: 58px;
  border: 1px solid #d7e0ea;
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
  transition: .18s ease;
  margin: 0;
}
.pdv-input-wrap.select-wrap {
  grid-template-columns: 58px 1fr;
}
.pdv-input-wrap:focus-within {
  border-color: #ff6b00;
  box-shadow: 0 0 0 4px rgba(255, 107, 0, .10);
}
.pdv-icon,
.pdv-prefix,
.pdv-suffix {
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #e2e8f0;
  color: #0f172a;
  background: #f8fafc;
  font-weight: 900;
}
.pdv-icon {
  font-size: 22px;
}
.pdv-icon.discount {
  color: #ff6b00;
  background: #fff1e8;
}
.pdv-icon.money {
  color: #16a34a;
  background: #eafaf0;
}
.pdv-prefix {
  background: #fff;
  font-size: 15px;
  color: #334155;
}
.pdv-suffix {
  border-right: 0;
  border-left: 1px solid #e2e8f0;
}
.pdv-input-wrap select,
.pdv-input-wrap input {
  width: 100%;
  height: 58px;
  min-width: 0;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  padding: 0 16px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
  box-shadow: none !important;
}
.check.pdv-check {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: -8px 0 26px;
  color: #64748b;
  font-size: 15px;
  cursor: pointer;
}
.check.pdv-check input {
  width: 17px;
  height: 17px;
  accent-color: #ff6b00;
}
.pdv-summary-card .pdv-summary-head {
  background: linear-gradient(135deg, #061a32, #0b3557);
  color: #fff;
  padding: 17px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 17px;
  font-weight: 900;
}
.pdv-summary-body {
  padding: 24px;
}
.pdv-summary-body .cashier-summary,
.pdv-summary-body .cashier-total {
  display: block !important;
  width: 100% !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}
.pdv-summary-top {
  background: #f8fafc !important;
  border-radius: 15px;
  padding: 18px !important;
  margin-bottom: 20px !important;
}
.pdv-line {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.2;
}
.pdv-line:last-child {
  margin-bottom: 0;
}
.pdv-line span {
  color: #475569;
}
.pdv-line strong {
  font-size: 17px;
  font-weight: 900;
  color: #0f172a;
  text-align: right;
  white-space: nowrap;
}
.pdv-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 16px 0;
}
.pdv-total-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid #e2e8f0;
  width: 100%;
}
.pdv-total-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.pdv-total-row span {
  display: grid !important;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  color: #0f172a;
  font-size: 19px;
  font-weight: 900;
  min-width: 0;
}
.pdv-total-row span b {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .12);
}
.pdv-total-row strong {
  font-size: 25px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}
.pdv-total-row.pay span b { background: linear-gradient(135deg, #1d74ff, #0d55c8); }
.pdv-total-row.received span b { background: linear-gradient(135deg, #22c55e, #12a044); }
.pdv-total-row.change span b { background: linear-gradient(135deg, #ff7a00, #ff4d00); }
.pdv-total-row.pending span b { background: linear-gradient(135deg, #ef4444, #dc2626); }
.pdv-total-row.pay strong { color: #0d63d8; }
.pdv-total-row.received strong { color: #16a34a; }
.pdv-total-row.change strong { color: #ff6b00; }
.pdv-total-row.pending strong { color: #dc2626; }
.cashier-buttons.pdv-buttons {
  margin-top: 22px;
  display: grid !important;
  grid-template-columns: 230px 1fr;
  gap: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .07);
}
.cashier-buttons.pdv-buttons .btn {
  min-height: 56px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
  border: 1px solid #d7e0ea;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  transition: .18s ease;
  width: 100%;
}
.cashier-buttons.pdv-buttons .btn.primary {
  border: 0;
  background: linear-gradient(135deg, #ff7a00, #ff5b00);
  color: #fff;
  box-shadow: 0 14px 26px rgba(255, 107, 0, .28);
}
@media (max-width: 1180px) {
  .pdv-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pdv-screen { padding: 16px; }
  .pdv-header h1 { font-size: 28px; }
  .pdv-form-card, .pdv-summary-body { padding: 18px; }
  .pdv-input-wrap { grid-template-columns: 52px 58px 1fr 52px; }
  .pdv-input-wrap.select-wrap { grid-template-columns: 52px 1fr; }
  .pdv-icon, .pdv-prefix, .pdv-suffix, .pdv-input-wrap select, .pdv-input-wrap input { height: 54px; }
  .pdv-input-wrap { height: 54px; }
  .pdv-total-row { grid-template-columns: 1fr; gap: 8px; }
  .pdv-total-row strong { text-align: left; padding-left: 64px; font-size: 23px; }
  .cashier-buttons.pdv-buttons { grid-template-columns: 1fr; }
}

@media (max-width: 1000px) {
  .modern-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dash-head {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 600px) {
  .modern-metrics {
    grid-template-columns: 1fr;
  }

  .dash-head .header-filter {
    flex-direction: column;
    align-items: stretch;
  }
}

.auth-main {
  display: block;
  min-height: 100vh;
  padding: 0;
  background:
    radial-gradient(circle at 98% 95%, rgba(255, 124, 32, .25) 0 10%, transparent 11%),
    radial-gradient(circle at 75% 6%, rgba(11, 35, 65, .08) 0 17%, transparent 18%),
    #f6f8fc;
}

.ge-login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, .88fr) minmax(520px, 1.12fr);
}

.ge-login-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 72px min(8vw, 88px);
  color: #fff;
  background:
    radial-gradient(circle at 14% 91%, rgba(255, 255, 255, .08) 0 14%, transparent 15%),
    radial-gradient(circle at 100% 10%, rgba(255, 255, 255, .08) 0 16%, transparent 17%),
    linear-gradient(145deg, #021b39 0%, #061f42 52%, #020b18 100%);
}

.ge-login-brand-panel::before {
  content: "";
  position: absolute;
  inset: auto -15% -18% -10%;
  height: 42%;
  background: rgba(255, 255, 255, .035);
  transform: rotate(-16deg);
}

.ge-login-brand-panel::after {
  content: "GE";
  position: absolute;
  left: 28px;
  bottom: 18px;
  color: rgba(255, 255, 255, .035);
  font-size: clamp(130px, 18vw, 260px);
  font-weight: 950;
  letter-spacing: -18px;
  line-height: .8;
}

.ge-login-brand-mark,
.ge-login-copy,
.ge-login-benefits,
.ge-login-secure {
  position: relative;
  z-index: 1;
}

.ge-login-brand-mark {
  display: grid;
  justify-items: center;
  align-self: center;
  margin-bottom: 62px;
}

.ge-login-brand-logo {
  display: block;
  width: min(400px, 72vw);
  height: auto;
  object-fit: contain;
}

.ge-login-brand-fallback {
  color: #fff;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  font-style: italic;
  text-align: center;
}

.ge-login-accent {
  display: block;
  width: 58px;
  height: 6px;
  margin-bottom: 28px;
  border-radius: 999px;
  background: #ff7417;
}

.ge-login-copy h1 {
  max-width: 560px;
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: -1px;
}

.ge-login-copy h1 strong {
  color: #ff7417;
}

.ge-login-copy p {
  max-width: 470px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, .86);
  font-size: 20px;
  line-height: 1.55;
}

.ge-login-benefits {
  display: grid;
  gap: 18px;
  max-width: 430px;
  margin-top: 46px;
}

.ge-login-benefits article {
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.ge-login-benefits article:last-child {
  border-bottom: 0;
}

.ge-login-benefits article > span {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 18px;
  background: rgba(21, 74, 132, .72);
}

.ge-login-benefits svg,
.ge-login-secure svg,
.ge-login-input svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ge-login-benefits svg {
  color: #ff7417;
  width: 38px;
  height: 38px;
}

.ge-login-benefits strong {
  display: block;
  margin-bottom: 7px;
  font-size: 21px;
}

.ge-login-benefits p {
  margin: 0;
  color: rgba(255, 255, 255, .78);
  line-height: 1.45;
}

.ge-login-secure {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  color: rgba(255, 255, 255, .78);
}

.ge-login-secure svg {
  width: 22px;
  height: 22px;
}

.ge-login-form-side {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 58px;
  padding: 54px 28px 24px;
}

.ge-login-card {
  width: min(620px, 92vw);
  padding: 58px 58px 42px;
  border: 1px solid rgba(226, 232, 240, .82);
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .12);
}

.ge-login-mini-logo {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 0 auto 30px;
  border-radius: 50%;
  box-shadow: 0 18px 36px rgba(15, 23, 42, .16);
  overflow: hidden;
}

.ge-login-mini-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ge-login-mini-logo span {
  color: #0b2341;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -2px;
}

.ge-login-card h2 {
  margin: 0;
  color: #0b2341;
  text-align: center;
  font-size: 32px;
  letter-spacing: -.4px;
}

.ge-login-card > p {
  margin: 10px 0 38px;
  color: #718096;
  text-align: center;
  font-size: 17px;
}

.ge-login-card label {
  display: grid;
  gap: 11px;
  margin-bottom: 24px;
  color: #111d34;
  font-weight: 800;
}

.ge-login-input {
  display: grid;
  grid-template-columns: 28px 1fr 32px;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 0 16px;
  border: 1px solid #d9e1ed;
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .02);
}

.ge-login-input:focus-within {
  border-color: #ff7417;
  box-shadow: 0 0 0 4px rgba(255, 116, 23, .12);
}

.ge-login-input input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #0f172a;
  font: inherit;
  font-weight: 600;
}

.ge-login-input input::placeholder {
  color: #8a97ad;
}

.ge-login-input button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.ge-login-options {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 30px;
  color: #0f172a;
  font-weight: 700;
}

.ge-login-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 14px;
}

.ge-login-options input {
  width: 18px;
  height: 18px;
}

.ge-login-options a,
.ge-login-consultant a {
  color: #0b72f0;
  font-weight: 800;
  text-decoration: none;
}

.ge-login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  min-height: 66px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #ff7417, #ff4f05);
  color: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(255, 92, 9, .25);
}

.ge-login-submit:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
}

.ge-login-consultant {
  margin-top: 42px;
  padding-top: 30px;
  border-top: 1px solid #e5e7eb;
  color: #7a879b;
  text-align: center;
  font-weight: 700;
}

.ge-login-footer {
  color: #728096;
  font-weight: 700;
}

@media (max-width: 1000px) {
  .ge-login-shell {
    grid-template-columns: 1fr;
  }

  .ge-login-brand-panel {
    min-height: auto;
    padding: 42px 28px;
  }

  .ge-login-brand-mark {
    margin-bottom: 28px;
  }

  .ge-login-benefits {
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
  }

  .ge-login-benefits article {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .ge-login-secure {
    margin-top: 24px;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .ge-login-brand-panel {
    display: none;
  }

  .ge-login-form-side {
    padding: 24px 14px;
  }

  .ge-login-card {
    width: 100%;
    padding: 36px 22px 28px;
    border-radius: 18px;
  }

  .ge-login-card h2 {
    font-size: 27px;
  }

  .ge-login-options {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Login compacto para caber inteiro na altura real do navegador. */
.auth-main {
  overflow: hidden;
}

.ge-login-shell {
  height: 100vh;
  min-height: 620px;
}

.ge-login-brand-panel {
  padding: 38px min(6vw, 64px);
}

.ge-login-brand-mark {
  margin-bottom: 34px;
}

.ge-login-brand-logo {
  width: min(330px, 70vw);
}

.ge-login-accent {
  width: 52px;
  height: 5px;
  margin-bottom: 18px;
}

.ge-login-copy h1 {
  max-width: 480px;
  font-size: clamp(30px, 3.4vw, 46px);
}

.ge-login-copy p {
  max-width: 430px;
  margin-top: 16px;
  font-size: 17px;
}

.ge-login-benefits {
  gap: 10px;
  margin-top: 28px;
}

.ge-login-benefits article {
  grid-template-columns: 62px 1fr;
  gap: 14px;
  padding-bottom: 10px;
}

.ge-login-benefits article > span {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.ge-login-benefits svg {
  width: 30px;
  height: 30px;
}

.ge-login-benefits strong {
  margin-bottom: 3px;
  font-size: 17px;
}

.ge-login-benefits p {
  font-size: 14px;
  line-height: 1.35;
}

.ge-login-secure {
  margin-top: 20px;
  font-size: 14px;
}

.ge-login-form-side {
  gap: 22px;
  padding: 28px 24px 18px;
}

.ge-login-card {
  width: min(560px, 90vw);
  padding: 36px 42px 28px;
  border-radius: 18px;
}

.ge-login-mini-logo {
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
}

.ge-login-card h2 {
  font-size: 28px;
}

.ge-login-card > p {
  margin: 6px 0 24px;
  font-size: 15px;
}

.ge-login-card label {
  gap: 8px;
  margin-bottom: 16px;
}

.ge-login-input {
  min-height: 54px;
}

.ge-login-options {
  margin: 0 0 22px;
}

.ge-login-submit {
  min-height: 56px;
}

.ge-login-consultant {
  margin-top: 26px;
  padding-top: 20px;
}

.ge-login-footer {
  font-size: 13px;
}

@media (max-height: 760px) and (min-width: 1001px) {
  .ge-login-benefits {
    grid-template-columns: repeat(3, 1fr);
    max-width: 620px;
  }

  .ge-login-benefits article {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    border-bottom: 0;
  }

  .ge-login-benefits p {
    display: none;
  }

  .ge-login-secure {
    display: none;
  }
}

.quote-list-panel,
.quote-form-panel,
.quote-items-panel {
  padding: 28px;
}

.quote-page-head {
  padding: 24px 28px;
  margin-bottom: 16px;
}

.quote-page-head h1 {
  font-size: 32px;
}

.quote-page-head p {
  font-size: 14px;
}

.quote-page-head .btn {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 13px;
}

.quote-list-panel {
  padding: 16px 20px;
}

.quote-list-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.quote-list-heading h2 {
  margin: 0;
  font-size: 20px;
}

.quote-list-heading .muted {
  margin-top: 5px;
  font-size: 12px;
}

.quote-list-filter {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 130px 130px 150px 86px;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}

.quote-list-filter label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #5d6b80;
  font-size: 11px;
  font-weight: 700;
}

.quote-list-filter input,
.quote-list-filter select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  padding: 6px 9px;
  font: inherit;
  font-size: 12px;
}

.quote-list-filter .btn {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12px;
}

.quote-list-workspace {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  height: clamp(560px, calc(100vh - 350px), 780px);
  min-height: 0;
}

.quote-list-scroll,
.quote-items-preview-table {
  min-height: 0;
  overflow: auto;
}

.quote-list-panel .quote-list-table th,
.quote-list-panel .quote-list-table td,
.quote-list-panel .quote-items-preview-table th,
.quote-list-panel .quote-items-preview-table td {
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.18;
}

.quote-list-panel .quote-list-table {
  table-layout: fixed;
  width: max-content;
  min-width: 1040px;
}

.quote-list-panel .quote-list-table th:nth-child(1),
.quote-list-panel .quote-list-table td:nth-child(1) {
  width: 120px;
}

.quote-list-panel .quote-list-table th:nth-child(2),
.quote-list-panel .quote-list-table td:nth-child(2) {
  width: 340px;
}

.quote-list-panel .quote-list-table th:nth-child(3),
.quote-list-panel .quote-list-table td:nth-child(3),
.quote-list-panel .quote-list-table th:nth-child(4),
.quote-list-panel .quote-list-table td:nth-child(4) {
  width: 88px;
}

.quote-list-panel .quote-list-table th:nth-child(5),
.quote-list-panel .quote-list-table td:nth-child(5) {
  width: 110px;
}

.quote-list-panel .quote-list-table th:nth-child(6),
.quote-list-panel .quote-list-table td:nth-child(6) {
  width: 95px;
}

.quote-list-panel .quote-list-table th:nth-child(7),
.quote-list-panel .quote-list-table td:nth-child(7) {
  width: 110px;
}

.quote-list-panel .quote-list-table th:nth-child(8),
.quote-list-panel .quote-list-table td:nth-child(8) {
  width: 125px;
}

.quote-list-panel .quote-list-table th,
.quote-list-panel .quote-items-preview-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.quote-list-panel .quote-list-table small,
.quote-list-panel .quote-items-preview-table small {
  font-size: 10px;
}

.quote-list-panel .quote-status {
  padding: 5px 8px;
  font-size: 11px;
}

.quote-list-panel .quote-actions {
  gap: 5px;
}

.quote-list-panel .quote-actions .icon-action {
  width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 7px;
}

.quote-items-preview-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 0;
  padding: 12px 14px;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.quote-items-preview-panel .panel-title-row {
  flex: 0 0 auto;
  margin-bottom: 8px;
}

.quote-items-preview-panel h2 {
  font-size: 17px;
}

.quote-list-table tbody tr[data-quote-row] {
  cursor: pointer;
  outline: none;
}

.quote-list-table tbody tr[data-quote-row].is-selected {
  background: #fff4e8;
  box-shadow: inset 4px 0 0 var(--orange);
}

.quote-list-table tbody tr[data-quote-row]:focus {
  box-shadow: inset 4px 0 0 var(--orange), 0 0 0 2px rgba(247, 124, 32, .18);
}

.quote-items-preview-table table {
  min-width: 760px;
}

.quote-items-preview-table {
  flex: 1 1 auto;
  max-height: 100%;
  min-height: 0;
  overflow: auto;
}

.quote-items-preview-table small {
  display: block;
  color: #6b7280;
  margin-top: 3px;
}

@media (max-width: 1100px) {
  .quote-list-filter {
    grid-template-columns: 1fr 1fr;
  }

  .quote-list-filter .btn {
    width: 100%;
  }

  .quote-list-workspace {
    height: auto;
    min-height: 0;
  }

  .quote-list-scroll,
  .quote-items-preview-table {
    max-height: 360px;
  }
}

.quote-section-title,
.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.quote-section-title h2,
.panel-title-row h2 {
  margin: 0;
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px 18px;
}

.quote-grid label,
.quote-item-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #55657a;
  font-weight: 600;
}

.quote-grid input,
.quote-grid select,
.quote-grid textarea,
.quote-item-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  padding: 11px 14px;
  font: inherit;
}

.quote-grid textarea {
  min-height: 78px;
  resize: vertical;
}

.quote-grid .wide {
  grid-column: span 2;
}

.quote-cnpj-action {
  justify-content: flex-end;
}

.quote-cnpj-action .btn {
  min-height: 48px;
}

.quote-lookup-status {
  margin: -8px 0 4px;
}

.quote-grid-compact {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.quote-form .wide-action {
  width: 100%;
  margin-top: 20px;
}

.quote-item-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) 90px 120px 120px 140px 150px 150px;
  align-items: end;
  gap: 12px;
}

.quote-product-search {
  position: relative;
}

.quote-item-total {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  color: #0b2341;
  font-size: 18px;
}

.quote-items-table {
  margin-top: 22px;
}

.quote-items-table small {
  display: block;
  color: #6b7280;
  margin-top: 3px;
}

.quote-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quote-edit-item-card {
  width: min(760px, 100%);
  max-width: 760px;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
  padding: 24px;
}

.quote-edit-item-card .modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.quote-edit-item-card .modal-header h2 {
  margin: 0;
  color: #0b2341;
}

.quote-edit-item-card .modal-header p {
  margin: 4px 0 0;
  color: #6b7280;
}

.quote-edit-item-card .modal-header .icon-action {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.quote-edit-item-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.quote-edit-item-grid label {
  color: #52657f;
  font-weight: 700;
}

.quote-edit-item-grid input {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
}

.quote-edit-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
}

.quote-edit-item-footer > strong {
  color: #fb7416;
  font-size: 26px;
}

@media (max-width: 760px) {
  .quote-edit-item-grid {
    grid-template-columns: 1fr;
  }

  .quote-edit-item-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-edit-item-footer .modal-actions {
    justify-content: stretch;
  }

  .quote-edit-item-footer .modal-actions .btn {
    flex: 1;
  }
}

.empty-quote-items {
  text-align: center;
  padding: 42px 14px;
}

.quote-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  border-top: 1px solid #e5e7eb;
  margin-top: 18px;
  padding-top: 18px;
}

.quote-totals article {
  padding: 0 18px;
  border-right: 1px solid #e5e7eb;
}

.quote-totals article:last-child {
  border-right: 0;
  text-align: right;
}

.quote-totals span {
  display: block;
  color: #6b7280;
  font-weight: 600;
}

.quote-totals strong {
  display: block;
  margin-top: 8px;
  color: #0b2341;
  font-size: 18px;
}

.quote-total-final strong {
  color: #fb7416;
  font-size: 26px;
}

.quote-status {
  display: inline-flex;
  align-items: center;
  border-radius: 9px;
  padding: 9px 13px;
  font-weight: 800;
}

.quote-status.open {
  background: #eef2ff;
  color: #3730a3;
}

.quote-status.approved {
  background: #dcfce7;
  color: #166534;
}

.quote-status.finished {
  background: #dcfce7;
  color: #166534;
}

.quote-status.cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.quote-row-cancelled {
  background: #fff1f2;
}

.quote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-detail-head {
  align-items: center;
  min-height: auto;
  margin-bottom: 16px;
  padding: 18px 24px;
  border: 1px solid #dbe4ef;
  background:
    linear-gradient(135deg, rgba(255, 247, 237, .98), rgba(239, 246, 255, .88)),
    #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
}

.quote-detail-head h1::before {
  content: "Orcamento comercial";
  display: table;
  margin-bottom: 8px;
  padding: 5px 10px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-detail-head h1 {
  margin-bottom: 4px;
  font-size: 34px;
  line-height: 1.05;
}

.quote-detail-head p {
  max-width: 680px;
  margin: 0;
  font-weight: 700;
  font-size: 16px;
}

.quote-head-actions {
  align-self: center;
  display: flex;
  gap: 10px;
}

.quote-head-actions .btn {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 900;
}

.quote-detail-panel {
  padding: 18px;
  overflow: hidden;
  border: 1px solid #dbe4ef;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .05);
}

.quote-detail-panel .quote-form {
  display: grid;
  gap: 12px;
}

.quote-section-card-title {
  margin: -18px -18px 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.quote-section-card-title h2 {
  color: #0f172a;
  font-size: 22px;
  line-height: 1.15;
}

.quote-section-spaced {
  margin-top: 4px;
}

.quote-detail-panel .quote-status {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.quote-client-grid,
.quote-commercial-grid {
  gap: 7px 14px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fbfdff;
}

.quote-client-grid {
  grid-auto-flow: row dense;
  align-items: end;
  row-gap: 6px;
}

.quote-client-grid label,
.quote-commercial-grid label,
.quote-items-detail-panel .quote-item-form label {
  color: #475569;
  font-weight: 800;
  gap: 4px;
  font-size: 14px;
}

.quote-client-grid input,
.quote-commercial-grid input,
.quote-commercial-grid select,
.quote-commercial-grid textarea,
.quote-items-detail-panel .quote-item-form input {
  min-height: 36px;
  padding: 7px 11px;
  border-color: #dbe4ef;
  border-radius: 7px;
  background: #fff;
  font-weight: 700;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.quote-commercial-grid textarea {
  min-height: 62px;
}

.quote-client-grid input:focus,
.quote-commercial-grid input:focus,
.quote-commercial-grid select:focus,
.quote-commercial-grid textarea:focus,
.quote-items-detail-panel .quote-item-form input:focus {
  border-color: #fb7416;
  box-shadow: 0 0 0 3px rgba(251, 116, 22, .14);
  outline: none;
}

.quote-client-grid .wide {
  position: relative;
}

.quote-lookup-status:empty {
  display: none;
}

.quote-client-grid .quote-lookup-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
}

.quote-cnpj-action .btn {
  min-height: 36px;
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.quote-form .wide-action {
  min-height: 42px;
  margin-top: 6px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 900;
}

.quote-items-detail-panel .quote-section-card-title {
  margin-bottom: 14px;
}

.quote-items-detail-panel .quote-item-form {
  gap: 10px;
  padding: 12px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
}

.quote-items-detail-panel .quote-item-total {
  min-height: 40px;
  justify-content: center;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #047857;
  font-weight: 900;
}

.quote-items-table {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .06);
}

.quote-items-table .modern-table thead th {
  padding: 10px 12px;
  background: #f8fafc;
  color: #475569;
}

.quote-items-table .modern-table tbody td {
  padding: 10px 12px;
}

.quote-items-table .modern-table tbody tr:hover {
  background: #fff7ed;
}

.quote-items-table .quote-item-actions .btn {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.quote-totals {
  gap: 10px;
  border-top: 0;
  margin-top: 14px;
  padding-top: 0;
}

.quote-totals article {
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.quote-totals span {
  font-size: 13px;
}

.quote-totals strong {
  margin-top: 5px;
  font-size: 17px;
}

.quote-total-final strong {
  font-size: 24px;
}

.quote-totals article:last-child,
.quote-totals .quote-total-final {
  border-color: #fed7aa;
  background: #fff7ed;
}

.quote-totals .quote-total-final strong {
  color: #c2410c;
}

.quote-final-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.quote-final-actions .wide-action {
  width: min(260px, 100%);
  margin-top: 0;
}

.quote-print-toolbar {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 18px;
}

.public-order-body {
  background: #757575;
}

.quote-print-page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto 28px;
  background: #fff;
  color: #08204b;
  padding: 12mm;
  border: 1px solid #e5edf8;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
}

.quote-print-header {
  display: grid;
  grid-template-columns: 42mm 1fr 82mm;
  gap: 14mm;
  align-items: start;
  padding: 0 0 7mm;
}

.quote-print-title h2 {
  margin: 0;
  color: #082e78;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.quote-print-title p {
  margin: 12px 0 0;
  color: #08204b;
  font-size: 13px;
}

.quote-print-brand img {
  display: block;
  width: 32mm;
  height: 32mm;
  object-fit: contain;
  margin: 0;
  border-radius: 5px;
}

.quote-print-issuer span,
.quote-print-issuer strong {
  display: block;
  margin-bottom: 5px;
}

.quote-print-issuer strong {
  color: #082e78;
  font-size: 13px;
  text-transform: uppercase;
}

.quote-print-customer {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, .9fr) 42mm;
  gap: 5mm;
  margin-top: 0;
  padding: 5mm 6mm;
  border: 1px solid #b8cbe8;
  border-top: 3px solid #082e78;
  border-radius: 6px;
}

.quote-print-customer h3 {
  margin: 0 0 5px;
  color: #082e78;
  font-size: 12px;
  text-transform: uppercase;
}

.quote-print-customer-main,
.quote-print-customer-meta {
  padding-right: 5mm;
  border-right: 1px solid #d6e1f0;
}

.quote-print-customer span,
.quote-print-notes span {
  display: block;
  color: #082e78;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.quote-print-customer-main strong {
  display: block;
  margin: 2px 0 5px;
  color: #071a3d;
  font-size: 11px;
  line-height: 1.22;
}

.quote-print-customer-meta {
  display: grid;
  gap: 5px;
}

.quote-print-customer-meta article {
  min-height: 25px;
}

.quote-print-customer-meta strong {
  display: inline-block;
  margin-top: 2px;
  color: #071a3d;
  font-size: 11px;
}

.quote-print-status {
  padding: 2px 7px;
  border-radius: 6px;
  background: #dcfce7;
  color: #15803d !important;
}

.quote-print-number {
  padding: 4mm;
  border: 1px solid #082e78;
  border-radius: 6px;
  text-align: center;
}

.quote-print-number strong {
  display: block;
  color: #dc2626;
  font-size: 18px;
  margin: 5px 0 7px;
  letter-spacing: 1px;
}

.quote-print-number div {
  padding: 5px 0;
  border-top: 1px solid #d6e1f0;
  text-align: left;
}

.quote-print-number b {
  display: block;
  margin-top: 2px;
  color: #071a3d;
  font-size: 10px;
}

.quote-print-items {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 5mm;
  font-size: 11px;
  overflow: hidden;
  border: 1px solid #b8cbe8;
  border-radius: 6px;
}

.quote-print-items th,
.quote-print-items td {
  border-right: 1px solid #d6e1f0;
  border-bottom: 1px solid #d6e1f0;
  padding: 6px 7px;
}

.quote-print-items th {
  background: #082e78;
  color: #fff;
  text-align: left;
  text-transform: uppercase;
}

.quote-print-items td:nth-child(n+3),
.quote-print-items th:nth-child(n+3) {
  text-align: right;
}

.quote-print-bottom {
  display: grid;
  grid-template-columns: 1fr 94mm;
  margin-top: 8mm;
  border: 1px solid #b8cbe8;
  border-radius: 6px 6px 0 0;
  overflow: hidden;
}

.quote-print-notes,
.quote-print-summary,
.quote-print-extra {
  border: 0;
}

.quote-print-notes {
  min-height: 64mm;
  padding: 8mm;
  border-right: 1px solid #d6e1f0;
}

.quote-print-notes p {
  margin: 16px 0 0;
  color: #071a3d;
}

.quote-print-summary div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #d6e1f0;
  padding: 12px 14px;
  color: #071a3d;
}

.quote-print-summary div:last-child {
  border-bottom: 0;
}

.quote-print-discount {
  color: #dc2626 !important;
}

.quote-print-total {
  background: #f1f6ff;
  color: #082e78 !important;
  font-size: 15px;
}

.quote-print-total strong {
  font-size: 18px;
}

.quote-print-extra {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #b8cbe8;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}

.quote-print-extra span {
  padding: 10px 14px;
  color: #08204b;
}

.quote-print-extra span + span {
  border-left: 1px solid #d6e1f0;
}

.quote-print-signature {
  margin-top: 22mm;
  text-align: center;
}

.quote-print-signature span {
  display: block;
  width: 98mm;
  max-width: 80%;
  border-top: 1px dashed #08204b;
  margin: 0 auto 8px;
}

.quote-print-footer {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 12mm;
  margin-top: 22mm;
  border: 1px solid #b8cbe8;
  border-radius: 6px;
  background: #f8fbff;
  overflow: hidden;
}

.quote-print-footer div {
  padding: 8mm;
}

.quote-print-footer div:first-child {
  border-left: 18mm solid #082e78;
}

.quote-print-footer strong,
.quote-print-footer span {
  display: block;
}

.quote-print-footer strong {
  color: #082e78;
  margin-bottom: 6px;
}

.quote-print-footer span {
  color: #08204b;
  line-height: 1.45;
}

@media print {
  @page {
    size: A4;
    margin: 8mm;
  }

  body.public-order-body {
    background: #fff;
  }

  .no-print,
  .quote-print-toolbar {
    display: none !important;
  }

  .public-main {
    margin: 0;
    padding: 0;
  }

  .quote-print-page {
    width: auto;
    min-height: auto;
    margin: 0;
    border: 0;
    padding: 0;
    box-shadow: none;
  }
}

@media (max-width: 1100px) {
  .quote-grid,
  .quote-grid-compact {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .quote-item-form {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .quote-detail-head {
    align-items: stretch;
  }

  .quote-head-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .quote-grid,
  .quote-grid-compact,
  .quote-totals {
    grid-template-columns: 1fr;
  }

  .quote-grid .wide {
    grid-column: span 1;
  }

  .quote-totals article,
  .quote-totals article:last-child {
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 0;
    text-align: left;
  }

  .quote-detail-head,
  .quote-form-panel,
  .quote-items-panel {
    padding: 18px;
  }

  .quote-section-card-title {
    margin: -18px -18px 18px;
    padding: 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .quote-client-grid,
  .quote-commercial-grid,
  .quote-items-detail-panel .quote-item-form {
    padding: 14px;
  }

  .quote-head-actions,
  .quote-head-actions .btn,
  .quote-form .wide-action {
    width: 100%;
  }
}

/* Public lunch menu */
.online-lunch-page {
  --lunch-red: #d70000;
  --lunch-yellow: #ffd52e;
  --lunch-ink: #141923;
  --lunch-muted: #667085;
  width: min(1200px, calc(100% - 48px));
  padding: 24px 0 132px;
  color: var(--lunch-ink);
}
body.public-order-body { background: #fff; }
.online-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.online-brand { display: flex; align-items: center; gap: 18px; }
.online-brand img { width: 150px; height: 86px; object-fit: contain; }
.online-brand > strong { display: grid; place-items: center; width: 132px; height: 86px; color: var(--lunch-red); font-size: 30px; line-height: .82; }
.online-brand h1 { margin: 0 0 4px; font-size: 24px; }
.online-brand p, .online-top-info small { margin: 0; color: var(--lunch-muted); }
.online-top-info { display: flex; align-items: center; gap: 26px; }
.online-top-info span { display: grid; gap: 2px; padding-left: 22px; border-left: 1px solid #e5e7eb; }
.online-whatsapp, .online-mobile-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ef1b1b, #c90000);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(215, 0, 0, .24);
}
.online-mobile-whatsapp, .online-mobile-strip { display: none; }
.online-lunch-hero {
  position: relative;
  isolation: isolate;
  min-height: 360px;
  display: flex;
  align-items: center;
  padding: 62px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  color: #fff;
  box-shadow: 0 18px 44px rgba(15,23,42,.14);
}
.online-lunch-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 58%;
  z-index: -1;
  background: linear-gradient(90deg, rgba(8,10,14,.96) 0%, rgba(8,10,14,.82) 72%, rgba(8,10,14,0) 100%);
}
.online-lunch-hero > div {
  position: relative;
  z-index: 1;
}
.online-hero-media {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -2;
  width: 68%;
  height: 100%;
  padding: 20px;
  object-fit: contain;
  object-position: center right;
  opacity: 1;
}
.online-lunch-hero h2 { max-width: 450px; margin: 0; font-size: 56px; line-height: .98; }
.online-lunch-hero h2 strong { display: block; color: var(--lunch-yellow); }
.online-lunch-hero p { margin: 24px 0 8px; font-size: 18px; }
.online-lunch-hero small { color: rgba(255,255,255,.82); }
.online-hero-actions { display: flex; align-items: center; gap: 26px; margin-top: 30px; }
.online-lunch-page .online-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 9px;
  background: linear-gradient(135deg, #ef2222, #d00000);
  color: #fff;
  box-shadow: 0 14px 26px rgba(215,0,0,.22);
}
.online-category-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; margin: 38px 54px 34px; }
.online-category-tabs a {
  min-height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: var(--lunch-ink);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(15,23,42,.04);
}
.online-category-tabs a.active { color: #fff; border-color: var(--lunch-red); background: linear-gradient(135deg, #e40000, #c90000); box-shadow: 0 16px 28px rgba(215,0,0,.22); }
.online-tab-icon, .online-section-icon { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 999px; background: #fff4d5; }
.online-tab-icon::before, .online-section-icon::before { content: ""; width: 18px; height: 18px; border: 3px solid currentColor; border-radius: 50%; }
.online-tab-steak::before, .online-section-icon::before { border-radius: 54% 46% 48% 52%; }
.online-tab-bowl::before { width: 20px; height: 12px; border-radius: 0 0 14px 14px; border-top: 0; }
.online-tab-burger::before { width: 20px; height: 16px; border-radius: 12px 12px 7px 7px; }
.online-tab-leaf::before { border-radius: 3px 16px; transform: rotate(-28deg); }
.online-tab-cup::before { width: 14px; height: 20px; border-radius: 3px 3px 9px 9px; }
.online-menu-list { display: grid; gap: 26px; }
.online-group-card { padding: 30px 28px 18px; border-radius: 16px; background: #f8f8f8; box-shadow: inset 0 0 0 1px #f2f4f7; }
.online-group-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.online-group-heading > div { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 14px; }
.online-group-heading h2 { margin: 0; font-size: 24px; }
.online-group-heading p { grid-column: 2; margin: -4px 0 0; color: var(--lunch-muted); }
.online-available { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 9px; background: #fff; color: #16a34a; font-weight: 800; }
.online-available::before, .online-product-ok { content: "âœ“"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: #16a34a; color: #fff; font-size: 14px; font-weight: 900; }
.online-lunch-page .online-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.online-lunch-page .online-product {
  min-height: 104px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15,23,42,.06);
}
.online-product-number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; background: #fff7dc; color: var(--lunch-red); font-weight: 900; font-size: 13px; }
.online-product-photo { display: none; margin: 0; overflow: hidden; border-radius: 10px; background: #eef2f7; }
.online-product-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.online-product-info h3 { margin: 3px 0 6px; font-size: 15px; line-height: 1.2; }
.online-product-info p { margin: 0 0 8px; color: var(--lunch-muted); font-size: 13px; }
.online-product-info strong { color: #10963b; font-size: 14px; }
.online-lunch-page .online-add { grid-column: 2 / 4; justify-self: start; min-height: 34px; padding: 0 13px; border: 1px solid var(--lunch-red); border-radius: 5px; background: #fff; color: var(--lunch-red); box-shadow: none; font-size: 13px; }
.online-add span { margin-right: 4px; font-size: 18px; line-height: 1; }
.online-catalog-page {
  padding-bottom: 40px;
}
.online-catalog-page .online-product-ok {
  display: none;
}
.online-catalog-page .online-product {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}
.online-catalog-page .online-group-card:not(.online-group-marmitex) .online-product-has-photo {
  grid-template-columns: 74px minmax(0, 1fr);
}
.online-catalog-page .online-group-marmitex .online-product {
  grid-template-columns: 1fr;
}
.online-group-card:not(.online-group-marmitex) .online-product-has-photo {
  grid-template-columns: 74px minmax(0, 1fr) auto;
}
.online-group-card:not(.online-group-marmitex) .online-product-has-photo .online-product-photo {
  display: block;
  grid-row: span 2;
  width: 74px;
  height: 74px;
}
.online-group-card:not(.online-group-marmitex) .online-product-has-photo .online-product-number {
  display: none;
}
.online-group-card:not(.online-group-marmitex) .online-product-has-photo .online-product-ok {
  align-self: start;
}
.online-group-card:not(.online-group-marmitex) .online-product-has-photo .online-add {
  grid-column: 2 / 4;
}
.online-group-marmitex .online-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.online-group-marmitex .online-product {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
}
.online-group-marmitex .online-product-photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8.2;
  background: #111827;
}
.online-group-marmitex .online-product-number,
.online-group-marmitex .online-product-ok {
  display: none;
}
.online-group-marmitex .online-product-info {
  padding: 16px 20px 6px;
}
.online-group-marmitex .online-product-info h3 {
  margin: 0 0 8px;
  font-size: 25px;
}
.online-group-marmitex .online-product-info p {
  font-size: 16px;
}
.online-group-marmitex .online-product-info strong {
  display: block;
  margin-top: 10px;
  font-size: 20px;
}
.online-group-marmitex .online-add {
  grid-column: auto;
  justify-self: stretch;
  margin: 8px 20px 20px;
  min-height: 50px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #e40000, #c90000);
  color: #fff;
  font-size: 19px;
  box-shadow: 0 12px 24px rgba(215,0,0,.18);
}
.online-group-marmitex .online-add span {
  display: none;
}
.online-checkout-card { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; margin-top: 28px; padding: 24px; scroll-margin-top: 22px; border-radius: 16px; background: #fff; box-shadow: 0 14px 34px rgba(24,39,75,.08); }
.online-checkout-intro,
.online-checkout-card .online-fields {
  grid-column: 1;
}
.online-checkout-card .online-cart {
  grid-column: 2;
  grid-row: 1 / span 3;
}
.online-checkout-card h2 { margin: 0 0 6px; }
.online-checkout-card p { margin: 0 0 16px; color: var(--lunch-muted); }
.online-lunch-page .online-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.online-saved-customer {
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -4px 0 4px;
  padding: 12px 14px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
  color: #166534;
}
.online-saved-customer[hidden] {
  display: none;
}
.online-saved-customer strong,
.online-saved-customer span {
  display: block;
}
.online-saved-customer span {
  margin-top: 2px;
  color: #15803d;
  font-size: 13px;
}
.online-saved-customer button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #86efac;
  border-radius: 10px;
  background: #ffffff;
  color: #15803d;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}
.online-remember-field {
  grid-column: 1 / -1;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569 !important;
}
.online-remember-field input {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 auto;
}
.online-lunch-page .online-note-field {
  grid-column: 1 / -1;
}
.online-lunch-page .online-note-field textarea {
  width: 100%;
  min-height: 78px;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  padding: 12px;
  resize: vertical;
}
.online-pix-key-box {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px dashed #16a34a;
  border-radius: 12px;
  background: #f0fdf4;
  color: #14532d;
}
.online-pix-key-box[hidden] {
  display: none;
}
.online-pix-key-box span,
.online-pix-key-box small {
  color: #166534;
}
.online-pix-key-box strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}
.online-change-box {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  color: #7c2d12;
}
.online-change-box[hidden],
.online-change-value[hidden] {
  display: none;
}
.online-change-box strong {
  font-size: 16px;
  color: #7c2d12;
}
.online-change-check {
  display: flex !important;
  align-items: center;
  gap: 10px;
  color: #7c2d12;
  font-weight: 850;
}
.online-change-check input {
  width: 20px;
  height: 20px;
}
.online-change-value {
  display: grid;
  gap: 6px;
  color: #7c2d12;
  font-weight: 850;
}
.online-change-value input {
  width: min(260px, 100%);
  border-color: #fdba74;
  background: #fff;
}
.online-change-box small {
  color: #9a3412;
}
.online-checkout-focus {
  outline: 3px solid rgba(255, 196, 0, .65);
  outline-offset: 4px;
}
.online-delivery-fee-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid #e5e7eb;
  color: var(--lunch-muted);
}
.online-delivery-fee-row strong {
  color: #10963b;
}
.online-minimum-order {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--lunch-muted);
  font-size: 13px;
}
.online-minimum-order strong {
  color: var(--lunch-ink);
}
.online-minimum-order.warning {
  background: #fff7ed;
  color: #c2410c;
}
.online-minimum-order.warning strong {
  color: #c2410c;
}
.online-lunch-page .online-cart { position: static; margin: 0; box-shadow: none; }
.online-footer-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 28px 0 0; padding: 18px 0; color: var(--lunch-muted); text-align: center; }
.online-footer-links a { color: var(--lunch-ink); font-weight: 800; }
.online-sticky-order {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 460px);
  gap: 18px;
  align-items: center;
  padding: 18px max(26px, calc((100vw - 1200px) / 2));
  background: linear-gradient(135deg, #d90000, #b90000);
  color: #fff;
  box-shadow: 0 -18px 34px rgba(15,23,42,.16);
}
.online-sticky-order a { color: inherit; }
.online-sticky-order > a:first-child { display: grid; gap: 3px; font-size: 18px; font-weight: 900; }
.online-sticky-order small { font-size: 14px; font-weight: 800; }
.online-sticky-submit { min-height: 56px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 9px; background: linear-gradient(135deg, #ffe15a, #ffc400); color: #111827 !important; font-weight: 900; text-transform: uppercase; cursor: pointer; font: inherit; }

@media (max-width: 900px) {
  .online-lunch-page { width: 100%; padding: 0 0 120px; }
  .online-topbar { display: grid; grid-template-columns: 48px 1fr 58px; justify-items: center; gap: 10px; min-height: 136px; margin: 0; padding: 18px 26px 10px; background: #fff; }
  .online-topbar::before { content: ""; justify-self: start; width: 42px; height: 30px; border-top: 5px solid var(--lunch-red); border-bottom: 5px solid var(--lunch-red); box-shadow: inset 0 10px 0 #fff, inset 0 15px 0 var(--lunch-red); }
  .online-brand { display: block; text-align: center; }
  .online-brand img { width: 180px; height: 96px; }
  .online-brand > strong { width: 180px; height: 96px; font-size: 38px; }
  .online-brand div, .online-top-info, .online-lunch-hero { display: none; }
  .online-mobile-whatsapp { display: inline-flex; justify-self: end; width: 58px; min-height: 58px; padding: 0; border-radius: 999px; font-size: 0; }
  .online-mobile-whatsapp::before { content: "â˜Ž"; font-size: 28px; }
  .online-mobile-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 20px 18px; background: linear-gradient(135deg, #df0000, #c40000); color: #fff; }
  .online-mobile-strip span { display: grid; gap: 5px; padding: 0 10px; border-right: 1px solid rgba(255,255,255,.38); font-size: 14px; }
  .online-mobile-strip span:last-child { border-right: 0; }
  .online-mobile-strip strong { font-size: 15px; }
  .online-mobile-strip small { color: #fff; }
  .online-category-tabs { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 0; margin: 20px 0 28px; overflow-x: auto; border-top: 1px solid #eef2f7; border-bottom: 1px solid #eef2f7; }
  .online-category-tabs a { min-height: 110px; flex-direction: column; border: 0; border-right: 1px solid #e5e7eb; border-radius: 0; box-shadow: none; background: #fff; color: #111827; font-size: 13px; }
  .online-category-tabs a.active { color: var(--lunch-red); background: #fff; box-shadow: inset 0 4px 0 var(--lunch-red), inset 0 -4px 0 var(--lunch-red); }
  .online-tab-icon { width: 38px; height: 38px; background: transparent; }
  .online-menu-list { padding: 0 26px; }
  .online-group-card { padding: 28px 20px 20px; border-radius: 14px; }
  .online-group-heading { align-items: center; }
  .online-group-heading > div { grid-template-columns: 58px minmax(0, 1fr); }
  .online-group-heading h2 { font-size: 24px; text-transform: uppercase; }
  .online-available { font-size: 0; padding: 0; width: 42px; background: transparent; }
  .online-lunch-page .online-products { grid-template-columns: 1fr; gap: 12px; }
  .online-lunch-page .online-product { min-height: 78px; grid-template-columns: auto minmax(0, 1fr) 24px 54px; align-items: center; padding: 12px; border-radius: 11px; }
  .online-product-number { width: 40px; height: 40px; font-size: 16px; }
  .online-product-info h3 { font-size: 17px; }
  .online-product-info p, .online-product-info strong { display: none; }
  .online-product-ok { width: 24px; height: 24px; }
  .online-lunch-page .online-add { grid-column: auto; justify-self: end; width: 52px; min-height: 52px; padding: 0; border-radius: 12px; font-size: 0; }
  .online-add span { margin: 0; font-size: 34px; font-weight: 400; }
  .online-group-card:not(.online-group-marmitex) .online-product-has-photo {
    grid-template-columns: 70px minmax(0, 1fr) 24px 52px;
  }
  .online-group-card:not(.online-group-marmitex) .online-product-has-photo .online-product-photo {
    grid-row: auto;
    width: 70px;
    height: 70px;
  }
  .online-group-card:not(.online-group-marmitex) .online-product-has-photo .online-add {
    grid-column: auto;
  }
  .online-group-card:not(.online-group-marmitex) .online-product-has-photo .online-product-info p,
  .online-group-card:not(.online-group-marmitex) .online-product-has-photo .online-product-info strong {
    display: block;
  }
  .online-group-card:not(.online-group-marmitex) .online-product-has-photo .online-product-info p {
    margin-bottom: 3px;
    font-size: 13px;
    line-height: 1.15;
  }
  .online-group-marmitex .online-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .online-group-marmitex .online-product {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    min-height: 0;
    padding: 0;
  }
  .online-group-marmitex .online-product-photo { aspect-ratio: 16 / 8.5; }
  .online-group-marmitex .online-product-info { padding: 14px 16px 5px; }
  .online-group-marmitex .online-product-info h3 { font-size: 20px; }
  .online-group-marmitex .online-product-info p,
  .online-group-marmitex .online-product-info strong { display: block; }
  .online-group-marmitex .online-product-info p { font-size: 14px; }
  .online-group-marmitex .online-add {
    justify-self: stretch;
    width: auto;
    min-height: 44px;
    margin: 8px 16px 16px;
    font-size: 18px;
  }
  .online-checkout-card { grid-template-columns: 1fr; margin: 24px 26px 0; }
  .online-checkout-intro,
  .online-checkout-card .online-fields,
  .online-checkout-card .online-cart {
    grid-column: 1;
    grid-row: auto;
  }
  .online-lunch-page .online-fields { grid-template-columns: 1fr; }
  .online-footer-links { grid-template-columns: 1fr; margin: 20px 26px 0; }
  .online-sticky-order { grid-template-columns: minmax(0, 1fr) minmax(170px, 1fr); gap: 16px; padding: 18px 26px; }
  .online-sticky-order > a:first-child { font-size: 18px; }
  .online-sticky-submit { min-height: 64px; font-size: 18px; }
}

@media (max-width: 520px) {
  .online-topbar { grid-template-columns: 42px 1fr 54px; padding-inline: 22px; }
  .online-brand img, .online-brand > strong { width: 154px; height: 86px; }
  .online-mobile-strip { padding-inline: 10px; }
  .online-mobile-strip span { padding-inline: 8px; }
  .online-mobile-strip strong { font-size: 14px; }
  .online-mobile-strip small { font-size: 12px; }
  .online-menu-list { padding-inline: 14px; }
  .online-group-marmitex .online-products { grid-template-columns: 1fr; }
  .online-checkout-card { margin-inline: 14px; }
  .online-sticky-order { padding-inline: 14px; }
}

@media (max-width: 900px) {
  body.public-order-body {
    background: #f6f7fb;
  }

  .online-lunch-page {
    display: flex;
    flex-direction: column;
    padding-bottom: 112px;
    background: #fffaf5;
  }

  .online-lunch-page > form {
    order: 4;
  }

  .online-lunch-hero {
    order: 1;
    display: block !important;
    min-height: 230px;
    margin: 0;
    padding: 0;
    border-radius: 0 0 26px 26px;
    background: radial-gradient(circle at 72% 26%, rgba(255, 212, 46, .22), transparent 26%), linear-gradient(135deg, #b80000 0%, #e10000 66%, #ad0000 100%);
    box-shadow: none;
  }

  .online-lunch-hero::before {
    display: none;
  }

  .online-lunch-hero > div {
    display: none;
  }

  .online-hero-media {
    width: 100%;
    padding: 34px 28px;
    object-position: center;
    filter: drop-shadow(0 10px 18px rgba(70, 0, 0, .22));
  }

  .online-topbar {
    order: 2;
    display: block;
    min-height: 0;
    margin: 14px 16px 0;
    padding: 18px 20px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 34px rgba(15, 23, 42, .13);
  }

  .online-topbar::before,
  .online-top-info,
  .online-mobile-whatsapp,
  .online-brand img,
  .online-brand > strong {
    display: none !important;
  }

  .online-brand,
  .online-brand div {
    display: block !important;
    text-align: left;
  }

  .online-brand h1 {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.12;
    letter-spacing: 0;
  }

  .online-brand p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #667085;
    font-size: 14px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .online-mobile-strip {
    order: 3;
    display: grid;
    grid-template-columns: 1fr 1.2fr 54px;
    align-items: center;
    gap: 8px;
    margin: 12px 16px 18px;
    padding: 14px;
    border: 1px solid rgba(215, 0, 0, .09);
    border-radius: 18px;
    background: #fff;
    color: #1f2937;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
  }

  .online-mobile-strip span {
    min-height: auto;
    display: grid;
    gap: 3px;
    justify-content: start;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #111827;
    font-size: 12px;
    font-weight: 700;
  }

  .online-mobile-strip span + span {
    padding-left: 14px;
    border-left: 1px solid #e5e7eb;
  }

  .online-mobile-strip strong {
    color: inherit;
    font-size: 12px;
    font-weight: 800;
  }

  .online-mobile-strip small {
    color: var(--lunch-red);
    font-size: 16px;
    font-weight: 900;
  }

  .online-mobile-promise small {
    color: #374151;
    font-size: 12px;
    font-weight: 700;
  }

  .online-mobile-strip-whatsapp {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    justify-self: end;
    border-radius: 999px;
    background: #17b45b;
    color: #fff;
    font-size: 0;
    box-shadow: 0 10px 18px rgba(23, 180, 91, .24);
  }

  .online-mobile-strip-whatsapp::before {
    content: "â˜Ž";
    font-size: 24px;
    line-height: 1;
  }

  .online-category-tabs {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    gap: 10px;
    margin: 0 0 12px;
    padding: 12px 16px;
    overflow-x: auto;
    border: 0;
    background: rgba(255, 250, 245, .96);
    box-shadow: 0 1px 0 rgba(15, 23, 42, .06);
    scrollbar-width: none;
  }

  .online-category-tabs::-webkit-scrollbar {
    display: none;
  }

  .online-category-tabs a {
    flex: 0 0 auto;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid #f1d8d8;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, .05);
    color: #2f3542;
    font-size: 14px;
    white-space: nowrap;
  }

  .online-category-tabs a.active {
    border-color: var(--lunch-red);
    background: var(--lunch-red);
    color: #fff;
    box-shadow: 0 14px 24px rgba(215, 0, 0, .18);
  }

  .online-tab-icon {
    display: none;
  }

  .online-menu-list {
    gap: 16px;
    padding: 0 16px;
  }

  .online-group-card {
    padding: 22px 16px 16px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
  }

  .online-group-heading {
    margin-bottom: 16px;
  }

  .online-group-heading h2 {
    font-size: 21px;
    letter-spacing: .02em;
  }

  .online-group-heading p {
    margin-top: 4px;
    font-size: 13px;
  }

  .online-lunch-page .online-products,
  .online-group-marmitex .online-products {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .online-lunch-page .online-product,
  .online-group-card:not(.online-group-marmitex) .online-product-has-photo,
  .online-group-marmitex .online-product {
    min-height: 112px;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 52px;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #f0e7e7;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
  }

  .online-lunch-page .online-product:last-child {
    border-bottom: 1px solid #f0e7e7;
  }

  .online-product-number {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: #f2f4f7;
    color: #667085;
    font-size: 13px;
  }

  .online-group-card:not(.online-group-marmitex) .online-product-has-photo .online-product-photo,
  .online-group-marmitex .online-product-photo {
    display: block;
    grid-row: auto;
    width: 82px;
    height: 82px;
    aspect-ratio: auto;
    border-radius: 18px;
    background: #fff8f0;
  }

  .online-group-card:not(.online-group-marmitex) .online-product-has-photo .online-product-number,
  .online-group-marmitex .online-product-number,
  .online-product-ok {
    display: none !important;
  }

  .online-product-info,
  .online-group-marmitex .online-product-info {
    min-width: 0;
    padding: 0;
  }

  .online-product-info h3,
  .online-group-marmitex .online-product-info h3 {
    display: -webkit-box;
    margin: 0 0 6px;
    overflow: hidden;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .online-product-info p,
  .online-group-card:not(.online-group-marmitex) .online-product-has-photo .online-product-info p,
  .online-group-marmitex .online-product-info p {
    display: -webkit-box;
    margin: 0 0 5px;
    overflow: hidden;
    color: #667085;
    font-size: 12px;
    line-height: 1.25;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .online-product-info strong,
  .online-group-card:not(.online-group-marmitex) .online-product-has-photo .online-product-info strong,
  .online-group-marmitex .online-product-info strong {
    display: block;
    color: #0a9444;
    font-size: 17px;
  }

  .online-lunch-page .online-add,
  .online-group-marmitex .online-add {
    grid-column: auto;
    justify-self: end;
    width: 48px;
    min-height: 48px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--lunch-red);
    color: #fff;
    box-shadow: 0 12px 18px rgba(215, 0, 0, .22);
    font-size: 0;
  }

  .online-add span {
    margin: 0;
    font-size: 30px;
    font-weight: 500;
    line-height: 1;
  }

  .online-checkout-card {
    margin: 14px 16px 0;
    padding: 18px;
    border-radius: 18px;
  }

  .online-footer-links {
    display: none;
  }

  .online-sticky-order {
    grid-template-columns: minmax(0, 1fr) minmax(170px, 1fr);
    gap: 14px;
    margin: 0 14px 12px;
    padding: 14px;
    border-radius: 24px;
    background: linear-gradient(135deg, #d90000, #c40000);
    box-shadow: 0 18px 36px rgba(215, 0, 0, .24);
  }

  .online-sticky-order > a:first-child {
    font-size: 15px;
  }

  .online-sticky-order small {
    font-size: 13px;
  }

  .online-sticky-submit {
    min-height: 58px;
    border-radius: 18px;
    font-size: 16px;
  }
}

@media (max-width: 420px) {
  .online-lunch-hero {
    min-height: 212px;
    margin-inline: 0;
  }

  .online-brand h1 {
    font-size: 22px;
  }

  .online-lunch-page .online-product,
  .online-group-card:not(.online-group-marmitex) .online-product-has-photo,
  .online-group-marmitex .online-product {
    grid-template-columns: 74px minmax(0, 1fr) 46px;
    gap: 10px;
  }

  .online-group-card:not(.online-group-marmitex) .online-product-has-photo .online-product-photo,
  .online-group-marmitex .online-product-photo {
    width: 74px;
    height: 74px;
  }

  .online-product-number {
    width: 52px;
    height: 52px;
  }
}

.online-lunch-page .online-group-heading > div {
  display: block;
}
.online-lunch-page .online-section-icon,
.online-lunch-page .online-available {
  display: none !important;
}
.online-lunch-page .online-group-heading p {
  grid-column: auto;
  margin: 4px 0 0;
}

/* Mobile cashier final override */
@media (max-width: 640px) {
  html,
  body,
  .app-main,
  .cashier-screen.pdv-screen,
  .payment-box.pdv-shell,
  .payment-box.pdv-shell form,
  .pdv-grid,
  .pdv-card,
  .pdv-header,
  .cashier-buttons.pdv-buttons {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box;
  }

  .cashier-screen.pdv-screen {
    width: 100% !important;
    padding: 12px !important;
  }

  .payment-box.pdv-shell {
    width: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .pdv-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  .pdv-header,
  .pdv-card,
  .cashier-buttons.pdv-buttons {
    border-radius: 18px !important;
  }

  .pdv-form-card,
  .pdv-summary-body {
    padding: 16px !important;
  }

  .pdv-input-wrap,
  .pdv-input-wrap.select-wrap {
    grid-template-columns: 52px minmax(0, 1fr) !important;
    width: 100% !important;
    height: auto !important;
    min-height: 56px !important;
  }

  .pdv-input-wrap:not(.select-wrap) {
    grid-template-columns: 52px 58px minmax(0, 1fr) !important;
  }

  .pdv-suffix {
    display: none !important;
  }

  .pdv-icon,
  .pdv-prefix,
  .pdv-input-wrap select,
  .pdv-input-wrap input {
    height: 56px !important;
    min-height: 56px !important;
  }

  .pdv-total-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .pdv-total-row strong {
    padding-left: 52px !important;
    text-align: left !important;
  }

  .cashier-buttons.pdv-buttons {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-content: stretch !important;
    margin-top: 0 !important;
    padding: 12px !important;
  }

  .cashier-buttons.pdv-buttons .btn {
    width: 100% !important;
    min-height: 50px !important;
  }
}

.mobile-section-title,
.mobile-order-total,
.mobile-order-illustration,
.mobile-order-tabs {
  display: none;
}

@media (max-width: 860px) {
  .order-layout {
    display: block;
  }

  .order-left {
    border: 0;
    padding: 0;
    background: transparent;
  }

  .order-left > .page-head.compact,
  .table-customer-form,
  .table-order-note-form,
  .delivery-customer-summary,
  .search-add,
  .order-items,
  .delivery-details-form {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
  }

  .order-left > .page-head.compact {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    margin-bottom: 16px;
    padding: 24px 22px;
    overflow: hidden;
    background: linear-gradient(135deg, #fff 0%, #fff7ed 100%);
  }

  .order-left > .page-head.compact > div:first-child {
    position: relative;
    z-index: 1;
  }

  .order-left > .page-head.compact h1 {
    max-width: 190px;
    margin: 0 0 14px;
    color: #0f172a;
    font-size: clamp(40px, 12vw, 64px);
    line-height: .95;
    letter-spacing: 0;
  }

  .order-left > .page-head.compact p {
    position: relative;
    max-width: 190px;
    margin: 0;
    padding-left: 18px;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.25;
  }

  .order-left > .page-head.compact p::before {
    content: "";
    position: absolute;
    left: 0;
    top: .45em;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #22c55e;
  }

  .order-left > .page-head.compact .header-actions {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: stretch;
    min-width: 154px;
  }

  .order-left > .page-head.compact .header-actions form,
  .order-left > .page-head.compact .header-actions .btn {
    width: 100%;
  }

  .order-left > .page-head.compact .header-actions .btn {
    min-height: 48px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 800;
  }

  .order-left > .page-head.compact .header-actions .btn.primary {
    min-height: 58px;
    background: linear-gradient(135deg, #ff7a1a, #fb6b11);
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(251, 107, 17, .22);
  }

  .order-left > .page-head.compact .header-actions .btn.danger {
    min-height: 54px;
    background: #fff;
    color: #dc2626;
    border-color: #fecaca;
  }

  .mobile-order-illustration {
    position: absolute;
    right: 18px;
    top: 28px;
    z-index: 0;
    display: block;
    width: 132px;
    height: 132px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 237, 213, .95), rgba(255, 247, 237, 0) 68%);
    opacity: .95;
    pointer-events: none;
  }

  .mobile-order-illustration span,
  .mobile-order-illustration span::before,
  .mobile-order-illustration span::after {
    position: absolute;
    display: block;
    content: "";
  }

  .mobile-order-illustration span {
    left: 40px;
    top: 48px;
    width: 62px;
    height: 46px;
    border-radius: 8px;
    background: #d97706;
    box-shadow: inset 0 0 0 5px #f59e0b;
    transform: rotate(-8deg);
  }

  .mobile-order-illustration span::before {
    left: -24px;
    top: 10px;
    width: 24px;
    height: 42px;
    border-radius: 6px;
    background: #f97316;
    box-shadow: 86px -8px 0 #f97316;
  }

  .mobile-order-illustration span::after {
    left: 10px;
    top: -28px;
    width: 42px;
    height: 24px;
    border-radius: 6px;
    background: #fb923c;
    box-shadow: 18px 66px 0 #fb923c;
  }

  .mobile-order-illustration.delivery span {
    left: 26px;
    top: 60px;
    width: 80px;
    height: 34px;
    border-radius: 9px;
    background: #f97316;
    box-shadow: inset 0 0 0 5px #fb923c;
    transform: none;
  }

  .mobile-order-illustration.delivery span::before {
    left: 12px;
    top: 28px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #7c2d12;
    box-shadow: 48px 0 0 #7c2d12;
  }

  .mobile-order-illustration.delivery span::after {
    left: 54px;
    top: -24px;
    width: 26px;
    height: 28px;
    border-radius: 8px 14px 4px 0;
    background: #ea580c;
    box-shadow: none;
  }

  .table-customer-form,
  .table-order-note-form,
  .delivery-customer-summary,
  .search-add,
  .order-items,
  .delivery-details-form {
    margin-bottom: 16px;
    padding: 18px;
  }

  .table-customer-form,
  .table-order-note-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .table-customer-form::before {
    content: "Cliente da mesa";
  }

  .table-order-note-form::before {
    content: "Obs. da mesa";
  }

  .table-customer-form::before,
  .table-order-note-form::before {
    color: #0f172a;
    font-size: 21px;
    font-weight: 900;
  }

  .table-customer-form label,
  .table-order-note-form label {
    font-size: 0;
  }

  .table-customer-form input,
  .table-order-note-form textarea,
  .search-add input,
  .delivery-details-form input,
  .delivery-details-form select,
  .delivery-details-form textarea {
    min-height: 58px;
    border-radius: 10px;
    font-size: 18px;
  }

  .table-customer-form .btn,
  .table-order-note-form .btn,
  .search-add .btn.primary,
  .delivery-details-form .btn {
    min-height: 58px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 900;
  }

  .mobile-section-title {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    color: #0f172a;
    font-size: 21px;
    font-weight: 900;
  }

  .mobile-section-title span {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    border: 3px solid #f97316;
  }

  .mobile-items-title span {
    border: 0;
    border-radius: 0;
    background: linear-gradient(#f97316, #f97316) 0 4px/24px 3px no-repeat,
                linear-gradient(#f97316, #f97316) 0 11px/24px 3px no-repeat,
                linear-gradient(#f97316, #f97316) 0 18px/24px 3px no-repeat;
  }

  .search-add {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .search-add .btn.primary {
    background: linear-gradient(135deg, #ff7a1a, #fb6b11);
    border-color: transparent;
  }

  .order-items {
    gap: 0;
  }

  .order-items article {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .order-items article > strong {
    grid-column: 1 / -1;
    color: #0f172a;
    font-size: 20px;
  }

  .order-items article > span {
    color: #0f172a;
    font-size: 18px;
  }

  .order-items article > b {
    color: #0f172a;
    font-size: 20px;
  }

  .order-items article form {
    grid-column: 1 / -1;
  }

  .order-items .link-danger {
    padding: 0;
    color: #dc2626;
    font-size: 18px;
  }

  .item-note-editor summary {
    font-size: 18px;
  }

  .mobile-order-total {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    color: #0f172a;
    font-size: 19px;
    font-weight: 900;
  }

  .order-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .order-actions > form:not(.delivery-details-form) .btn,
  .order-actions .delivery-whatsapp-actions .btn {
    width: 100%;
    min-height: 54px;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 800;
  }

  .delivery-customer-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .delivery-customer-summary strong {
    font-size: 20px;
  }

  .delivery-details-form {
    grid-template-columns: 1fr;
  }

  .delivery-details-form label,
  .table-customer-form label {
    gap: 8px;
    color: #475569;
    font-size: 15px;
    font-weight: 700;
  }

  .product-panel {
    margin-top: 16px;
    padding: 16px;
    border-radius: 18px;
  }

  body:not(.counter-pdv-body) .sidebar-toggle {
    display: none !important;
  }

  .order-left > .page-head.compact {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 10px;
    padding: 14px;
    border-radius: 14px;
  }

  .order-left > .page-head.compact h1 {
    max-width: none;
    margin-bottom: 4px;
    font-size: 28px;
    line-height: 1.05;
  }

  .order-left > .page-head.compact p {
    max-width: none;
    padding-left: 14px;
    font-size: 13px;
  }

  .order-left > .page-head.compact p::before {
    width: 8px;
    height: 8px;
  }

  .order-left > .page-head.compact .header-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
    margin-top: 4px;
  }

  .order-left > .page-head.compact .header-actions .btn {
    min-height: 42px;
    font-size: 14px;
  }

  .order-left > .page-head.compact .header-actions .btn.primary,
  .order-left > .page-head.compact .header-actions .btn.danger {
    min-height: 42px;
  }

  .mobile-order-illustration {
    display: none;
  }

  .table-customer-form,
  .table-order-note-form,
  .delivery-customer-summary,
  .search-add,
  .order-items,
  .delivery-details-form {
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 14px;
  }

  .table-customer-form::before,
  .table-order-note-form::before,
  .mobile-section-title {
    font-size: 18px;
  }

  .table-customer-form input,
  .table-order-note-form textarea,
  .search-add input,
  .delivery-details-form input,
  .delivery-details-form select,
  .delivery-details-form textarea {
    min-height: 48px;
    font-size: 15px;
  }

  .table-customer-form .btn,
  .table-order-note-form .btn,
  .search-add .btn.primary,
  .delivery-details-form .btn {
    min-height: 48px;
    font-size: 16px;
  }

  .order-items article {
    padding: 11px 0;
  }

  .order-items article > strong {
    font-size: 16px;
  }

  .order-items article > span,
  .order-items .link-danger,
  .item-note-editor summary {
    font-size: 14px;
  }

  .order-items article > b {
    font-size: 16px;
  }

  .mobile-order-tabs {
    display: grid;
  }
}

@media (min-width: 681px) and (max-width: 860px) {
  .mobile-order-tabs {
    display: none;
  }
}

@media (max-width: 520px) {
  .app-main {
    padding: 12px;
  }

  .order-left > .page-head.compact {
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }

  .order-left > .page-head.compact h1 {
    max-width: 140px;
  }

  .order-left > .page-head.compact .header-actions {
    margin-top: 10px;
  }

  .mobile-order-illustration {
    right: 12px;
    top: 22px;
    width: 122px;
    height: 122px;
  }
}

@media (max-width: 680px) {
  body.mobile-body {
    background: #f4f6fb;
  }

  body.mobile-body .sidebar-toggle,
  body:not(.mobile-body) .sidebar-toggle {
    display: none !important;
  }

  .mobile-shell {
    padding: 14px 12px 82px;
    background: #f4f6fb;
  }

  .mobile-title {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    margin: 8px 0 10px;
  }

  .mobile-title > div {
    min-width: 0;
  }

  .mobile-title > div > span,
  .mobile-admin-top span {
    display: block;
    margin-bottom: 2px;
    color: var(--orange);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  .mobile-title h1 {
    font-size: 27px;
    font-weight: 900;
    line-height: 1;
  }

  .mobile-title-chip,
  .mobile-admin-home {
    min-width: 54px;
    min-height: 36px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .06);
  }

  .mobile-summary {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 10px;
    padding: 9px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #64748b;
    font-size: 13px;
  }

  .mobile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .mobile-table {
    min-height: 90px;
    align-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 7px 16px rgba(15, 23, 42, .06);
  }

  .mobile-table.open {
    border-color: #fdba74;
    background: #fff7ed;
  }

  .chairs {
    display: none;
  }

  .round-table {
    width: 48px;
    height: 18px;
    margin-top: 0;
    border-width: 2px;
    border-radius: 999px;
  }

  .mobile-table.open .round-table {
    background: #86efac;
  }

  .mobile-table strong {
    min-width: 0;
    margin-top: 3px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #0369a1;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
  }

  .mobile-table small {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
  }

  .mobile-table.open small {
    color: #166534;
  }

  .mobile-tabs {
    height: 62px;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-tabs a {
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
  }

  .mobile-tabs span {
    font-size: 17px;
    font-weight: 900;
  }

  .mobile-admin-dashboard {
    padding: 14px 12px 82px;
  }

  .mobile-admin-top {
    grid-template-columns: auto minmax(0, 1fr) 42px;
    gap: 8px;
    margin: 8px 0 10px;
    align-items: center;
  }

  .mobile-admin-top h1 {
    font-size: 27px;
    line-height: 1;
  }

  .mobile-admin-top p {
    font-size: 12px;
  }

  .mobile-admin-refresh {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    font-size: 22px;
  }

  .mobile-admin-filter {
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 13px;
  }

  .mobile-admin-filter input {
    min-height: 38px;
  }

  .mobile-admin-filter button {
    min-height: 42px;
  }

  .mobile-admin-cards {
    gap: 10px;
    margin: 10px 0;
  }

  .mobile-admin-card {
    min-height: 100px;
    padding: 12px;
    border-radius: 14px;
  }

  .mobile-admin-card span {
    font-size: 12px;
  }

  .mobile-admin-card strong {
    font-size: 22px;
  }

  .mobile-admin-card small {
    font-size: 12px;
  }

  [data-tables-screen] {
    display: block;
    min-height: 0;
    margin-bottom: 10px;
    padding: 16px;
    border-radius: 14px;
  }

  [data-tables-screen] h1 {
    margin: 0 0 4px;
    font-size: 34px;
    line-height: 1;
  }

  [data-tables-screen] p {
    max-width: none;
    margin: 0;
    font-size: 14px;
    line-height: 1.3;
  }

  [data-tables-screen] .table-quick-shortcut {
    display: none;
  }

  .product-lookup-backdrop {
    padding: 8px;
    align-items: start;
  }

  .product-lookup-modal {
    width: 100%;
    max-height: calc(100dvh - 20px);
    padding: 14px;
    border-radius: 12px;
  }

  .product-lookup-modal .modal-header {
    align-items: start;
    gap: 8px;
  }

  .product-lookup-modal .modal-header h2 {
    font-size: 24px;
    line-height: 1.1;
  }

  .product-lookup-modal .modal-header p {
    font-size: 14px;
    line-height: 1.25;
  }

  .product-lookup-modal .icon-action {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 16px;
  }

  .product-lookup-modal label {
    font-size: 13px;
  }

  .product-lookup-modal input {
    min-height: 46px;
    font-size: 18px;
  }

  .product-lookup-table-wrap {
    max-height: min(54vh, 430px);
    overflow-x: hidden;
  }

  .product-lookup-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .product-lookup-table th,
  .product-lookup-table td {
    padding: 9px 8px;
    font-size: 13px;
  }

  .product-lookup-table th:nth-child(1),
  .product-lookup-table td:nth-child(1) {
    width: 22%;
  }

  .product-lookup-table th:nth-child(2),
  .product-lookup-table td:nth-child(2),
  .product-lookup-table th:nth-child(4),
  .product-lookup-table td:nth-child(4),
  .product-lookup-table th:nth-child(5),
  .product-lookup-table td:nth-child(5) {
    display: none;
  }

  .product-lookup-table th:nth-child(3),
  .product-lookup-table td:nth-child(3) {
    width: 50%;
  }

  .product-lookup-table th:nth-child(6),
  .product-lookup-table td:nth-child(6) {
    width: 28%;
    text-align: right;
  }

  .product-lookup-row td {
    white-space: normal;
  }

  .product-lookup-row td:nth-child(3) {
    min-width: 0;
  }

  .product-lookup-row td:nth-child(3) strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
    line-height: 1.15;
  }

  .product-lookup-row td:nth-child(6) {
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
  }

  .product-lookup-footer {
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .cashier-screen.pdv-screen {
    width: 100%;
    min-height: auto;
    padding: 12px;
    overflow-x: hidden;
  }

  .payment-box.pdv-shell {
    width: 100%;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .payment-box.pdv-shell form {
    display: grid;
    gap: 12px;
    width: 100%;
  }

  .pdv-header,
  .pdv-card,
  .cashier-buttons.pdv-buttons {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
  }

  .pdv-header {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 16px;
    border: 1px solid #e2e8f0;
  }

  .pdv-header h1 {
    font-size: 30px;
    line-height: 1;
  }

  .pdv-header p {
    font-size: 14px;
    line-height: 1.25;
  }

  .pdv-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  .pdv-form-card,
  .pdv-summary-body {
    padding: 16px;
  }

  .pdv-field {
    margin-bottom: 16px;
  }

  .pdv-section-title {
    margin-bottom: 10px;
    font-size: 17px;
  }

  .pdv-input-wrap,
  .pdv-input-wrap.select-wrap {
    grid-template-columns: 52px minmax(0, 1fr) !important;
    height: auto;
    min-height: 56px;
  }

  .pdv-input-wrap:not(.select-wrap) {
    grid-template-columns: 52px 58px minmax(0, 1fr) !important;
  }

  .pdv-input-wrap .pdv-suffix {
    display: none;
  }

  .pdv-icon,
  .pdv-prefix,
  .pdv-input-wrap select,
  .pdv-input-wrap input {
    height: 56px;
    min-height: 56px;
  }

  .pdv-input-wrap select,
  .pdv-input-wrap input {
    min-width: 0;
    font-size: 16px;
    padding: 0 12px;
  }

  .check.pdv-check {
    align-items: center;
    margin: -4px 0 16px;
    font-size: 14px;
  }

  .check.pdv-check input {
    width: 22px;
    min-width: 22px;
    height: 22px;
  }

  .pdv-summary-card .pdv-summary-head {
    padding: 14px 16px;
    border-radius: 18px 18px 0 0;
    font-size: 18px;
  }

  .pdv-summary-top {
    padding: 0 !important;
    margin-bottom: 10px !important;
    background: transparent !important;
  }

  .pdv-line {
    gap: 10px;
    margin-bottom: 8px;
    font-size: 15px;
  }

  .pdv-total-row {
    grid-template-columns: 1fr !important;
    gap: 8px;
    padding: 12px 0;
  }

  .pdv-total-row span {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    font-size: 18px;
  }

  .pdv-total-row span b {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .pdv-total-row strong {
    padding-left: 52px;
    text-align: left;
    font-size: 24px;
  }

  .cashier-buttons.pdv-buttons {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-content: stretch;
    gap: 10px;
    margin-top: 0;
    padding: 12px;
    border: 1px solid #e2e8f0;
  }

  .cashier-buttons.pdv-buttons .btn {
    width: 100%;
    min-height: 50px;
    border-radius: 12px;
    font-size: 16px;
  }
}

/* Compact cashier layout */
.cashier-screen.pdv-screen {
  min-height: calc(100vh - 70px);
  padding: 12px 24px 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.payment-box.pdv-shell form {
  gap: 10px;
}
.cashier-screen .pdv-shell {
  width: min(100%, 1480px);
  margin: 0 auto;
}
.pdv-header {
  gap: 10px;
  margin-bottom: 8px;
}
.pdv-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 21px;
}
.pdv-header h1 {
  font-size: 27px;
}
.pdv-header p {
  margin-top: 0;
  font-size: 13px;
}
.pdv-grid {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(360px, 42%);
  gap: 18px;
  align-items: stretch;
}
.pdv-form-card {
  padding: 18px 20px;
  min-width: 0;
}
.pdv-summary-card {
  min-width: 0;
  max-width: 520px;
  justify-self: stretch;
}
.pdv-summary-body {
  height: calc(100% - 52px);
  display: flex;
  flex-direction: column;
}
.cashier-payment-list {
  display: grid;
  gap: 8px;
}
.cashier-payment-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(130px, 180px) 42px;
  gap: 8px;
  align-items: center;
}
.cashier-payment-row .pdv-input-wrap {
  margin: 0;
}
.cashier-payment-row .icon-btn {
  min-height: 38px;
  height: 38px;
  padding: 0;
}
.cashier-add-payment {
  margin-top: 8px;
  min-height: 36px;
  justify-self: start;
}
.cashier-missing {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 800;
}

@media (max-width: 640px) {
  .cashier-payment-row {
    grid-template-columns: 1fr;
  }

  .cashier-payment-row .icon-btn {
    width: 100%;
  }

  .cashier-adjustment-grid {
    grid-template-columns: 1fr;
  }
}
.pdv-customer {
  margin-bottom: 14px;
  padding: 10px 12px;
}
.pdv-field {
  margin-bottom: 11px;
}
.pdv-section-title {
  margin-bottom: 7px;
  font-size: 15px;
}
.pdv-step {
  width: 23px;
  height: 23px;
  border-radius: 8px;
  font-size: 12px;
}
.pdv-input-wrap {
  height: 40px;
  grid-template-columns: 44px 52px minmax(0, 1fr) 44px;
}
.pdv-input-wrap.select-wrap {
  grid-template-columns: 44px minmax(0, 1fr);
}
.pdv-icon,
.pdv-prefix,
.pdv-suffix,
.pdv-input-wrap select,
.pdv-input-wrap input {
  height: 40px;
}
.pdv-icon {
  font-size: 18px;
}
.pdv-input-wrap select,
.pdv-input-wrap input {
  font-size: 14px;
  padding: 0 12px;
}
.cashier-payment-row {
  grid-template-columns: minmax(250px, 1fr) minmax(170px, 250px) 44px;
  align-items: center;
}
.cashier-payment-row .pdv-input-wrap,
.cashier-payment-row .pdv-input-wrap.select-wrap {
  height: 50px;
  min-height: 50px;
}
.cashier-payment-row .pdv-input-wrap:not(.select-wrap) {
  grid-template-columns: 52px minmax(0, 1fr);
}
.cashier-payment-row .pdv-prefix {
  height: 50px;
}
.cashier-payment-row .pdv-input-wrap select,
.cashier-payment-row .pdv-input-wrap input {
  height: 50px;
  min-height: 50px;
  font-size: 16px;
}
.cashier-payment-row .pdv-input-wrap input {
  min-width: 0;
  text-align: right;
  padding-right: 18px;
}
.cashier-payment-row .icon-btn {
  width: 44px;
  height: 44px;
  min-height: 44px;
}
.cashier-adjustment-button {
  width: 100%;
  min-height: 58px;
  border: 1px solid #f4d77d;
  border-radius: 12px;
  background: #fffcf2;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.cashier-adjustment-button:hover,
.cashier-adjustment-button:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.14);
  outline: none;
}
.cashier-adjustment-button small {
  display: block;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 3px;
}
.cashier-adjustment-button strong {
  color: var(--text);
  font-size: 1.05rem;
}
.cashier-adjustment-button b {
  color: var(--primary);
  white-space: nowrap;
}
.cashier-adjustment-action {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 2px 10px;
  color: #9a6500;
  text-align: left;
  white-space: nowrap;
}
.cashier-adjustment-action .cashier-key-badge {
  grid-row: span 2;
}
.cashier-adjustment-action small {
  grid-column: 2;
  margin: 0;
  color: #b77900;
  font-size: 12px;
  font-weight: 700;
}
.cashier-adjustment-modal {
  width: min(620px, calc(100vw - 28px));
}
.cashier-adjustment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 12px;
}
.cashier-adjustment-grid label {
  color: var(--muted);
  font-weight: 700;
}
.cashier-adjustment-grid input {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  text-align: right;
}
.cashier-adjustment-grid input[readonly] {
  background: #f8fafc;
  color: var(--text);
}
.cashier-adjustment-modes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cashier-adjustment-modes .btn {
  min-width: 118px;
}
.check.pdv-check {
  margin: -2px 0 11px;
  font-size: 13px;
}
.pdv-summary-card .pdv-summary-head {
  padding: 10px 18px;
  font-size: 15px;
}
.pdv-summary-body {
  padding: 14px 20px;
}
.pdv-summary-top {
  padding: 8px 0 !important;
  margin-bottom: 8px !important;
}
.pdv-line {
  margin-bottom: 7px;
  font-size: 13px;
}
.pdv-line strong {
  font-size: 14px;
}
.pdv-divider {
  margin: 8px 0;
}
.pdv-total-row {
  gap: 12px;
  padding: 9px 0;
}
.pdv-total-row span {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  font-size: 15px;
}
.pdv-total-row span b {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 14px;
}
.pdv-total-row strong {
  font-size: 20px;
}
.cashier-buttons.pdv-buttons {
  margin-top: 10px;
  padding: 8px;
  border-radius: 11px;
  gap: 8px;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  justify-content: end;
}
.cashier-buttons.pdv-buttons .btn {
  min-height: 38px;
  font-size: 14px;
  border-radius: 9px;
}
.pdv-summary-body .cashier-finish-button {
  width: 100%;
  min-height: 54px;
  margin-top: auto;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff7a00, #ff5b00);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 14px 26px rgba(255, 107, 0, .28);
}
.cashier-key-badge {
  min-width: 46px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, #16c75f, #0aa145);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(22, 163, 74, .24);
}
.cashier-key-badge.warning {
  background: linear-gradient(135deg, #ffe066, #f6b900);
  color: #111827;
  box-shadow: 0 8px 18px rgba(217, 119, 6, .22);
}
.cashier-key-badge.danger {
  background: linear-gradient(135deg, #ff7a1a, #ff5b00);
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 91, 0, .26);
}
.cashier-key-badge.light {
  background: #fff;
  color: #0f172a;
  box-shadow: none;
}
.cashier-customer-button .cashier-key-badge {
  min-width: 38px;
  height: 30px;
  background: #fff;
  color: #0f172a;
  box-shadow: none;
}
.cashier-shortcuts-bar {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  width: min(calc(100% - 48px), 1480px);
  margin: 0;
  padding: 10px 18px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .13);
  color: #0b3b73;
}
.cashier-shortcuts-bar > strong {
  flex: 0 0 auto;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 900;
}
.cashier-shortcut-item {
  min-width: 0;
  flex: 1 1 160px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-left: 18px;
  border-left: 1px solid #94a3b8;
  color: #092b5c;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}
.cashier-shortcut-item.payment-shortcut-item {
  flex-basis: 130px;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .cashier-screen.pdv-screen {
    padding-inline: 14px;
  }
  .pdv-grid {
    grid-template-columns: 1fr;
  }
  .pdv-summary-body {
    height: auto;
  }
  .pdv-summary-card {
    max-width: none;
  }
  .pdv-summary-body .cashier-finish-button {
    margin-top: 16px;
  }
  .cashier-shortcuts-bar {
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .cashier-screen.pdv-screen {
    padding: 12px 12px 190px;
  }
  .pdv-form-card,
  .pdv-summary-body {
    padding: 14px;
  }
  .pdv-total-row strong {
    padding-left: 52px;
    font-size: 21px;
  }
  .cashier-buttons.pdv-buttons {
    grid-template-columns: 1fr;
  }
  .cashier-adjustment-button {
    align-items: flex-start;
    flex-direction: column;
  }
  .cashier-shortcuts-bar {
    justify-items: stretch;
    gap: 8px;
    width: calc(100% - 24px);
    margin: 0;
    padding: 10px 12px;
    bottom: 8px;
    border-radius: 12px;
  }
  .cashier-shortcut-item {
    justify-content: flex-start;
    border-left: 0;
    padding-left: 0;
    font-size: 14px;
  }
}

.reports-head {
  display: grid;
  grid-template-columns: minmax(320px, .8fr) minmax(560px, 1.2fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.reports-title,
.reports-filter {
  border: 1px solid #e6edf5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

.reports-title {
  min-height: 318px;
  padding: 38px 36px;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 237, 213, .75), transparent 30%),
    linear-gradient(135deg, #fff 0%, #fffaf5 100%);
}

.reports-title h1 {
  margin: 22px 0 0;
  color: #0f172a;
  font-size: 40px;
  line-height: 1;
}

.reports-eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #f97316;
}

.reports-eyebrow::before {
  content: "R";
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #f97316;
  font-size: 13px;
  font-weight: 900;
}

.reports-title-line {
  display: block;
  width: 70px;
  height: 3px;
  margin-top: 22px;
  border-radius: 999px;
  background: #f97316;
}

.reports-title p {
  max-width: 430px;
  margin: 28px 0 0;
  color: #64748b;
  font-size: 18px;
  line-height: 1.45;
}

.issuer-chip {
  display: flex;
  width: min(100%, 430px);
  gap: 14px;
  align-items: center;
  margin-top: 36px;
  padding: 16px 18px;
  border: 1px solid #dbe5f2;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
}

.issuer-chip-icon {
  display: inline-grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: #fff7ed;
  color: #f97316;
  font-size: 16px;
  font-weight: 900;
}

.issuer-chip strong,
.issuer-chip small {
  display: block;
}

.issuer-chip small {
  margin-top: 4px;
  color: #64748b;
  font-weight: 700;
}

.reports-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  padding: 34px 34px 30px;
}

.reports-filter-title {
  display: flex;
  grid-column: 1 / -1;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.reports-filter-title h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
}

.reports-filter-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #fff7ed;
  color: #f97316;
  font-size: 15px;
  font-weight: 900;
}

.reports-filter label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.reports-filter input,
.reports-filter select {
  width: 100%;
  height: 50px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 14px;
  color: #0f172a;
  font-size: 15px;
  background: #fff;
}

.reports-filter input:focus,
.reports-filter select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
  outline: none;
}

.reports-filter .report-type-field {
  grid-column: span 2;
}

.reports-filter .report-search-field {
  grid-column: span 2;
}

.reports-filter .report-query-field {
  grid-column: 1 / -1;
}

.report-favorite-row {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 0;
  border: 0;
  background: transparent;
}

.report-favorite-toggle {
  min-height: 42px;
  padding: 0 16px;
  border-color: #dbe5f2;
  color: #475569;
  font-size: 14px;
  font-weight: 800;
}

.report-favorite-toggle.is-favorite {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.report-favorite-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.report-favorite-chip {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.report-favorite-chip:hover {
  background: #dbeafe;
}

.report-actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.report-actions .btn {
  min-width: 150px;
  min-height: 48px;
}

.reports-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.report-metric {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  padding: 18px;
  border: 1px solid #fed7aa;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #fff7ed);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
}

.report-metric::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -26px;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: rgba(249, 115, 22, .12);
}

.report-metric span {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-metric strong {
  display: block;
  margin-top: 10px;
  color: #0f172a;
  font-size: 28px;
}

.report-metric small {
  display: block;
  margin-top: 8px;
  color: #94a3b8;
  font-weight: 700;
}

.reports-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.report-card {
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.report-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.report-card-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 24px;
}

.report-card-head p {
  margin: 4px 0 0;
  color: #64748b;
}

.report-count {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff7ed;
  color: #ea580c;
  font-size: 13px;
  font-weight: 900;
}

.reports-table-wrap {
  overflow-x: auto;
}

.reports-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.reports-table th {
  padding: 13px 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.reports-table th:first-child {
  border-radius: 12px 0 0 12px;
}

.reports-table th:last-child {
  border-radius: 0 12px 12px 0;
}

.reports-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #eef2f7;
  color: #0f172a;
  vertical-align: middle;
}

.reports-dynamic-table td {
  max-width: 360px;
  word-break: break-word;
}

.reports-table tbody tr:hover {
  background: #fff7ed;
}

.rank-badge {
  display: inline-flex;
  width: 40px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff7ed;
  color: #ea580c;
  font-weight: 900;
}

.report-product-name {
  display: block;
  text-transform: uppercase;
}

.report-muted {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
}

.report-money {
  color: #159447;
  font-weight: 900;
}

.report-wide {
  margin-bottom: 24px;
}

.customer-credit-report {
  display: grid;
  gap: 16px;
}

.customer-credit-report-group {
  border: 1px solid #dbeafe;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.customer-credit-report-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: #f8fbff;
  border-bottom: 1px solid #e5efff;
}

.customer-credit-report-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
}

.customer-credit-report-head small,
.customer-credit-report-table small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.customer-credit-report-balance {
  min-width: 130px;
  text-align: right;
}

.customer-credit-report-balance span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.customer-credit-report-balance strong {
  color: #047857;
  font-size: 20px;
}

.customer-credit-report-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #eef2f7;
}

.customer-credit-report-totals span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
}

.customer-credit-report-table th,
.customer-credit-report-table td {
  padding: 10px 12px;
}

.report-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #64748b;
  text-align: center;
  font-weight: 800;
}

.report-print-header {
  display: none;
}

.issued-report {
  color: #111827;
}

.issued-report-title {
  text-align: center;
  margin-bottom: 12px;
}

.issued-report-title h3 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: .02em;
}

.issued-report-title strong,
.issued-report-title small {
  display: block;
}

.issued-report-title small,
.issued-report-filters {
  color: #475569;
  font-size: 12px;
}

.issued-report-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
  margin-bottom: 14px;
}

.issued-day {
  margin-top: 14px;
}

.issued-day-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 8px 10px;
  border-top: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-size: 13px;
}

.issued-table th,
.issued-table td {
  font-size: 12px;
  padding: 7px 8px;
}

.issued-table td:nth-child(4),
.issued-table td:nth-child(5) {
  text-align: center;
}

.issued-empty {
  padding: 18px;
  color: #64748b;
  text-align: center;
}

.issued-grand-total {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  margin-top: 14px;
  padding: 10px 12px;
  border-top: 2px solid #0f172a;
  color: #0f172a;
  font-size: 13px;
}

.nfce-cfop-block {
  margin-top: 18px;
  border-top: 1px dashed #64748b;
  padding-top: 10px;
}

.nfce-cfop-title,
.nfce-tax-title,
.nfce-cfop-total {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-size: 13px;
}

.nfce-cfop-title strong,
.nfce-tax-title strong {
  text-decoration: underline;
}

.nfce-cfop-title span,
.nfce-tax-title span {
  font-style: italic;
}

.nfce-tax-title {
  margin: 8px 0 6px 32px;
  padding-bottom: 5px;
  border-bottom: 1px dashed #94a3b8;
}

.nfce-cfop-table th,
.nfce-cfop-table td {
  font-size: 12px;
  padding: 6px 7px;
}

.nfce-cfop-table th:nth-child(5),
.nfce-cfop-table td:nth-child(5) {
  min-width: 260px;
}

.nfce-cfop-total {
  justify-content: flex-end;
  gap: 24px;
  margin-top: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.inventory-report {
  color: #111827;
}

.inventory-title {
  border: 1px solid #111827;
  border-bottom: 0;
  padding: 8px 10px 10px;
}

.inventory-title h3 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
}

.inventory-meta {
  display: grid;
  grid-template-columns: 1.4fr .8fr .8fr .45fr .45fr 1fr;
  gap: 4px 10px;
  font-size: 12px;
}

.inventory-table {
  border-collapse: collapse;
  border-spacing: 0;
  border: 1px solid #111827;
}

.inventory-table th,
.inventory-table td {
  border: 1px solid #111827;
  padding: 5px 6px;
  font-size: 12px;
}

.inventory-table th {
  background: #fff;
  color: #111827;
  text-align: center;
  text-transform: none;
}

.inventory-table tfoot td {
  font-weight: 900;
  border-top: 2px solid #111827;
}

.report-number {
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .reports-head,
  .reports-grid {
    grid-template-columns: 1fr;
  }

  .reports-title {
    min-height: auto;
  }

  .reports-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .reports-filter,
  .reports-summary {
    grid-template-columns: 1fr;
  }

  .reports-title,
  .reports-filter {
    padding: 22px;
    border-radius: 14px;
  }

  .reports-title h1 {
    font-size: 34px;
  }

  .reports-title p {
    font-size: 16px;
  }

  .issuer-chip {
    align-items: flex-start;
  }

  .reports-filter .report-type-field,
  .reports-filter .report-search-field,
  .reports-filter .report-query-field {
    grid-column: 1;
  }

  .report-favorite-row {
    align-items: stretch;
    flex-direction: column;
  }

  .report-actions {
    flex-direction: column;
  }

  .report-actions .btn {
    width: 100%;
  }

  .report-card-head {
    flex-direction: column;
  }
}

@media print {
  body {
    background: #fff !important;
  }

  .sidebar,
  .sidebar-toggle,
  .topbar {
    display: none !important;
  }

  .app-main {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .reports-head,
  .reports-summary,
  .report-card {
    box-shadow: none;
  }

  .reports-head,
  .reports-summary,
  .report-card-head,
  .issuer-chip,
  .report-card,
  .report-metric {
    border-radius: 0;
  }

  .reports-head,
  .reports-summary,
  .report-card-head {
    display: none !important;
  }

  .reports-filter,
  .no-print {
    display: none !important;
  }

  .reports-grid {
    grid-template-columns: 1fr;
  }

  .reports-table {
    font-size: 11px;
  }

  .reports-table th,
  .reports-table td {
    padding: 6px;
  }

  .report-card {
    border: 0;
    padding: 0;
  }

  .report-print-header {
    display: block;
    margin-bottom: 10px;
    color: #111827;
    text-align: center;
    font-size: 9px;
  }

  .report-print-header h3 {
    margin: 0 0 4px;
    font-size: 13px;
  }

  .report-print-header strong,
  .report-print-header span,
  .report-print-header small {
    display: block;
  }

  .report-print-header div {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #111827;
    text-align: left;
  }

  .reports-table tfoot td {
    border-top: 2px solid #111827;
    border-bottom: 0;
    font-weight: 900;
  }

  .issued-report-title h3 {
    font-size: 13px;
  }

  .issued-report-title,
  .issued-report-filters,
  .issued-day-head,
  .issued-table th,
  .issued-table td {
    font-size: 9px;
  }

  .issued-report-filters {
    border: 0;
    padding: 0 0 8px;
    background: transparent;
  }

  .issued-day {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .issued-day-head {
    border-color: #111827;
    background: #fff;
  }

  .issued-grand-total {
    font-size: 9px;
    border-color: #111827;
    padding: 6px 0 0;
  }

  .inventory-title {
    border-color: #111827;
    padding: 4px 6px;
  }

  .inventory-title h3 {
    font-size: 13px;
  }

  .inventory-meta {
    grid-template-columns: 1fr 1fr 1fr;
    font-size: 8.5px;
  }

  .inventory-table th,
  .inventory-table td {
    font-size: 8px;
    padding: 3px 4px;
  }

  .nfce-cfop-tax-report {
    font-size: 7px;
  }

  .nfce-cfop-tax-report .issued-report-title {
    margin-bottom: 5px;
  }

  .nfce-cfop-tax-report .issued-report-title h3 {
    font-size: 10px;
    margin-bottom: 2px;
  }

  .nfce-cfop-tax-report .issued-report-title strong,
  .nfce-cfop-tax-report .issued-report-title small,
  .nfce-cfop-tax-report .issued-report-filters,
  .nfce-cfop-title,
  .nfce-tax-title,
  .nfce-cfop-total,
  .nfce-cfop-table th,
  .nfce-cfop-table td {
    font-size: 7px;
    line-height: 1.12;
  }

  .nfce-cfop-tax-report .issued-report-filters {
    gap: 2px 5px;
    margin-bottom: 6px;
    padding-bottom: 4px;
  }

  .nfce-cfop-block {
    margin-top: 7px;
    padding-top: 4px;
    break-inside: auto;
    page-break-inside: auto;
  }

  .nfce-cfop-title,
  .nfce-tax-title {
    gap: 4px;
  }

  .nfce-tax-title {
    margin: 4px 0 3px 14px;
    padding-bottom: 2px;
  }

  .nfce-cfop-table {
    table-layout: fixed;
    width: 100%;
  }

  .nfce-cfop-table th,
  .nfce-cfop-table td {
    padding: 2px 3px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .nfce-cfop-table th:nth-child(1),
  .nfce-cfop-table td:nth-child(1) { width: 6%; }
  .nfce-cfop-table th:nth-child(2),
  .nfce-cfop-table td:nth-child(2) { width: 7%; }
  .nfce-cfop-table th:nth-child(3),
  .nfce-cfop-table td:nth-child(3) { width: 7%; }
  .nfce-cfop-table th:nth-child(4),
  .nfce-cfop-table td:nth-child(4) { width: 9%; }
  .nfce-cfop-table th:nth-child(5),
  .nfce-cfop-table td:nth-child(5) { width: 25%; min-width: 0; }
  .nfce-cfop-table th:nth-child(6),
  .nfce-cfop-table td:nth-child(6) { width: 5%; }
  .nfce-cfop-table th:nth-child(7),
  .nfce-cfop-table td:nth-child(7) { width: 8%; }
  .nfce-cfop-table th:nth-child(8),
  .nfce-cfop-table td:nth-child(8) { width: 7%; }
  .nfce-cfop-table th:nth-child(9),
  .nfce-cfop-table td:nth-child(9) { width: 8%; }
  .nfce-cfop-table th:nth-child(10),
  .nfce-cfop-table td:nth-child(10) { width: 6%; }
  .nfce-cfop-table th:nth-child(11),
  .nfce-cfop-table td:nth-child(11) { width: 8%; }

  .nfce-cfop-table .report-money,
  .nfce-cfop-table td:nth-child(6),
  .nfce-cfop-table td:nth-child(7),
  .nfce-cfop-table td:nth-child(8),
  .nfce-cfop-table td:nth-child(9),
  .nfce-cfop-table td:nth-child(10),
  .nfce-cfop-table td:nth-child(11) {
    text-align: right;
    white-space: nowrap;
  }

  .nfce-cfop-table tfoot td {
    padding: 3px;
  }

  .nfce-cfop-total,
  .nfce-cfop-tax-report .issued-grand-total {
    font-size: 7px;
    padding: 3px 0;
    gap: 10px;
  }
}

.brand img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.topbar .topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar .topbar-title > img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.topbar .topbar-title > div {
  display: grid;
  gap: 2px;
}

.issuer-logo-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}

.issuer-logo-preview img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.modern-metrics .metric-card {
  position: relative;
  min-height: 126px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #fed7aa;
  background: linear-gradient(180deg, #fff, #fff7ed);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  overflow: hidden;
}

.modern-metrics .metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .12);
  border-color: #fb923c;
}

.modern-metrics .metric-card span {
  display: block;
  margin-bottom: 8px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.modern-metrics .metric-card strong {
  display: block;
  color: #111827;
  font-size: 24px;
}

.modern-metrics .metric-card small {
  display: block;
  margin-top: 8px;
  color: #9ca3af;
}

.modern-metrics .metric-card.danger {
  background: linear-gradient(180deg, #fff, #fef2f2);
  border-color: #fecaca;
}

.modern-metrics .metric-card.danger strong {
  color: #991b1b;
}

.modern-metrics .metric-card.success {
  background: linear-gradient(180deg, #fff, #f0fdf4);
  border-color: #bbf7d0;
}

.modern-metrics .metric-card.success strong {
  color: #16a34a;
}

.modern-metrics .metric-card.warning {
  background: linear-gradient(180deg, #fff, #eff6ff);
  border-color: #bfdbfe;
}

.modern-metrics .metric-card.warning strong {
  color: #2563eb;
}

.dashboard-grid .dashboard-bars {
  min-height: 300px;
  align-items: stretch;
  padding: 36px 12px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fafc 0, #fff 100%);
  background-image: repeating-linear-gradient(to top, rgba(148, 163, 184, .18) 0 1px, transparent 1px 56px);
}

.dashboard-grid .dashboard-bars .bar-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 72px;
  height: 260px;
}

.dashboard-grid .dashboard-bars .bar-item span {
  width: 44px;
  background: linear-gradient(180deg, #fb923c, #ea580c);
  box-shadow: 0 10px 22px rgba(234, 88, 12, .24);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
}

.status-badge.danger {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

.status-badge.neutral {
  background: #f8fafc;
  border-color: #dbe3ee;
  color: #334155;
}

.receivable-overdue {
  background: #fff5f5;
}

.receivable-overdue td:first-child {
  border-left: 5px solid #dc2626;
}

.receivables-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.receivables-head > div {
  max-width: 760px;
}

.receivables-head h1 {
  max-width: none;
  margin-bottom: 8px;
  line-height: 1.05;
}

.receivables-head p {
  max-width: 680px;
}

.receivables-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  width: 100%;
  max-width: 100%;
  gap: 12px;
  overflow: visible;
}

.receivables-filters > * {
  min-width: 0;
  box-sizing: border-box;
}

.receivables-filters .receivable-customer-filter {
  grid-column: span 2;
}

.receivables-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.receivables-filters input,
.receivables-filters select {
  min-height: 42px;
  width: 100%;
}

.receivables-filters .btn {
  min-height: 42px;
  align-self: end;
  white-space: nowrap;
  width: 100%;
}

.receivable-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: nowrap;
}
.receivable-actions form {
  margin: 0;
}
.receivable-note {
  display: inline-block;
  max-width: 360px;
  overflow-wrap: anywhere;
}

.receivable-bulk-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) minmax(160px, 210px) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #f8fbff;
}

.receivable-bulk-form > div {
  display: grid;
  gap: 4px;
}

.receivable-bulk-form span {
  color: var(--muted);
  font-weight: 700;
}

.receivable-bulk-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.receivable-bulk-form select,
.receivable-bulk-form input {
  min-height: 42px;
  width: 100%;
}

.receivable-bulk-form .btn {
  min-height: 42px;
  white-space: nowrap;
}

.receivable-check-cell {
  width: 44px;
  min-width: 44px;
  text-align: center;
}

.receivable-check-cell input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

[data-receivable-row] {
  cursor: pointer;
}

[data-receivable-row].is-selected td {
  background: #f0f9ff;
  box-shadow: inset 0 1px 0 #bae6fd, inset 0 -1px 0 #bae6fd;
}

[data-receivable-row].is-selected td:first-child {
  border-left: 5px solid #0284c7;
}

.receivable-detail-panel {
  margin-top: 16px;
}

.receivable-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}

.receivable-detail-head h2 {
  margin: 0 0 6px;
}

.receivable-detail-head p {
  margin: 0;
  color: var(--muted);
}

.receivable-detail-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.receivable-detail-summary span {
  min-width: 116px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.receivable-detail-summary small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.receivable-detail-summary strong {
  display: block;
  margin-top: 2px;
}

.receivable-items-table td:nth-child(3),
.receivable-items-table td:nth-child(4),
.receivable-items-table td:nth-child(5),
.receivable-items-table td:nth-child(6) {
  white-space: nowrap;
}

.receivable-item-extra {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.receivable-item-extra span {
  margin-left: 8px;
}

@media (max-width: 1280px) {
  .receivables-filters {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
  }

  .receivables-filters .receivable-customer-filter {
    grid-column: span 2;
  }

  .receivable-bulk-form {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 760px) {
  .receivables-filters {
    grid-template-columns: 1fr;
  }

  .receivables-filters .receivable-customer-filter {
    grid-column: auto;
  }

  .receivable-bulk-form {
    grid-template-columns: 1fr;
  }

  .receivable-detail-head {
    display: grid;
  }

  .receivable-detail-summary {
    justify-content: stretch;
  }

  .receivable-detail-summary span {
    flex: 1 1 150px;
  }
}
.mini-action {
  width: 72px;
  min-height: 52px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  line-height: 1.05;
}
.mini-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mini-action span {
  font-size: 11px;
}
.mini-action.cash {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #15803d;
}
.mini-action.print {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}
.mini-action.timeline {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}
.mini-action.delete {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #e11d48;
}

.tabs-line a.danger-tab {
  color: #991b1b;
  border-color: #fecaca;
}

.tabs-line a.danger-tab.active {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}

/* Ajustes finais das telas operacionais recentes */
.modern-metrics {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.modern-metrics article.success {
  background: linear-gradient(180deg, #fff, #ecfdf5);
  border-color: #bbf7d0;
}
.modern-metrics article.success strong { color: #15803d; }
.modern-metrics article.warning {
  background: linear-gradient(180deg, #fff, #eff6ff);
  border-color: #bfdbfe;
}
.modern-metrics article.warning strong { color: #1d4ed8; }

.online-success-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.online-success .online-btn {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  white-space: normal;
  text-align: center;
  line-height: 1.15;
}

@media (max-width: 760px) {
  .online-success-actions { grid-template-columns: 1fr; }
  .online-success {
    width: min(100%, 680px);
    margin: 42px auto;
    padding: 28px 18px;
  }
  .online-success h1 {
    font-size: 36px;
    line-height: 1.16;
  }
}

/* =========================================================
   DASHBOARD - MELHORIA VISUAL
   Adicionado para melhorar somente a tela de dashboard
   ========================================================= */

.page-head {
  padding: 22px;
  border: 1px solid rgba(223, 228, 234, .9);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
  box-shadow: 0 12px 30px rgba(24, 39, 75, .08);
}

.page-head h1 {
  font-size: 34px;
  line-height: 1.1;
  font-weight: 800;
  color: #17202a;
}

.page-head p {
  font-size: 15px;
}

.header-filter {
  padding: 12px;
  border: 1px solid rgba(223, 228, 234, .9);
  border-radius: 14px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 8px 20px rgba(24, 39, 75, .06);
}

.header-filter input {
  border-radius: 11px;
  background: #fff;
}

.header-filter .btn.primary,
.header-filter button.primary {
  min-height: 42px;
  border-radius: 11px;
  box-shadow: 0 8px 18px rgba(244, 124, 32, .24);
}

.metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.metrics article {
  position: relative;
  overflow: hidden;
  padding: 22px;
  gap: 10px;
  border-radius: 18px;
  border: 1px solid rgba(254, 215, 170, .95);
  background: linear-gradient(145deg, #ffffff 0%, #fff7ed 100%);
  box-shadow: 0 12px 28px rgba(24, 39, 75, .08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.metrics article::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -28px;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: rgba(244, 124, 32, .11);
}

.metrics article:hover {
  transform: translateY(-3px);
  border-color: rgba(244, 124, 32, .45);
  box-shadow: 0 18px 36px rgba(24, 39, 75, .13);
}

.metrics article span {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #687385;
}

.metrics article strong {
  position: relative;
  z-index: 1;
  font-size: 31px;
  line-height: 1.08;
  font-weight: 800;
  color: #f47c20;
}

.metrics article:nth-child(2) strong { color: #1d72b8; }
.metrics article:nth-child(3) strong { color: #2f9e44; }
.metrics article:nth-child(4) strong { color: #7c3aed; }
.metrics article:nth-child(5) {
  border-color: rgba(248, 113, 113, .28);
  background: linear-gradient(145deg, #ffffff 0%, #fef2f2 100%);
}
.metrics article:nth-child(5) strong { color: #dc3545; }
.metrics article:nth-child(5)::after { background: rgba(220, 53, 69, .09); }

.dashboard-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
  gap: 20px;
}

.panel {
  border-radius: 18px;
  border: 1px solid rgba(223, 228, 234, .95);
  box-shadow: 0 12px 30px rgba(24, 39, 75, .08);
}

.panel h2 {
  font-size: 20px;
  font-weight: 800;
  color: #17202a;
  margin-bottom: 14px;
}

.bar-chart {
  min-height: 280px;
  gap: 14px;
  padding: 18px 6px 6px;
}

.bar-item {
  flex-basis: 68px;
}

.bar-item strong {
  color: #45505f;
  font-size: 11px;
}

.bar-item span {
  width: 34px;
  border-radius: 14px 14px 5px 5px;
  background: linear-gradient(180deg, #ffb16e 0%, #f47c20 58%, #d95f0e 100%);
  box-shadow: 0 8px 16px rgba(244, 124, 32, .25);
}

.bar-item small {
  font-weight: 700;
}

.table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
}

.table-wrap th {
  background: #f8fafc;
  color: #687385;
  font-size: 12px;
  font-weight: 800;
}

.table-wrap th:first-child { border-radius: 12px 0 0 12px; }
.table-wrap th:last-child { border-radius: 0 12px 12px 0; }

.table-wrap td {
  font-size: 14px;
}

.table-wrap tbody tr {
  transition: background .15s ease;
}

.table-wrap tbody tr:hover {
  background: #fff7ed;
}

.table-wrap tbody td:last-child {
  font-weight: 800;
  color: #2f9e44;
}

@media (max-width: 1120px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .page-head {
    align-items: stretch;
    padding: 18px;
  }

  .metrics {
    grid-template-columns: 1fr;
  }
}

/* Dashboard final override */
.dash-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid rgba(243, 244, 246, .95);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.dash-head h1 {
  margin: 0;
  font-size: 30px;
  color: #111827;
}

.dash-head p {
  margin: 6px 0 0;
  color: #6b7280;
}

.dash-head .header-filter {
  display: flex;
  gap: 10px;
  align-items: end;
  background: #fff;
  padding: 14px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

.modern-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.modern-metrics article {
  min-height: 126px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #fed7aa;
  background: linear-gradient(180deg, #fff, #fff7ed);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
}

.modern-metrics article::after {
  display: none;
}

.modern-metrics article span {
  display: block;
  margin-bottom: 8px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.modern-metrics article strong {
  display: block;
  color: #111827;
  font-size: 24px;
}

.modern-metrics article small {
  display: block;
  margin-top: 8px;
  color: #9ca3af;
}

.modern-metrics article.danger {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff, #fef2f2);
}

.modern-metrics article.danger strong {
  color: #991b1b;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.dashboard-grid .panel {
  padding: 20px;
  border: 1px solid #f3f4f6;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.dashboard-grid .panel-title {
  margin-bottom: 18px;
}

.dashboard-grid .panel-title h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
}

.dashboard-grid .panel-title p {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.dashboard-grid .bar-chart {
  min-height: 240px;
  display: flex;
  align-items: end;
  gap: 14px;
  overflow-x: auto;
  padding: 10px 4px 0;
}

.dashboard-grid .bar-item {
  min-width: 62px;
  flex-basis: auto;
  text-align: center;
}

.dashboard-grid .bar-item strong {
  display: block;
  margin-bottom: 8px;
  color: #374151;
  font-size: 11px;
}

.dashboard-grid .bar-item span {
  display: block;
  width: 34px;
  margin: 0 auto;
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(180deg, #fb923c, #ea580c);
  box-shadow: none;
}

.dashboard-grid .bar-item small {
  display: block;
  margin-top: 8px;
  color: #6b7280;
  font-weight: 600;
}

.dashboard-grid .modern-table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-grid .modern-table th {
  padding: 12px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 12px;
  text-align: left;
}

.dashboard-grid .modern-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}

.gdoor-import-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.gdoor-import-form label {
  display: grid;
  gap: 8px;
  color: #475569;
  font-weight: 700;
}

.gdoor-import-form input[type="file"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
}

.gdoor-import-form small {
  color: #64748b;
  font-weight: 600;
}

.gdoor-upload-note,
.gdoor-upload-warning {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 700;
}

.gdoor-upload-note {
  color: #92400e;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.gdoor-upload-warning {
  grid-column: 1 / -1;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.gdoor-import-form .btn {
  align-self: end;
}

.gdoor-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.gdoor-result-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  background: #fbfdff;
}

.gdoor-result-card h3 {
  margin: 0 0 10px;
  color: #0b2239;
}

.gdoor-result-card p {
  margin: 6px 0;
  color: #64748b;
}

.alert {
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 8px;
}

.alert ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.alert.danger {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.alert.warning {
  color: #92400e;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.user-permissions {
  display: grid;
  gap: 14px;
  margin: 8px 0 16px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fbfdff;
}

.user-permissions h2 {
  margin: 0;
  font-size: 18px;
}

.user-permissions .muted {
  margin: -8px 0 0;
}

.permission-group {
  display: grid;
  gap: 8px;
}

.permission-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 12px;
}

.permission-check {
  margin: 0;
}

.fiscal-payment-fix-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fiscal-payment-fix-form select {
  min-width: 180px;
}

.sync-page {
  display: grid;
  gap: 22px;
}

.sync-status-pill {
  align-self: center;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #475569;
}

.sync-status-pill.online {
  color: #047857;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.sync-status-pill.offline {
  color: #b45309;
  background: #fff7ed;
  border-color: #fed7aa;
}

.sync-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
}

.sync-metrics article {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fffaf5;
  padding: 18px 22px;
}

.sync-metrics span {
  display: block;
  color: #64748b;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
}

.sync-metrics strong {
  display: block;
  margin-top: 8px;
  color: #0b2239;
  font-size: 34px;
}

.sync-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

.sync-panel {
  display: grid;
  gap: 14px;
}

.sync-panel h2 {
  margin: 0;
}

.sync-endpoints {
  display: grid;
  gap: 8px;
}

.sync-endpoints code,
.sync-table code {
  display: inline-block;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.sync-node-form,
.inline-form {
  display: grid;
  gap: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 800;
  font-size: 13px;
}

.status-badge.success {
  color: #047857;
  background: #dcfce7;
}

.status-badge.warning {
  color: #b45309;
  background: #fff7ed;
}

.status-badge.danger {
  color: #dc2626;
  background: #fee2e2;
}

.sync-error-list {
  display: grid;
  gap: 10px;
}

.sync-error-list article {
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px;
  background: #fff7f7;
}

.sync-error-list article span {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 13px;
}

.sync-error-list article p {
  margin: 8px 0 0;
  color: #991b1b;
}

@media (max-width: 1000px) {
  .modern-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dash-head {
    flex-direction: column;
    align-items: stretch;
  }

  .gdoor-import-form,
  .gdoor-result-grid,
  .sync-grid,
  .sync-metrics {
    grid-template-columns: 1fr;
  }

  .nfe-detail-page .nfe-detail-hero {
    align-items: stretch;
  }

  .nfe-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nfe-detail-actions .nfe55-email-form {
    width: 100%;
  }

  .nfe-detail-page .nfe-item-picker {
    grid-template-columns: 1fr;
  }

  .nfe-detail-page .nfe-item-picker [data-nfe-item-feedback] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .modern-metrics {
    grid-template-columns: 1fr;
  }

  .dash-head .header-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .nfe-detail-page .nfe-detail-hero,
  .nfe-summary-grid,
  .nfe-detail-page > .alert,
  .nfe-detail-page .nfe55-form,
  .nfe-detail-page .nfe-item-picker,
  .nfe-section-title,
  .nfe-items-table,
  .nfe-detail-actions {
    margin-left: 14px;
    margin-right: 14px;
  }

  .nfe-detail-page .nfe-detail-hero {
    padding: 22px 14px;
    margin-left: 0;
    margin-right: 0;
  }

  .nfe-summary-grid {
    grid-template-columns: 1fr;
  }

  .nfe-detail-actions .nfe55-email-form {
    display: grid;
  }
}

/* Tema temporario da Copa para PDV de balcao. Remover este bloco quando acabar a campanha. */
body.pdv-copa-green,
body.pdv-copa-blue,
body.pdv-copa-light {
  --pdv-copa-line: #ffd735;
  --pdv-copa-green: #0f9f4f;
  --pdv-copa-yellow: #ffd735;
  --pdv-copa-blue: #0b4da2;
  --pdv-copa-danger: #ef4444;
}

body.pdv-copa-green {
  --paper: #061f16;
  --white: #f7fff9;
  --ink: #f8fff9;
  --muted: #d5e7dd;
  --line: rgba(255, 215, 53, .34);
  --pdv-copa-panel: rgba(5, 51, 31, .92);
  --pdv-copa-panel-soft: rgba(8, 71, 43, .82);
  --pdv-copa-summary: #ffd735;
  --pdv-copa-summary-text: #062819;
  background:
    radial-gradient(circle at 8% 20%, rgba(255, 215, 53, .28), transparent 18rem),
    radial-gradient(circle at 88% 12%, rgba(15, 159, 79, .35), transparent 20rem),
    linear-gradient(135deg, #04140f 0%, #062719 52%, #02100b 100%);
}

body.pdv-copa-blue {
  --paper: #061832;
  --white: #f8fbff;
  --ink: #f8fbff;
  --muted: #d9e5f9;
  --line: rgba(255, 215, 53, .34);
  --pdv-copa-panel: rgba(8, 31, 68, .94);
  --pdv-copa-panel-soft: rgba(10, 43, 90, .86);
  --pdv-copa-summary: #0b4da2;
  --pdv-copa-summary-text: #ffffff;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 215, 53, .24), transparent 18rem),
    radial-gradient(circle at 85% 8%, rgba(15, 159, 79, .28), transparent 20rem),
    linear-gradient(135deg, #061832 0%, #08224b 58%, #031027 100%);
}

body.pdv-copa-light {
  --paper: #f8fbff;
  --white: #ffffff;
  --ink: #071429;
  --muted: #516176;
  --line: rgba(11, 77, 162, .16);
  --pdv-copa-panel: rgba(255, 255, 255, .96);
  --pdv-copa-panel-soft: #ffffff;
  --pdv-copa-summary: #ffffff;
  --pdv-copa-summary-text: #071429;
  background:
    linear-gradient(120deg, rgba(15, 159, 79, .12), transparent 18rem),
    linear-gradient(300deg, rgba(255, 215, 53, .24), transparent 22rem),
    #f8fbff;
}

body[class*="pdv-copa-"] .app-main {
  background: transparent;
}

body[class*="pdv-copa-"] .topbar {
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid var(--pdv-copa-line);
  background:
    linear-gradient(90deg, rgba(15, 159, 79, .18), rgba(255, 215, 53, .18), rgba(11, 77, 162, .16)),
    var(--pdv-copa-panel);
  color: var(--ink);
}

body[class*="pdv-copa-"] .topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, #0f9f4f 0 33%, #ffd735 33% 66%, #0b4da2 66% 100%);
}

body[class*="pdv-copa-"] .topbar-title strong,
body[class*="pdv-copa-"] .topbar-title .muted {
  color: inherit;
}

body[class*="pdv-copa-"] .counter-pdv-layout .order-left,
body[class*="pdv-copa-"] .counter-pdv-layout .order-main-card,
body[class*="pdv-copa-"] .counter-pdv-layout .search-add,
body[class*="pdv-copa-"] .counter-pdv-layout .order-items,
body[class*="pdv-copa-"] .counter-summary-card,
body[class*="pdv-copa-"] .counter-favorites-card,
body[class*="pdv-copa-"] .cashier-screen .pdv-shell,
body[class*="pdv-copa-"] .cashier-screen .pdv-form-card,
body[class*="pdv-copa-"] .cashier-screen .pdv-summary-card,
body[class*="pdv-copa-"] .cashier-screen .cashier-customer,
body[class*="pdv-copa-"] .cashier-screen .cashier-payment-row,
body[class*="pdv-copa-"] .cashier-screen .cashier-adjust-card {
  border-color: var(--pdv-copa-line);
  background: var(--pdv-copa-panel);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .18);
  color: var(--ink);
}

body.pdv-copa-green .counter-pdv-layout .order-left,
body.pdv-copa-green .counter-pdv-layout .order-main-card,
body.pdv-copa-green .counter-pdv-layout .search-add,
body.pdv-copa-green .counter-pdv-layout .order-items,
body.pdv-copa-green .counter-favorites-card,
body.pdv-copa-green .cashier-screen .pdv-form-card,
body.pdv-copa-blue .counter-pdv-layout .order-left,
body.pdv-copa-blue .counter-pdv-layout .order-main-card,
body.pdv-copa-blue .counter-pdv-layout .search-add,
body.pdv-copa-blue .counter-pdv-layout .order-items,
body.pdv-copa-blue .counter-favorites-card,
body.pdv-copa-blue .cashier-screen .pdv-form-card {
  background:
    linear-gradient(135deg, rgba(255, 215, 53, .08), transparent 24%),
    var(--pdv-copa-panel);
}

body[class*="pdv-copa-"] .page-head.compact,
body[class*="pdv-copa-"] .order-title h1,
body[class*="pdv-copa-"] .counter-summary-card h2,
body[class*="pdv-copa-"] .counter-favorites-card h2,
body[class*="pdv-copa-"] .pdv-page-title h1,
body[class*="pdv-copa-"] .cashier-section-title,
body[class*="pdv-copa-"] .cashier-step-title {
  color: var(--ink);
}

body[class*="pdv-copa-"] .muted,
body[class*="pdv-copa-"] .counter-summary-label,
body[class*="pdv-copa-"] .counter-summary-stats span,
body[class*="pdv-copa-"] .counter-favorite-tile small {
  color: var(--muted);
}

body[class*="pdv-copa-"] .counter-summary-card,
body[class*="pdv-copa-"] .cashier-screen .pdv-summary-card {
  background: var(--pdv-copa-summary);
  color: var(--pdv-copa-summary-text);
}

body[class*="pdv-copa-"] .counter-summary-card h2,
body[class*="pdv-copa-"] .counter-summary-card .counter-summary-value,
body[class*="pdv-copa-"] .counter-summary-card .counter-summary-total,
body[class*="pdv-copa-"] .counter-summary-card .counter-summary-stats,
body[class*="pdv-copa-"] .counter-summary-card .counter-summary-stats span {
  color: var(--pdv-copa-summary-text);
}

body[class*="pdv-copa-"] .counter-summary-card .counter-pay-btn,
body[class*="pdv-copa-"] .counter-finish-btn,
body[class*="pdv-copa-"] .cashier-screen .pdv-finalize-btn,
body[class*="pdv-copa-"] .cashier-screen .counter-finish-btn {
  border: 0;
  background: linear-gradient(135deg, #0f9f4f, #047a3c);
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(15, 159, 79, .28);
}

body[class*="pdv-copa-"] .counter-items-head,
body[class*="pdv-copa-"] .counter-pdv-layout .order-items-header,
body[class*="pdv-copa-"] .pdv-summary-head {
  border-color: var(--pdv-copa-line);
  background: linear-gradient(90deg, #ffd735, #fbbf24);
  color: #062819;
}

body[class*="pdv-copa-"] input,
body[class*="pdv-copa-"] select,
body[class*="pdv-copa-"] textarea,
body[class*="pdv-copa-"] .counter-favorite-tile,
body[class*="pdv-copa-"] .pdv-payment-select,
body[class*="pdv-copa-"] .cashier-shortcuts-bar {
  border-color: var(--pdv-copa-line);
  background: var(--pdv-copa-panel-soft);
  color: var(--ink);
}

body.pdv-copa-green input,
body.pdv-copa-green select,
body.pdv-copa-green textarea,
body.pdv-copa-blue input,
body.pdv-copa-blue select,
body.pdv-copa-blue textarea {
  background: rgba(255, 255, 255, .96);
  color: #071429;
}

body[class*="pdv-copa-"] .counter-item-row,
body[class*="pdv-copa-"] .counter-favorite-tile,
body[class*="pdv-copa-"] .cashier-shortcuts-bar {
  box-shadow: inset 0 0 0 1px rgba(255, 215, 53, .08);
}

body[class*="pdv-copa-"] .btn.primary,
body[class*="pdv-copa-"] button.primary {
  background: linear-gradient(135deg, #ff7a1a, #f97316);
}

body[class*="pdv-copa-"] .status.open,
body[class*="pdv-copa-"] .badge-success,
body[class*="pdv-copa-"] .cashier-key.green {
  background: #0f9f4f;
  color: #ffffff;
}

body[class*="pdv-copa-"] .cashier-shortcuts-bar strong,
body[class*="pdv-copa-"] .cashier-shortcuts-bar span,
body[class*="pdv-copa-"] .cashier-key {
  color: var(--ink);
}

/* Dashboard administrativo */
.dashboard-modern {
  display: grid;
  gap: 18px;
}

.dashboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-greeting h1 {
  margin: 8px 0 8px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  color: #111827;
  letter-spacing: 0;
}

.dashboard-greeting p {
  margin: 0;
  color: #64748b;
  font-size: 16px;
}

.dashboard-period-card {
  min-width: min(100%, 520px);
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

.dashboard-period-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
}

.dashboard-period-title span,
.dashboard-period-card label {
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
}

.dashboard-period-title strong {
  color: #111827;
  font-size: 14px;
}

.dashboard-period-card input {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #f8fafc;
}

.dashboard-filter-btn {
  min-height: 44px;
  border-radius: 10px;
}

.dashboard-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 16px;
}

.dashboard-metric-card {
  min-height: 116px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.dashboard-metric-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .11);
}

.dashboard-metric-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 950;
  font-size: 22px;
}

.dashboard-metric-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.dashboard-metric-copy > span {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-metric-copy strong {
  color: #111827;
  font-size: 23px;
  line-height: 1;
}

.dashboard-metric-copy small {
  color: #64748b;
  font-weight: 700;
}

.dashboard-metric-green .dashboard-metric-icon { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 14px 26px rgba(34, 197, 94, .28); }
.dashboard-metric-blue .dashboard-metric-icon { background: linear-gradient(135deg, #38bdf8, #2563eb); box-shadow: 0 14px 26px rgba(37, 99, 235, .24); }
.dashboard-metric-orange .dashboard-metric-icon { background: linear-gradient(135deg, #fb923c, #f97316); box-shadow: 0 14px 26px rgba(249, 115, 22, .24); }
.dashboard-metric-purple .dashboard-metric-icon { background: linear-gradient(135deg, #8b5cf6, #6d28d9); box-shadow: 0 14px 26px rgba(109, 40, 217, .24); }
.dashboard-metric-red .dashboard-metric-icon { background: linear-gradient(135deg, #fb7185, #ef4444); box-shadow: 0 14px 26px rgba(239, 68, 68, .22); }
.dashboard-metric-rose .dashboard-metric-icon { background: linear-gradient(135deg, #fda4af, #f43f5e); box-shadow: 0 14px 26px rgba(244, 63, 94, .18); }
.dashboard-metric-emerald .dashboard-metric-icon { background: linear-gradient(135deg, #34d399, #059669); box-shadow: 0 14px 26px rgba(5, 150, 105, .2); }
.dashboard-metric-sky .dashboard-metric-icon { background: linear-gradient(135deg, #93c5fd, #3b82f6); box-shadow: 0 14px 26px rgba(59, 130, 246, .18); }
.dashboard-metric-teal .dashboard-metric-icon { background: linear-gradient(135deg, #5eead4, #0f766e); box-shadow: 0 14px 26px rgba(15, 118, 110, .18); }
.dashboard-metric-violet .dashboard-metric-icon { background: linear-gradient(135deg, #c4b5fd, #7c3aed); box-shadow: 0 14px 26px rgba(124, 58, 237, .18); }

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(300px, .82fr) minmax(280px, .72fr);
  gap: 18px;
  align-items: stretch;
}

.dashboard-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .08);
}

.dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-panel-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.dashboard-panel-head h2 {
  margin: 4px 0 0;
  font-size: 19px;
  color: #111827;
  letter-spacing: 0;
}

.dashboard-panel-head a {
  color: #4f46e5;
  font-weight: 850;
  text-decoration: none;
}

.dashboard-modern-bars {
  min-height: 285px;
  padding: 12px 10px 4px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(99, 102, 241, .08), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(0deg, transparent 0 55px, rgba(148, 163, 184, .18) 56px);
}

.dashboard-modern-bars .bar-item span {
  width: 28px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #4f46e5, #818cf8);
  box-shadow: 0 10px 20px rgba(79, 70, 229, .22);
}

.dashboard-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
}

.dashboard-summary-strip span {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-right: 1px solid #e5e7eb;
}

.dashboard-summary-strip span:last-child {
  border-right: 0;
}

.dashboard-summary-strip strong {
  color: #111827;
  font-size: 20px;
}

.dashboard-summary-strip small {
  color: #64748b;
  font-weight: 750;
}

.dashboard-product-list,
.dashboard-activity-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.dashboard-product-list {
  list-style: none;
}

.dashboard-product-list li {
  display: grid;
  grid-template-columns: 30px 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f7;
}

.dashboard-product-list li:last-child {
  border-bottom: 0;
}

.dashboard-rank {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 900;
  font-size: 12px;
}

.dashboard-product-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 950;
}

.dashboard-product-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-product-copy strong {
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-product-copy small {
  color: #64748b;
  font-weight: 750;
}

.dashboard-product-total {
  color: #111827;
  white-space: nowrap;
}

.dashboard-activity {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  color: #111827;
  text-decoration: none;
}

.dashboard-activity span {
  grid-row: span 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 950;
}

.dashboard-activity strong {
  font-size: 14px;
}

.dashboard-activity small {
  color: #64748b;
  font-weight: 700;
}

.dashboard-activity-teal span { background: #ccfbf1; color: #0f766e; }
.dashboard-activity-emerald span { background: #dcfce7; color: #15803d; }
.dashboard-activity-rose span { background: #ffe4e6; color: #e11d48; }
.dashboard-activity-red span { background: #fee2e2; color: #dc2626; }

.dashboard-goal-card {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #16a34a, #4f46e5);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(79, 70, 229, .22);
}

.dashboard-goal-card span,
.dashboard-goal-card small {
  color: rgba(255, 255, 255, .84);
  font-weight: 750;
}

.dashboard-goal-card strong {
  color: #ffffff;
  font-size: 27px;
}

.dashboard-empty-row {
  grid-template-columns: 1fr !important;
  color: #64748b;
}

@media (max-width: 1500px) {
  .dashboard-metric-grid {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
  }

  .dashboard-main-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  }

  .dashboard-activity-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1100px) {
  .dashboard-hero,
  .dashboard-main-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .dashboard-period-card {
    min-width: 0;
  }

  .dashboard-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .dashboard-period-card,
  .dashboard-metric-grid,
  .dashboard-summary-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-period-title {
    display: grid;
    justify-content: stretch;
  }

  .dashboard-summary-strip span {
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .dashboard-summary-strip span:last-child {
    border-bottom: 0;
  }

  .dashboard-product-list li {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .dashboard-product-avatar {
    display: none;
  }
}

/* Ajustes finos: dashboard configuravel e sidebar operacional */
.dashboard-hero-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
}

.dashboard-config-button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #ffffff;
  color: #334155;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.dashboard-config-button:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
}

.dashboard-metric-card[hidden] {
  display: none !important;
}

.dashboard-config-modal[hidden] {
  display: none;
}

.dashboard-config-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .52);
}

.dashboard-config-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(680px, calc(100vh - 48px));
  overflow: auto;
  padding: 26px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(15, 23, 42, .26);
}

.dashboard-config-dialog h2 {
  margin: 0;
  color: #0f172a;
  font-size: 25px;
  letter-spacing: 0;
}

.dashboard-config-dialog p {
  margin: 6px 0 18px;
  color: #64748b;
  font-size: 15px;
}

.dashboard-config-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-config-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-config-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #1f2937;
  font-weight: 850;
}

.dashboard-config-list input {
  width: 18px;
  height: 18px;
  accent-color: #16a34a;
}

.dashboard-config-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.sidebar {
  background: linear-gradient(180deg, #06152d 0%, #0b2345 54%, #071a30 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .07), 14px 0 34px rgba(15, 23, 42, .10);
}

.sidebar-head {
  min-height: 96px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand img,
.brand-fallback {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .22);
}

.sidebar nav {
  gap: 8px;
  padding: 12px 12px 18px;
}

.nav-section-wrap summary,
.nav-top-link {
  min-height: 42px;
  padding: 7px 9px;
  border-radius: 12px;
  color: rgba(255, 255, 255, .94);
  font-size: 14px;
  font-weight: 900;
}

.nav-section-wrap summary:hover,
.nav-top-link:hover {
  background: rgba(255, 255, 255, .08);
}

.nav-top-link {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-top-link.active,
.nav-section-wrap[open] > summary {
  background: rgba(79, 70, 229, .34);
}

.nav-group-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .08);
  color: #ffffff;
  font-size: 13px;
}

.nav-section {
  gap: 2px;
  padding: 4px 0 8px 38px;
}

.sidebar a:not(.brand):not(.logout):not(.nav-top-link) {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 10px;
  color: rgba(226, 232, 240, .92);
  font-size: 14px;
  font-weight: 760;
}

.sidebar a:not(.brand):not(.logout):not(.nav-top-link):hover {
  background: rgba(255, 255, 255, .07);
  color: #ffffff;
}

.sidebar a.active:not(.brand):not(.logout) {
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
}

@media (max-width: 1100px) {
  .dashboard-hero-actions {
    justify-content: stretch;
  }
}

@media (max-width: 680px) {
  .dashboard-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-config-button {
    justify-self: end;
  }

  .dashboard-config-list {
    grid-template-columns: 1fr;
  }
}

/* Sidebar leve: menos peso visual e rolagem mais discreta */
.sidebar {
  overflow-x: hidden;
  background: linear-gradient(180deg, #07162d 0%, #0b203d 55%, #07182f 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06);
}

.sidebar-head {
  min-height: 90px;
  padding: 16px 14px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.brand img,
.brand-fallback {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .16);
}

.sidebar nav {
  gap: 2px;
  overflow-x: hidden;
  padding: 10px 14px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, .34) transparent;
}

.sidebar nav::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.sidebar nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, .28);
}

.sidebar nav::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, .48);
}

.nav-section-wrap {
  margin: 0 0 5px;
}

.nav-section-wrap summary,
.nav-top-link {
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 9px;
  color: rgba(226, 232, 240, .9);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.15;
}

.nav-section-wrap summary:hover,
.nav-top-link:hover {
  background: rgba(255, 255, 255, .055);
}

.nav-section-wrap:not([open]) > summary {
  background: transparent;
  box-shadow: none;
}

.nav-top-link.active,
.nav-section-wrap[open] > summary {
  background: linear-gradient(135deg, rgba(79, 70, 229, .86), rgba(67, 56, 202, .74));
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(67, 56, 202, .20);
}

.nav-top-link {
  grid-template-columns: 26px 1fr;
  gap: 8px;
}

.nav-group-icon {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: transparent;
  color: rgba(203, 213, 225, .9);
  font-size: 12px;
  font-weight: 760;
}

.nav-section-wrap[open] > summary .nav-group-icon,
.nav-top-link.active .nav-group-icon {
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
}

.nav-section {
  gap: 0;
  padding: 3px 0 8px 34px;
}

.sidebar a:not(.brand):not(.logout):not(.nav-top-link) {
  min-height: 29px;
  padding: 5px 8px;
  border-radius: 8px;
  color: rgba(226, 232, 240, .82);
  font-size: 13px;
  font-weight: 620;
  line-height: 1.2;
}

.sidebar a:not(.brand):not(.logout):not(.nav-top-link):hover {
  background: rgba(255, 255, 255, .055);
  color: #ffffff;
}

.sidebar a.active:not(.brand):not(.logout) {
  background: rgba(255, 255, 255, .08);
  color: #ffffff;
  font-weight: 740;
}

.logout {
  min-height: 34px;
  border-radius: 10px;
}

.app-version {
  color: rgba(203, 213, 225, .62);
  font-size: 10px;
}

@media (max-width: 900px) {
  .online-lunch-page .online-lunch-hero {
    display: none !important;
  }

  .online-lunch-page .online-topbar {
    order: 1 !important;
    display: block !important;
    margin: 14px 16px 0 !important;
    padding: 16px 18px !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .12) !important;
  }

  .online-lunch-page .online-topbar::before,
  .online-lunch-page .online-top-info,
  .online-lunch-page .online-mobile-whatsapp {
    display: none !important;
  }

  .online-lunch-page .online-brand {
    display: grid !important;
    grid-template-columns: 70px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 14px !important;
    text-align: left !important;
  }

  .online-lunch-page .online-brand img,
  .online-lunch-page .online-brand > strong {
    display: block !important;
    width: 70px !important;
    height: 70px !important;
    object-fit: contain !important;
    border-radius: 12px !important;
  }

  .online-lunch-page .online-brand > strong {
    display: grid !important;
    place-items: center !important;
    font-size: 22px !important;
  }

  .online-lunch-page .online-brand div {
    display: block !important;
    min-width: 0 !important;
  }

  .online-lunch-page .online-brand h1 {
    margin: 0 0 5px !important;
    font-size: 24px !important;
    line-height: 1.1 !important;
  }

  .online-lunch-page .online-brand p {
    display: block !important;
    margin: 0 !important;
    color: #667085 !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
  }

  .online-lunch-page .online-mobile-strip {
    order: 2 !important;
  }

  .online-lunch-page > form {
    order: 3 !important;
  }

  .online-lunch-page .online-add {
    position: relative !important;
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    display: inline-grid !important;
    place-items: center !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #df0000 !important;
    color: #fff !important;
    font-size: 0 !important;
    box-shadow: 0 14px 26px rgba(215, 0, 0, .24) !important;
  }

  .online-lunch-page .online-add span {
    display: none !important;
  }

  .online-lunch-page .online-add::before {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 26px !important;
    height: 4px !important;
    border-radius: 999px !important;
    background: #fff !important;
    transform: translate(-50%, -50%) !important;
  }

  .online-lunch-page .online-add::after {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 4px !important;
    height: 26px !important;
    border-radius: 999px !important;
    background: #fff !important;
    transform: translate(-50%, -50%) !important;
  }

  .online-lunch-page .online-group-marmitex .online-add {
    justify-self: end !important;
    margin: 0 !important;
  }

  .online-lunch-page .online-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: stretch !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: rgba(15, 23, 42, .68) !important;
  }

  .online-lunch-page .online-modal[hidden] {
    display: none !important;
  }

  .online-lunch-page .online-modal-card {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    height: calc(100vh - 10px) !important;
    height: calc(100dvh - 10px) !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 16px 14px calc(14px + env(safe-area-inset-bottom)) !important;
    border-radius: 18px 18px 0 0 !important;
    box-shadow: 0 -18px 44px rgba(15, 23, 42, .32) !important;
  }

  .online-lunch-page .online-modal-card h2 {
    flex: 0 0 auto !important;
    max-width: calc(100% - 44px) !important;
    margin: 0 0 8px !important;
    font-size: 20px !important;
    line-height: 1.15 !important;
  }

  .online-lunch-page .online-modal-card > label {
    flex: 0 0 auto !important;
    margin-bottom: 8px !important;
  }

  .online-lunch-page .online-modal-close {
    top: 8px !important;
    right: 10px !important;
    width: 44px !important;
    height: 44px !important;
    display: grid !important;
    place-items: center !important;
    font-size: 30px !important;
  }

  .online-lunch-page .online-additionals {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    margin: 6px -6px 10px 0 !important;
    padding: 0 6px 0 0 !important;
    scrollbar-width: thin !important;
  }

  .online-lunch-page .online-additionals::-webkit-scrollbar {
    width: 7px;
  }

  .online-lunch-page .online-additionals::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(148, 163, 184, .65);
  }

  .online-lunch-page .online-additional-option {
    min-height: 54px !important;
    padding: 12px !important;
    font-size: 14px !important;
  }

  .online-lunch-page .online-additional-option input[type="checkbox"] {
    width: 24px !important;
    height: 24px !important;
  }

  .online-lunch-page .online-modal-total,
  .online-lunch-page .online-modal-card > .online-btn {
    flex: 0 0 auto !important;
  }

  .online-lunch-page .online-modal-card > .online-btn {
    min-height: 54px !important;
    width: 100% !important;
  }
}

/* Final counter brand overrides */
body.counter-pdv-body {
  --counter-gold: #ffca2c;
  --counter-orange: #ff6b00;
  --counter-green: #13983f;
  background:
    radial-gradient(circle at 6% 8%, rgba(255, 202, 44, .44), transparent 24%),
    linear-gradient(135deg, #fff7d1 0%, #fff 42%, #fff3bd 100%) !important;
}

body.counter-pdv-body .app-main {
  background:
    linear-gradient(180deg, rgba(255, 202, 44, .38), transparent 130px),
    linear-gradient(135deg, #fff9df 0%, #fff 44%, #fff0ad 100%) !important;
}

.counter-pdv-layout,
body.counter-pdv-maximized .counter-pdv-layout {
  gap: 18px !important;
  grid-template-columns: minmax(0, 1fr) 420px !important;
}

.counter-pdv-layout .order-left,
.counter-summary-card,
.counter-favorites-card {
  border: 1px solid rgba(245, 158, 11, .42) !important;
  border-radius: 10px !important;
  box-shadow: 0 16px 38px rgba(93, 64, 8, .14) !important;
}

.counter-pdv-layout .order-left {
  background: #fff !important;
  overflow: hidden !important;
}

.counter-pdv-layout .order-left .page-head.compact {
  display: grid !important;
  grid-template-columns: 220px minmax(0, 1fr) 230px !important;
  gap: 18px !important;
  align-items: center !important;
  min-height: 150px !important;
  margin: 0 !important;
  padding: 14px 18px !important;
  border: 0 !important;
  border-radius: 10px 10px 0 0 !important;
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 202, 44, .18), transparent 24%),
    linear-gradient(135deg, #111 0%, #211d18 58%, #393227 100%) !important;
  color: #fff !important;
}

.counter-brand-block {
  width: 100%;
  min-width: 0;
  display: grid;
  place-items: center;
}

.counter-brand-block img,
.counter-brand-block span {
  width: 158px;
  height: 118px;
  object-fit: contain;
}

.counter-brand-block span {
  border-radius: 50%;
  background: #fff;
  color: var(--counter-orange);
  display: grid;
  place-items: center;
  font-size: 54px;
  font-weight: 950;
}

.counter-pdv-layout .page-head h1 {
  margin: 0 !important;
  color: #fff !important;
  font-size: clamp(42px, 4.6vw, 68px) !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
  line-height: .95 !important;
  text-align: center !important;
  text-transform: uppercase !important;
  text-shadow: 0 3px 0 rgba(0, 0, 0, .28) !important;
}

.counter-pdv-layout .page-head h1::before,
.counter-pdv-layout .page-head h1::after {
  content: "*";
  margin: 0 18px;
  color: var(--counter-gold);
  font-size: .45em;
  vertical-align: middle;
}

.counter-pdv-layout .page-head p {
  margin-top: 10px !important;
  color: #fff8d7 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-align: center !important;
}

.counter-open-badge {
  margin: 8px auto 0 !important;
  padding: 5px 16px !important;
  border-radius: 7px !important;
  background: linear-gradient(180deg, #25c464, #129542) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(16, 185, 129, .32) !important;
}

.counter-pdv-layout .header-actions {
  display: grid !important;
  gap: 8px !important;
}

.counter-pdv-layout .header-actions .inline-form,
.counter-pdv-layout .header-actions form {
  width: 100%;
}

.counter-pdv-layout .header-actions .btn,
.counter-pdv-layout .header-actions label.btn {
  width: 100% !important;
  min-height: 40px !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(255, 202, 44, .8) !important;
  border-radius: 7px !important;
  background: rgba(0, 0, 0, .22) !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
}

.counter-pdv-layout .header-actions .btn .shortcut-key {
  min-width: 44px;
  min-height: 32px;
  border-radius: 6px;
  background: var(--counter-gold);
  color: #111827;
}

.counter-pdv-layout .header-actions .btn.danger,
.counter-pdv-layout .header-actions label.btn.danger {
  border-color: #f59e0b !important;
  background: rgba(255, 107, 0, .18) !important;
  color: #ff8a1d !important;
}

.counter-pdv-layout .counter-maximize-btn {
  border-color: rgba(255, 255, 255, .72) !important;
  color: #fff !important;
}

.counter-pdv-layout .search-add {
  grid-template-columns: minmax(0, 1fr) 110px 190px !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 18px 20px !important;
  border: 0 !important;
  border-bottom: 1px solid #f5c64b !important;
  border-radius: 0 !important;
  background: #fff !important;
}

.counter-pdv-layout .search-add input {
  min-height: 58px !important;
  border: 1px solid #8f8f8f !important;
  border-radius: 6px !important;
  font-size: 22px !important;
  font-weight: 850 !important;
}

.counter-pdv-layout .search-add input[name="quantity"] {
  text-align: center !important;
  font-size: 24px !important;
}

.counter-pdv-layout .search-add .btn.primary {
  min-height: 58px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: linear-gradient(180deg, #ff8424, #ff5f00) !important;
  box-shadow: 0 10px 20px rgba(255, 107, 0, .26) !important;
  font-size: 18px !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
}

.counter-pdv-layout .order-items {
  position: relative !important;
  flex: 1 !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    radial-gradient(circle at 13% 86%, rgba(251, 191, 36, .12), transparent 22%),
    linear-gradient(180deg, #fff 0%, #fff 84%, #fff7d6 100%) !important;
  overflow: auto !important;
}

.counter-pdv-layout .order-items::after {
  content: "";
  position: sticky;
  bottom: 0;
  display: block;
  height: 42px;
  margin-top: 120px;
  background:
    linear-gradient(170deg, transparent 0 44%, rgba(255, 202, 44, .82) 45% 57%, var(--counter-orange) 58% 100%);
  pointer-events: none;
}

.counter-items-head {
  position: sticky !important;
  top: 0 !important;
  z-index: 3 !important;
  border-bottom: 0 !important;
  background: linear-gradient(180deg, #ffd950, var(--counter-gold)) !important;
  color: #111827 !important;
}

.counter-items-head,
.counter-item-row,
.counter-pdv-layout .order-items article.counter-item-row {
  grid-template-columns: 58px minmax(260px, 1fr) 86px 118px 118px 86px !important;
}

.counter-pdv-layout .order-items article.counter-item-row {
  min-height: 58px !important;
  border-bottom: 1px solid rgba(245, 158, 11, .18) !important;
  background: rgba(255, 255, 255, .9) !important;
}

.counter-summary-panel {
  top: 10px !important;
  gap: 12px !important;
}

.counter-summary-card {
  overflow: hidden !important;
  padding: 0 !important;
  background: #fff !important;
}

.counter-summary-card h2 {
  margin: 0 !important;
  padding: 18px 20px !important;
  background:
    linear-gradient(90deg, var(--counter-gold) 0 22%, transparent 22% 78%, var(--counter-gold) 78%),
    linear-gradient(135deg, #111, #28231b) !important;
  color: #fff !important;
  font-size: 22px !important;
  font-weight: 950 !important;
  text-align: center !important;
  text-transform: uppercase !important;
}

.counter-summary-stats {
  gap: 0 !important;
  border-bottom: 1px solid #f1d58b !important;
}

.counter-summary-stats > div {
  min-height: 108px !important;
  border-right: 1px solid #eee2bf !important;
}

.counter-summary-stats strong {
  color: var(--counter-orange) !important;
  font-size: 36px !important;
}

.counter-summary-total {
  display: grid !important;
  gap: 10px !important;
  padding: 24px 22px 28px !important;
  border: 0 !important;
  background: #fff !important;
}

.counter-summary-total span {
  color: #111827 !important;
  font-size: 16px !important;
  font-weight: 950 !important;
}

.counter-summary-total strong {
  color: #0f7a30 !important;
  font-size: clamp(42px, 4.5vw, 64px) !important;
  line-height: 1 !important;
  text-align: center !important;
}

.counter-summary-finish {
  margin: 0 !important;
  position: relative !important;
  z-index: 2 !important;
}

.counter-summary-finish .counter-finish-btn {
  min-height: 60px !important;
  border-radius: 7px !important;
  background: linear-gradient(180deg, #19b957, #0e9a41) !important;
  border-color: #0e9a41 !important;
  box-shadow: 0 12px 24px rgba(16, 185, 129, .28) !important;
  font-size: 20px !important;
  text-transform: uppercase !important;
}

.counter-favorites-card {
  padding: 12px !important;
  background: rgba(255, 255, 255, .92) !important;
}

.counter-favorites-card .product-panel-heading h2 {
  color: #111827 !important;
  font-size: 20px !important;
  text-transform: uppercase !important;
}

.counter-favorite-tile button {
  min-height: 64px !important;
  grid-template-columns: 52px minmax(0, 1fr) auto !important;
  border-color: #ead9ad !important;
  border-radius: 8px !important;
  background: #fff !important;
}

.counter-favorite-tile img,
.counter-favorite-tile .photo-fallback {
  width: 46px !important;
  height: 46px !important;
}

.counter-favorite-tile strong {
  font-size: 13px !important;
  font-weight: 950 !important;
  white-space: normal !important;
}

.counter-favorite-tile small {
  color: #0f9b3e !important;
  font-size: 14px !important;
}

.counter-shortcut-bar {
  gap: 16px !important;
  padding: 16px 20px !important;
  border-top: 1px solid #f5c64b !important;
  background: linear-gradient(180deg, #fff9e7, #fff) !important;
}

.counter-shortcut-bar label,
.counter-shortcut-bar button {
  min-height: 70px !important;
  border: 1px solid #ead9ad !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 8px 18px rgba(93, 64, 8, .1) !important;
}

.counter-shortcut-bar label strong,
.counter-shortcut-bar button strong {
  color: #1f2937 !important;
  font-size: 24px !important;
}

.counter-shortcut-bar button.success {
  background: linear-gradient(180deg, #18b957, #0e9a41) !important;
}

.counter-shortcut-bar button.success strong,
.counter-shortcut-bar button.success span {
  color: #fff !important;
}

.counter-shortcut-bar label.danger {
  color: #dc2626 !important;
  background: #fff4f4 !important;
}

@media (max-width: 1180px) {
  .counter-pdv-layout,
  body.counter-pdv-maximized .counter-pdv-layout {
    grid-template-columns: 1fr !important;
  }

  .counter-pdv-layout .order-left .page-head.compact {
    grid-template-columns: 160px minmax(0, 1fr) !important;
  }

  .counter-pdv-layout .header-actions {
    grid-column: 1 / -1 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .counter-pdv-layout .order-left .page-head.compact {
    grid-template-columns: 1fr !important;
  }

  .counter-brand-block img,
  .counter-brand-block span {
    width: 124px !important;
    height: 92px !important;
  }

  .counter-pdv-layout .page-head h1 {
    font-size: 40px !important;
  }

  .counter-pdv-layout .header-actions,
  .counter-pdv-layout .search-add {
    grid-template-columns: 1fr !important;
  }

  .counter-summary-finish {
    margin: 0 !important;
  }
}

/* Selectable counter themes */
body.counter-pdv-body:not([class*="pdv-copa-"]) {
  background: #eef2f6 !important;
}

body.counter-pdv-body:not([class*="pdv-copa-"]) .app-main {
  background: #eef2f6 !important;
}

body.counter-pdv-body:not([class*="pdv-copa-"]) .counter-pdv-layout,
body.counter-pdv-maximized:not([class*="pdv-copa-"]) .counter-pdv-layout {
  gap: 10px !important;
  grid-template-columns: minmax(0, 1fr) 390px !important;
}

body.counter-pdv-body:not([class*="pdv-copa-"]) .counter-brand-block {
  display: none !important;
}

body.counter-pdv-body:not([class*="pdv-copa-"]) .counter-pdv-layout .order-left .page-head.compact {
  display: flex !important;
  min-height: 54px !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid #d9e2ec !important;
  border-radius: 0 !important;
  background: linear-gradient(90deg, #0f172a, #17345b) !important;
}

body.counter-pdv-body:not([class*="pdv-copa-"]) .counter-pdv-layout .page-head h1 {
  color: #fff !important;
  font-size: 22px !important;
  text-align: left !important;
  text-shadow: none !important;
}

body.counter-pdv-body:not([class*="pdv-copa-"]) .counter-pdv-layout .page-head h1::before,
body.counter-pdv-body:not([class*="pdv-copa-"]) .counter-pdv-layout .page-head h1::after {
  content: none !important;
}

body.counter-pdv-body:not([class*="pdv-copa-"]) .counter-pdv-layout .search-add {
  grid-template-columns: minmax(0, 1fr) 92px 132px !important;
  padding: 10px !important;
  border-bottom-color: #d9e2ec !important;
}

body.counter-pdv-body:not([class*="pdv-copa-"]) .counter-pdv-layout .search-add input,
body.counter-pdv-body:not([class*="pdv-copa-"]) .counter-pdv-layout .search-add .btn.primary {
  min-height: 50px !important;
  font-size: 18px !important;
}

body.counter-pdv-body:not([class*="pdv-copa-"]) .counter-items-head {
  background: #e8edf3 !important;
  color: #334155 !important;
}

body.counter-pdv-body:not([class*="pdv-copa-"]) .counter-summary-card h2 {
  background: #0f172a !important;
}

body.pdv-copa-brand {
  --theme-accent: #ffca2c;
  --theme-action: #ff6b00;
  --theme-pay: #12a447;
}

body.pdv-copa-modern,
body.pdv-copa-blue-white,
body.pdv-copa-dark-yellow {
  background: var(--theme-bg) !important;
}

body.pdv-copa-modern .app-main,
body.pdv-copa-blue-white .app-main,
body.pdv-copa-dark-yellow .app-main {
  background: var(--theme-bg) !important;
}

body.pdv-copa-modern {
  --theme-bg: linear-gradient(135deg, #f4f8fb 0%, #ffffff 52%, #eef4f7 100%);
  --theme-panel: #ffffff;
  --theme-header: #ffffff;
  --theme-header-text: #172033;
  --theme-accent: #14a64a;
  --theme-action: #14a64a;
  --theme-pay: #13a64a;
  --theme-line: #dfe8ef;
  --theme-muted: #64748b;
}

body.pdv-copa-blue-white {
  --theme-bg: linear-gradient(135deg, #eaf2ff 0%, #ffffff 48%, #eaf2ff 100%);
  --theme-panel: #ffffff;
  --theme-header: linear-gradient(135deg, #113270, #1e55b6);
  --theme-header-text: #ffffff;
  --theme-accent: #164cb3;
  --theme-action: #1554c8;
  --theme-pay: #1554c8;
  --theme-line: #b9cdf6;
  --theme-muted: #48617f;
}

body.pdv-copa-dark-yellow {
  --theme-bg: linear-gradient(135deg, #262626 0%, #3b3b35 50%, #222 100%);
  --theme-panel: rgba(255, 255, 255, .96);
  --theme-header: linear-gradient(135deg, #3a3a38, #1f1f1d);
  --theme-header-text: #ffcf35;
  --theme-accent: #ffcf35;
  --theme-action: #ffcf35;
  --theme-pay: #ffcf35;
  --theme-line: #d7aa28;
  --theme-muted: #f3d676;
}

body.pdv-copa-modern .counter-pdv-layout .order-left .page-head.compact,
body.pdv-copa-blue-white .counter-pdv-layout .order-left .page-head.compact,
body.pdv-copa-dark-yellow .counter-pdv-layout .order-left .page-head.compact {
  background: var(--theme-header) !important;
  border: 1px solid var(--theme-line) !important;
  border-radius: 10px 10px 0 0 !important;
}

body.pdv-copa-modern .counter-pdv-layout .page-head h1,
body.pdv-copa-blue-white .counter-pdv-layout .page-head h1,
body.pdv-copa-dark-yellow .counter-pdv-layout .page-head h1 {
  color: var(--theme-header-text) !important;
}

body.pdv-copa-modern .counter-pdv-layout .page-head h1::before,
body.pdv-copa-modern .counter-pdv-layout .page-head h1::after,
body.pdv-copa-blue-white .counter-pdv-layout .page-head h1::before,
body.pdv-copa-blue-white .counter-pdv-layout .page-head h1::after,
body.pdv-copa-dark-yellow .counter-pdv-layout .page-head h1::before,
body.pdv-copa-dark-yellow .counter-pdv-layout .page-head h1::after {
  color: var(--theme-accent) !important;
}

body.pdv-copa-modern .counter-pdv-layout .page-head p,
body.pdv-copa-blue-white .counter-pdv-layout .page-head p {
  color: var(--theme-muted) !important;
}

body.pdv-copa-blue-white .counter-pdv-layout .page-head p,
body.pdv-copa-dark-yellow .counter-pdv-layout .page-head p {
  color: #fff !important;
}

body.pdv-copa-modern .counter-pdv-layout .header-actions .btn,
body.pdv-copa-modern .counter-pdv-layout .header-actions label.btn {
  background: #fff !important;
  color: #172033 !important;
  border-color: var(--theme-line) !important;
}

body.pdv-copa-blue-white .counter-pdv-layout .header-actions .btn,
body.pdv-copa-blue-white .counter-pdv-layout .header-actions label.btn {
  background: rgba(255, 255, 255, .11) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, .35) !important;
}

body.pdv-copa-dark-yellow .counter-pdv-layout .header-actions .btn,
body.pdv-copa-dark-yellow .counter-pdv-layout .header-actions label.btn {
  background: rgba(255, 255, 255, .08) !important;
  color: #fff !important;
  border-color: rgba(255, 207, 53, .55) !important;
}

body.pdv-copa-modern .counter-pdv-layout .header-actions .btn .shortcut-key,
body.pdv-copa-blue-white .counter-pdv-layout .header-actions .btn .shortcut-key,
body.pdv-copa-dark-yellow .counter-pdv-layout .header-actions .btn .shortcut-key {
  background: var(--theme-accent) !important;
  color: #111827 !important;
}

body.pdv-copa-blue-white .counter-items-head {
  background: linear-gradient(180deg, #1f5dcb, #123d98) !important;
  color: #fff !important;
}

body.pdv-copa-modern .counter-items-head {
  background: #eef3f7 !important;
  color: #172033 !important;
}

body.pdv-copa-dark-yellow .counter-items-head {
  background: linear-gradient(180deg, #ffdc56, #ffc928) !important;
  color: #111827 !important;
}

body.pdv-copa-modern .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-blue-white .counter-pdv-layout .search-add .btn.primary {
  background: linear-gradient(180deg, var(--theme-action), color-mix(in srgb, var(--theme-action) 82%, #000)) !important;
}

body.pdv-copa-dark-yellow .counter-pdv-layout .search-add .btn.primary {
  background: linear-gradient(180deg, #ffdc56, #ffc928) !important;
  color: #111827 !important;
}

body.pdv-copa-modern .counter-summary-card h2,
body.pdv-copa-blue-white .counter-summary-card h2,
body.pdv-copa-dark-yellow .counter-summary-card h2 {
  background: var(--theme-header) !important;
  color: var(--theme-header-text) !important;
}

body.pdv-copa-modern .counter-summary-total strong,
body.pdv-copa-modern .counter-summary-stats strong {
  color: #16843e !important;
}

body.pdv-copa-blue-white .counter-summary-total strong,
body.pdv-copa-blue-white .counter-summary-stats strong {
  color: #123d98 !important;
}

body.pdv-copa-dark-yellow .counter-summary-total strong,
body.pdv-copa-dark-yellow .counter-summary-stats strong {
  color: #ffcf35 !important;
}

body.pdv-copa-modern .counter-summary-finish .counter-finish-btn,
body.pdv-copa-blue-white .counter-summary-finish .counter-finish-btn {
  background: linear-gradient(180deg, var(--theme-pay), color-mix(in srgb, var(--theme-pay) 80%, #000)) !important;
  border-color: var(--theme-pay) !important;
}

body.pdv-copa-dark-yellow .counter-summary-finish .counter-finish-btn {
  background: linear-gradient(180deg, #ffdc56, #ffc928) !important;
  border-color: #ffc928 !important;
  color: #111827 !important;
}

body.pdv-copa-dark-yellow .counter-shortcut-bar,
body.pdv-copa-dark-yellow .counter-favorites-card {
  background: rgba(42, 42, 39, .94) !important;
  color: #fff !important;
}

body.pdv-copa-dark-yellow .counter-favorites-card .product-panel-heading h2 {
  color: #ffcf35 !important;
}

/* Operational PDV themes */
body.pdv-copa-brand {
  --theme-bg: #f6f7fb;
  --theme-panel: #ffffff;
  --theme-header: #111827;
  --theme-header-text: #ffffff;
  --theme-accent: #f97316;
  --theme-action: #f97316;
  --theme-pay: #16a34a;
  --theme-line: #e7d7bd;
  --theme-muted: #64748b;
  --theme-soft: #fff7ed;
}

body.pdv-copa-candy-red {
  --theme-bg: #f7f7fb;
  --theme-panel: #ffffff;
  --theme-header: #ffffff;
  --theme-header-text: #111827;
  --theme-accent: #dc2626;
  --theme-action: #dc2626;
  --theme-pay: #16a34a;
  --theme-line: #f0d2d2;
  --theme-muted: #64748b;
  --theme-soft: #fff1f2;
}

body.pdv-copa-soft-green {
  --theme-bg: #eef7f2;
  --theme-panel: #ffffff;
  --theme-header: #f8fff9;
  --theme-header-text: #0f172a;
  --theme-accent: #15803d;
  --theme-action: #15803d;
  --theme-pay: #15803d;
  --theme-line: #cbe7d5;
  --theme-muted: #526371;
  --theme-soft: #ecfdf5;
}

body.pdv-copa-graphite {
  --theme-bg: #eef1f5;
  --theme-panel: #ffffff;
  --theme-header: #1f2937;
  --theme-header-text: #ffffff;
  --theme-accent: #f59e0b;
  --theme-action: #2563eb;
  --theme-pay: #16a34a;
  --theme-line: #cbd5e1;
  --theme-muted: #64748b;
  --theme-soft: #f8fafc;
}

body.pdv-copa-compact-gray {
  --theme-bg: #eceff3;
  --theme-panel: #ffffff;
  --theme-header: #f8fafc;
  --theme-header-text: #0f172a;
  --theme-accent: #334155;
  --theme-action: #2563eb;
  --theme-pay: #16a34a;
  --theme-line: #d8e0ea;
  --theme-muted: #64748b;
  --theme-soft: #f1f5f9;
}

body.pdv-copa-brand,
body.pdv-copa-modern,
body.pdv-copa-blue-white,
body.pdv-copa-dark-yellow,
body.pdv-copa-candy-red,
body.pdv-copa-soft-green,
body.pdv-copa-graphite,
body.pdv-copa-compact-gray {
  --white: var(--theme-panel);
  --ink: #0f172a;
  --muted: var(--theme-muted);
  --pdv-copa-line: var(--theme-line);
  --pdv-copa-panel: var(--theme-panel);
  --pdv-copa-panel-soft: var(--theme-soft);
  --pdv-copa-summary: var(--theme-panel);
  --pdv-copa-summary-text: #0f172a;
  background: var(--theme-bg) !important;
}

body.pdv-copa-brand .app-main,
body.pdv-copa-modern .app-main,
body.pdv-copa-blue-white .app-main,
body.pdv-copa-dark-yellow .app-main,
body.pdv-copa-candy-red .app-main,
body.pdv-copa-soft-green .app-main,
body.pdv-copa-graphite .app-main,
body.pdv-copa-compact-gray .app-main {
  background: var(--theme-bg) !important;
}

body.pdv-copa-brand .topbar,
body.pdv-copa-modern .topbar,
body.pdv-copa-blue-white .topbar,
body.pdv-copa-dark-yellow .topbar,
body.pdv-copa-candy-red .topbar,
body.pdv-copa-soft-green .topbar,
body.pdv-copa-graphite .topbar,
body.pdv-copa-compact-gray .topbar {
  border-bottom: 1px solid var(--theme-line) !important;
  background: #ffffff !important;
  color: #0f172a !important;
}

body.pdv-copa-brand .topbar::after,
body.pdv-copa-modern .topbar::after,
body.pdv-copa-blue-white .topbar::after,
body.pdv-copa-dark-yellow .topbar::after,
body.pdv-copa-candy-red .topbar::after,
body.pdv-copa-soft-green .topbar::after,
body.pdv-copa-graphite .topbar::after,
body.pdv-copa-compact-gray .topbar::after,
body.pdv-copa-brand .counter-pdv-layout .order-items::after,
body.pdv-copa-modern .counter-pdv-layout .order-items::after,
body.pdv-copa-blue-white .counter-pdv-layout .order-items::after,
body.pdv-copa-dark-yellow .counter-pdv-layout .order-items::after,
body.pdv-copa-candy-red .counter-pdv-layout .order-items::after,
body.pdv-copa-soft-green .counter-pdv-layout .order-items::after,
body.pdv-copa-graphite .counter-pdv-layout .order-items::after,
body.pdv-copa-compact-gray .counter-pdv-layout .order-items::after {
  content: none !important;
  display: none !important;
}

body.pdv-copa-brand .counter-pdv-layout,
body.pdv-copa-modern .counter-pdv-layout,
body.pdv-copa-blue-white .counter-pdv-layout,
body.pdv-copa-dark-yellow .counter-pdv-layout,
body.pdv-copa-candy-red .counter-pdv-layout,
body.pdv-copa-soft-green .counter-pdv-layout,
body.pdv-copa-graphite .counter-pdv-layout,
body.pdv-copa-compact-gray .counter-pdv-layout,
body.counter-pdv-maximized.pdv-copa-brand .counter-pdv-layout,
body.counter-pdv-maximized.pdv-copa-modern .counter-pdv-layout,
body.counter-pdv-maximized.pdv-copa-blue-white .counter-pdv-layout,
body.counter-pdv-maximized.pdv-copa-dark-yellow .counter-pdv-layout,
body.counter-pdv-maximized.pdv-copa-candy-red .counter-pdv-layout,
body.counter-pdv-maximized.pdv-copa-soft-green .counter-pdv-layout,
body.counter-pdv-maximized.pdv-copa-graphite .counter-pdv-layout,
body.counter-pdv-maximized.pdv-copa-compact-gray .counter-pdv-layout {
  gap: 12px !important;
  grid-template-columns: minmax(0, 1fr) 360px !important;
}

body.pdv-copa-brand .counter-brand-block,
body.pdv-copa-modern .counter-brand-block,
body.pdv-copa-blue-white .counter-brand-block,
body.pdv-copa-dark-yellow .counter-brand-block,
body.pdv-copa-candy-red .counter-brand-block,
body.pdv-copa-soft-green .counter-brand-block,
body.pdv-copa-graphite .counter-brand-block,
body.pdv-copa-compact-gray .counter-brand-block {
  display: none !important;
}

body.pdv-copa-brand .counter-pdv-layout .order-left,
body.pdv-copa-modern .counter-pdv-layout .order-left,
body.pdv-copa-blue-white .counter-pdv-layout .order-left,
body.pdv-copa-dark-yellow .counter-pdv-layout .order-left,
body.pdv-copa-candy-red .counter-pdv-layout .order-left,
body.pdv-copa-soft-green .counter-pdv-layout .order-left,
body.pdv-copa-graphite .counter-pdv-layout .order-left,
body.pdv-copa-compact-gray .counter-pdv-layout .order-left,
body.pdv-copa-brand .counter-summary-card,
body.pdv-copa-modern .counter-summary-card,
body.pdv-copa-blue-white .counter-summary-card,
body.pdv-copa-dark-yellow .counter-summary-card,
body.pdv-copa-candy-red .counter-summary-card,
body.pdv-copa-soft-green .counter-summary-card,
body.pdv-copa-graphite .counter-summary-card,
body.pdv-copa-compact-gray .counter-summary-card,
body.pdv-copa-brand .counter-favorites-card,
body.pdv-copa-modern .counter-favorites-card,
body.pdv-copa-blue-white .counter-favorites-card,
body.pdv-copa-dark-yellow .counter-favorites-card,
body.pdv-copa-candy-red .counter-favorites-card,
body.pdv-copa-soft-green .counter-favorites-card,
body.pdv-copa-graphite .counter-favorites-card,
body.pdv-copa-compact-gray .counter-favorites-card {
  border: 1px solid var(--theme-line) !important;
  border-radius: 8px !important;
  background: var(--theme-panel) !important;
  color: #0f172a !important;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .08) !important;
}

body.pdv-copa-brand .counter-pdv-layout .order-left .page-head.compact,
body.pdv-copa-modern .counter-pdv-layout .order-left .page-head.compact,
body.pdv-copa-blue-white .counter-pdv-layout .order-left .page-head.compact,
body.pdv-copa-dark-yellow .counter-pdv-layout .order-left .page-head.compact,
body.pdv-copa-candy-red .counter-pdv-layout .order-left .page-head.compact,
body.pdv-copa-soft-green .counter-pdv-layout .order-left .page-head.compact,
body.pdv-copa-graphite .counter-pdv-layout .order-left .page-head.compact,
body.pdv-copa-compact-gray .counter-pdv-layout .order-left .page-head.compact {
  min-height: 66px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 290px) !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--theme-line) !important;
  border-radius: 8px 8px 0 0 !important;
  background: var(--theme-header) !important;
}

body.pdv-copa-brand .counter-pdv-layout .page-head h1,
body.pdv-copa-modern .counter-pdv-layout .page-head h1,
body.pdv-copa-blue-white .counter-pdv-layout .page-head h1,
body.pdv-copa-dark-yellow .counter-pdv-layout .page-head h1,
body.pdv-copa-candy-red .counter-pdv-layout .page-head h1,
body.pdv-copa-soft-green .counter-pdv-layout .page-head h1,
body.pdv-copa-graphite .counter-pdv-layout .page-head h1,
body.pdv-copa-compact-gray .counter-pdv-layout .page-head h1 {
  margin: 0 !important;
  color: var(--theme-header-text) !important;
  font-size: 28px !important;
  line-height: 1.05 !important;
  text-align: left !important;
  text-shadow: none !important;
  letter-spacing: 0 !important;
}

body.pdv-copa-brand .counter-pdv-layout .page-head h1::before,
body.pdv-copa-brand .counter-pdv-layout .page-head h1::after,
body.pdv-copa-modern .counter-pdv-layout .page-head h1::before,
body.pdv-copa-modern .counter-pdv-layout .page-head h1::after,
body.pdv-copa-blue-white .counter-pdv-layout .page-head h1::before,
body.pdv-copa-blue-white .counter-pdv-layout .page-head h1::after,
body.pdv-copa-dark-yellow .counter-pdv-layout .page-head h1::before,
body.pdv-copa-dark-yellow .counter-pdv-layout .page-head h1::after,
body.pdv-copa-candy-red .counter-pdv-layout .page-head h1::before,
body.pdv-copa-candy-red .counter-pdv-layout .page-head h1::after,
body.pdv-copa-soft-green .counter-pdv-layout .page-head h1::before,
body.pdv-copa-soft-green .counter-pdv-layout .page-head h1::after,
body.pdv-copa-graphite .counter-pdv-layout .page-head h1::before,
body.pdv-copa-graphite .counter-pdv-layout .page-head h1::after,
body.pdv-copa-compact-gray .counter-pdv-layout .page-head h1::before,
body.pdv-copa-compact-gray .counter-pdv-layout .page-head h1::after {
  content: none !important;
}

body.pdv-copa-brand .counter-pdv-layout .page-head p,
body.pdv-copa-modern .counter-pdv-layout .page-head p,
body.pdv-copa-blue-white .counter-pdv-layout .page-head p,
body.pdv-copa-dark-yellow .counter-pdv-layout .page-head p,
body.pdv-copa-candy-red .counter-pdv-layout .page-head p,
body.pdv-copa-soft-green .counter-pdv-layout .page-head p,
body.pdv-copa-graphite .counter-pdv-layout .page-head p,
body.pdv-copa-compact-gray .counter-pdv-layout .page-head p {
  margin: 3px 0 0 !important;
  color: var(--theme-muted) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

body.pdv-copa-brand .counter-pdv-layout .header-actions,
body.pdv-copa-modern .counter-pdv-layout .header-actions,
body.pdv-copa-blue-white .counter-pdv-layout .header-actions,
body.pdv-copa-dark-yellow .counter-pdv-layout .header-actions,
body.pdv-copa-candy-red .counter-pdv-layout .header-actions,
body.pdv-copa-soft-green .counter-pdv-layout .header-actions,
body.pdv-copa-graphite .counter-pdv-layout .header-actions,
body.pdv-copa-compact-gray .counter-pdv-layout .header-actions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 6px !important;
}

body.pdv-copa-brand .counter-pdv-layout .header-actions .btn,
body.pdv-copa-modern .counter-pdv-layout .header-actions .btn,
body.pdv-copa-blue-white .counter-pdv-layout .header-actions .btn,
body.pdv-copa-dark-yellow .counter-pdv-layout .header-actions .btn,
body.pdv-copa-candy-red .counter-pdv-layout .header-actions .btn,
body.pdv-copa-soft-green .counter-pdv-layout .header-actions .btn,
body.pdv-copa-graphite .counter-pdv-layout .header-actions .btn,
body.pdv-copa-compact-gray .counter-pdv-layout .header-actions .btn,
body.pdv-copa-brand .counter-pdv-layout .header-actions label.btn,
body.pdv-copa-modern .counter-pdv-layout .header-actions label.btn,
body.pdv-copa-blue-white .counter-pdv-layout .header-actions label.btn,
body.pdv-copa-dark-yellow .counter-pdv-layout .header-actions label.btn,
body.pdv-copa-candy-red .counter-pdv-layout .header-actions label.btn,
body.pdv-copa-soft-green .counter-pdv-layout .header-actions label.btn,
body.pdv-copa-graphite .counter-pdv-layout .header-actions label.btn,
body.pdv-copa-compact-gray .counter-pdv-layout .header-actions label.btn {
  min-height: 34px !important;
  justify-content: flex-start !important;
  padding: 6px 10px !important;
  border: 1px solid var(--theme-line) !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: none !important;
  font-size: 14px !important;
}

body.pdv-copa-brand .counter-pdv-layout .header-actions .btn .shortcut-key,
body.pdv-copa-modern .counter-pdv-layout .header-actions .btn .shortcut-key,
body.pdv-copa-blue-white .counter-pdv-layout .header-actions .btn .shortcut-key,
body.pdv-copa-dark-yellow .counter-pdv-layout .header-actions .btn .shortcut-key,
body.pdv-copa-candy-red .counter-pdv-layout .header-actions .btn .shortcut-key,
body.pdv-copa-soft-green .counter-pdv-layout .header-actions .btn .shortcut-key,
body.pdv-copa-graphite .counter-pdv-layout .header-actions .btn .shortcut-key,
body.pdv-copa-compact-gray .counter-pdv-layout .header-actions .btn .shortcut-key {
  min-width: 42px !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  background: var(--theme-accent) !important;
  color: #ffffff !important;
}

body.pdv-copa-brand .counter-pdv-layout .search-add,
body.pdv-copa-modern .counter-pdv-layout .search-add,
body.pdv-copa-blue-white .counter-pdv-layout .search-add,
body.pdv-copa-dark-yellow .counter-pdv-layout .search-add,
body.pdv-copa-candy-red .counter-pdv-layout .search-add,
body.pdv-copa-soft-green .counter-pdv-layout .search-add,
body.pdv-copa-graphite .counter-pdv-layout .search-add,
body.pdv-copa-compact-gray .counter-pdv-layout .search-add {
  grid-template-columns: minmax(0, 1fr) 90px 150px !important;
  gap: 10px !important;
  padding: 12px 14px !important;
  border-bottom: 1px solid var(--theme-line) !important;
  background: var(--theme-panel) !important;
}

body.pdv-copa-brand .counter-pdv-layout .search-add input,
body.pdv-copa-modern .counter-pdv-layout .search-add input,
body.pdv-copa-blue-white .counter-pdv-layout .search-add input,
body.pdv-copa-dark-yellow .counter-pdv-layout .search-add input,
body.pdv-copa-candy-red .counter-pdv-layout .search-add input,
body.pdv-copa-soft-green .counter-pdv-layout .search-add input,
body.pdv-copa-graphite .counter-pdv-layout .search-add input,
body.pdv-copa-compact-gray .counter-pdv-layout .search-add input,
body.pdv-copa-brand .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-modern .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-blue-white .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-dark-yellow .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-candy-red .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-soft-green .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-graphite .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-compact-gray .counter-pdv-layout .search-add .btn.primary {
  min-height: 48px !important;
  font-size: 18px !important;
}

body.pdv-copa-brand .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-modern .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-blue-white .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-dark-yellow .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-candy-red .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-soft-green .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-graphite .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-compact-gray .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-brand .counter-summary-finish .counter-finish-btn,
body.pdv-copa-modern .counter-summary-finish .counter-finish-btn,
body.pdv-copa-blue-white .counter-summary-finish .counter-finish-btn,
body.pdv-copa-dark-yellow .counter-summary-finish .counter-finish-btn,
body.pdv-copa-candy-red .counter-summary-finish .counter-finish-btn,
body.pdv-copa-soft-green .counter-summary-finish .counter-finish-btn,
body.pdv-copa-graphite .counter-summary-finish .counter-finish-btn,
body.pdv-copa-compact-gray .counter-summary-finish .counter-finish-btn {
  border-color: var(--theme-pay) !important;
  background: var(--theme-pay) !important;
  color: #ffffff !important;
  box-shadow: 0 12px 24px rgba(22, 163, 74, .18) !important;
}

body.pdv-copa-candy-red .counter-pdv-layout .search-add .btn.primary,
body.pdv-copa-candy-red .counter-summary-finish .counter-finish-btn {
  background: var(--theme-action) !important;
  border-color: var(--theme-action) !important;
}

body.pdv-copa-brand .counter-items-head,
body.pdv-copa-modern .counter-items-head,
body.pdv-copa-blue-white .counter-items-head,
body.pdv-copa-dark-yellow .counter-items-head,
body.pdv-copa-candy-red .counter-items-head,
body.pdv-copa-soft-green .counter-items-head,
body.pdv-copa-graphite .counter-items-head,
body.pdv-copa-compact-gray .counter-items-head {
  border-top: 0 !important;
  background: var(--theme-soft) !important;
  color: #334155 !important;
}

body.pdv-copa-brand .counter-pdv-layout .order-items,
body.pdv-copa-modern .counter-pdv-layout .order-items,
body.pdv-copa-blue-white .counter-pdv-layout .order-items,
body.pdv-copa-dark-yellow .counter-pdv-layout .order-items,
body.pdv-copa-candy-red .counter-pdv-layout .order-items,
body.pdv-copa-soft-green .counter-pdv-layout .order-items,
body.pdv-copa-graphite .counter-pdv-layout .order-items,
body.pdv-copa-compact-gray .counter-pdv-layout .order-items {
  background: var(--theme-panel) !important;
  border-color: var(--theme-line) !important;
}

body.pdv-copa-brand .counter-pdv-layout .order-items article.counter-item-row,
body.pdv-copa-modern .counter-pdv-layout .order-items article.counter-item-row,
body.pdv-copa-blue-white .counter-pdv-layout .order-items article.counter-item-row,
body.pdv-copa-dark-yellow .counter-pdv-layout .order-items article.counter-item-row,
body.pdv-copa-candy-red .counter-pdv-layout .order-items article.counter-item-row,
body.pdv-copa-soft-green .counter-pdv-layout .order-items article.counter-item-row,
body.pdv-copa-graphite .counter-pdv-layout .order-items article.counter-item-row,
body.pdv-copa-compact-gray .counter-pdv-layout .order-items article.counter-item-row {
  min-height: 60px !important;
  border-bottom: 1px solid var(--theme-line) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body.pdv-copa-brand .counter-summary-card h2,
body.pdv-copa-modern .counter-summary-card h2,
body.pdv-copa-blue-white .counter-summary-card h2,
body.pdv-copa-dark-yellow .counter-summary-card h2,
body.pdv-copa-candy-red .counter-summary-card h2,
body.pdv-copa-soft-green .counter-summary-card h2,
body.pdv-copa-graphite .counter-summary-card h2,
body.pdv-copa-compact-gray .counter-summary-card h2 {
  min-height: 42px !important;
  margin: -1px -1px 0 !important;
  padding: 14px 16px !important;
  border-radius: 8px 8px 0 0 !important;
  background: var(--theme-header) !important;
  color: var(--theme-header-text) !important;
  font-size: 22px !important;
  text-align: center !important;
}

body.pdv-copa-brand .counter-summary-total strong,
body.pdv-copa-modern .counter-summary-total strong,
body.pdv-copa-blue-white .counter-summary-total strong,
body.pdv-copa-dark-yellow .counter-summary-total strong,
body.pdv-copa-candy-red .counter-summary-total strong,
body.pdv-copa-soft-green .counter-summary-total strong,
body.pdv-copa-graphite .counter-summary-total strong,
body.pdv-copa-compact-gray .counter-summary-total strong {
  color: #15803d !important;
  font-size: 52px !important;
  line-height: 1 !important;
}

body.pdv-copa-brand .counter-summary-stats strong,
body.pdv-copa-modern .counter-summary-stats strong,
body.pdv-copa-blue-white .counter-summary-stats strong,
body.pdv-copa-dark-yellow .counter-summary-stats strong,
body.pdv-copa-candy-red .counter-summary-stats strong,
body.pdv-copa-soft-green .counter-summary-stats strong,
body.pdv-copa-graphite .counter-summary-stats strong,
body.pdv-copa-compact-gray .counter-summary-stats strong {
  color: #15803d !important;
  font-size: 28px !important;
}

body.pdv-copa-brand .counter-favorite-tile,
body.pdv-copa-modern .counter-favorite-tile,
body.pdv-copa-blue-white .counter-favorite-tile,
body.pdv-copa-dark-yellow .counter-favorite-tile,
body.pdv-copa-candy-red .counter-favorite-tile,
body.pdv-copa-soft-green .counter-favorite-tile,
body.pdv-copa-graphite .counter-favorite-tile,
body.pdv-copa-compact-gray .counter-favorite-tile {
  border-color: var(--theme-line) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

@media (max-width: 1100px) {
  body.pdv-copa-brand .counter-pdv-layout,
  body.pdv-copa-modern .counter-pdv-layout,
  body.pdv-copa-blue-white .counter-pdv-layout,
  body.pdv-copa-dark-yellow .counter-pdv-layout,
  body.pdv-copa-candy-red .counter-pdv-layout,
  body.pdv-copa-soft-green .counter-pdv-layout,
  body.pdv-copa-graphite .counter-pdv-layout,
  body.pdv-copa-compact-gray .counter-pdv-layout {
    grid-template-columns: 1fr !important;
  }
}

/* Sidebar premium */
.sidebar {
  width: 248px;
  padding: 14px 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 42px 26px, rgba(80, 214, 224, .16), transparent 34px),
    linear-gradient(180deg, #071b36 0%, #0b2846 48%, #071829 100%);
  color: #eaf2fb;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08), 18px 0 34px rgba(15, 23, 42, .13);
}

.sidebar::before {
  content: "";
  display: block;
  height: 1px;
  margin: 0 10px 10px;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, .45), transparent);
}

.sidebar-head {
  min-height: 114px;
  align-items: center;
  justify-content: center;
  padding: 10px 12px 16px;
  margin: 0 4px 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.brand {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff7a1a, #ef4444);
  box-shadow: 0 16px 30px rgba(0, 0, 0, .22);
}

.brand img,
.brand-fallback {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: none;
}

.sidebar nav {
  gap: 7px;
  padding: 0 5px 12px;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, .36) transparent;
}

.sidebar nav::-webkit-scrollbar {
  width: 5px;
}

.sidebar nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, .32);
}

.nav-section-wrap {
  position: relative;
  margin: 0;
  border-radius: 11px;
}

.nav-section-wrap summary,
.nav-top-link {
  min-height: 40px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: rgba(226, 232, 240, .9);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.12;
  transition: background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.nav-section-wrap summary {
  grid-template-columns: 30px minmax(0, 1fr) 14px;
  gap: 8px;
}

.nav-top-link {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.nav-section-wrap summary:hover,
.nav-top-link:hover {
  border-color: rgba(103, 232, 249, .16);
  background: rgba(255, 255, 255, .06);
  color: #ffffff;
}

.nav-section-wrap[open] > summary,
.nav-top-link.active {
  border-color: rgba(103, 232, 249, .22);
  background: linear-gradient(135deg, rgba(79, 70, 229, .72), rgba(37, 99, 235, .48));
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(37, 99, 235, .18);
}

.nav-section-wrap[open] > summary::before,
.nav-top-link.active::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: #67e8f9;
  box-shadow: 0 0 16px rgba(103, 232, 249, .6);
}

.nav-group-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .08);
  color: rgba(226, 232, 240, .9);
  font-size: 12px;
  font-weight: 900;
}

.nav-section-wrap[open] > summary .nav-group-icon,
.nav-top-link.active .nav-group-icon,
.nav-section-wrap summary:hover .nav-group-icon,
.nav-top-link:hover .nav-group-icon {
  background: rgba(255, 255, 255, .15);
  color: #ffffff;
}

.chevron {
  font-size: 20px;
  opacity: .9;
}

.nav-section {
  position: relative;
  gap: 1px;
  margin: 3px 0 7px 17px;
  padding: 4px 0 4px 21px;
}

.nav-section::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: rgba(148, 163, 184, .22);
}

.sidebar a:not(.brand):not(.logout):not(.nav-top-link) {
  position: relative;
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 9px;
  color: rgba(203, 213, 225, .84);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.16;
}

.sidebar a:not(.brand):not(.logout):not(.nav-top-link):hover {
  background: rgba(255, 255, 255, .055);
  color: #ffffff;
}

.sidebar a.active:not(.brand):not(.logout) {
  background: rgba(103, 232, 249, .10);
  color: #ffffff;
  font-weight: 820;
}

.nav-dot {
  width: 5px;
  height: 5px;
  background: rgba(148, 163, 184, .62);
}

.sidebar a.active .nav-dot,
.sidebar a:hover .nav-dot {
  background: #67e8f9;
}

.sidebar-user-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: auto 6px 8px;
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #ffffff;
  width: calc(100% - 12px);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.sidebar-user-card:hover,
.sidebar-user-card[aria-expanded="true"] {
  border-radius: 11px;
  background: rgba(255, 255, 255, .07);
}
.sidebar-user-menu-wrap {
  position: relative;
  margin-top: auto;
}
.sidebar-user-menu-wrap .sidebar-user-card {
  margin-top: 0;
}
.sidebar-user-chevron {
  margin-left: auto;
  color: rgba(203, 213, 225, .72);
  font-size: 20px;
  line-height: 1;
}
.sidebar-user-menu {
  position: absolute;
  z-index: 70;
  right: 8px;
  bottom: calc(100% - 4px);
  left: 8px;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 11px;
  background: #0b2944;
  box-shadow: 0 18px 40px rgba(2, 6, 23, .32);
}
.sidebar-user-menu button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: transparent;
  color: #fff;
  text-align: left;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.sidebar-user-menu button:hover {
  background: rgba(103, 232, 249, .12);
}

.sidebar-user-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1, #22c55e);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(34, 197, 94, .16);
}

.sidebar-user-card strong,
.sidebar-user-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-card strong {
  font-size: 13px;
  font-weight: 850;
}

.sidebar-user-card small {
  margin-top: 2px;
  color: rgba(203, 213, 225, .72);
  font-size: 11px;
}

.logout {
  margin: 0 6px;
  min-height: 38px !important;
  padding: 7px 10px !important;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 11px !important;
  background: rgba(255, 255, 255, .035);
  color: rgba(226, 232, 240, .9) !important;
}

.logout:hover {
  background: rgba(239, 68, 68, .12) !important;
  color: #ffffff !important;
}

.app-version {
  padding: 8px 12px 4px;
  color: rgba(203, 213, 225, .62);
  font-size: 10px;
}
.account-password-modal {
  width: min(460px, 100%);
  display: grid;
  gap: 15px;
}
.account-password-modal .modal-header {
  margin-bottom: 2px;
}
.account-password-modal label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}
.account-password-modal input[type="password"] {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
  font: inherit;
}
.account-password-hint {
  margin-top: -7px;
  color: var(--muted);
}

.sidebar-toggle {
  left: 236px;
  width: 30px;
  border-color: rgba(103, 232, 249, .22);
  background: #08223b;
}

body.sidebar-collapsed .sidebar,
html.sidebar-collapsed-initial .sidebar {
  transform: translateX(-248px);
}

body.sidebar-collapsed .sidebar-toggle,
html.sidebar-collapsed-initial .sidebar-toggle {
  left: 0;
}

.app-main {
  margin-left: 248px;
}

.topbar {
  left: 248px;
}

body.sidebar-collapsed .app-main,
html.sidebar-collapsed-initial .app-main {
  margin-left: 0;
}

body.sidebar-collapsed .topbar,
html.sidebar-collapsed-initial .topbar {
  left: 0;
}

/* NFS-e: keep the new document screen aligned with the system pattern. */
.nfse-page .nfse-new-hero {
  padding: 28px 30px;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff, #f8fbff);
  box-shadow: 0 18px 38px rgba(15, 23, 42, .06);
}

.nfse-page .nfse-new-hero::before,
.nfse-page .nfse-new-hero::after {
  display: none;
}

.nfse-page .nfse-new-hero > div:first-child > span {
  display: inline;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.nfse-page .nfse-new-hero h1 {
  margin: 6px 0;
  color: #0f172a;
  font-size: 34px;
  line-height: 1.1;
}

.nfse-page .nfse-new-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.nfse-page .nfse-new-hero .btn {
  min-width: 0;
  min-height: 42px;
  border-radius: 7px;
  box-shadow: none;
}

.nfse-page .nfse-new-hero .products-hero-actions .btn:last-child {
  border-color: #d8e0eb;
  background: #fff;
  color: #0f172a;
  box-shadow: none;
}

.nfse-page .nfse-draft-form {
  padding: 18px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .06);
}

.nfse-page .nfse-form-section {
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #fff;
}

.nfse-page .nfse-form-section > div:first-child {
  padding: 0 0 12px;
  border-right: 0;
  border-bottom: 1px solid #edf2f7;
}

.nfse-page .nfse-form-aside {
  display: block;
}

.nfse-page .nfse-aside-icon,
.nfse-page .nfse-form-section h2::after,
.nfse-page .nfse-input-icon::before {
  display: none;
}

.nfse-page .nfse-form-section h2 {
  padding: 0;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.15;
}

.nfse-page .nfse-form-section p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.nfse-page .nfse-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.nfse-page .nfse-form-grid label {
  gap: 6px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}

.nfse-page .nfse-form-grid input,
.nfse-page .nfse-form-grid select,
.nfse-page .nfse-form-grid textarea,
.nfse-page .nfse-input-icon input {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #cfd6df;
  border-radius: 7px;
  background: #fff;
  color: #0f172a;
  font-size: 15px;
  font-weight: 600;
}

.nfse-page .nfse-form-grid input::placeholder,
.nfse-page .nfse-form-grid textarea::placeholder {
  color: #7c8798;
  font-weight: 600;
}

.nfse-page .nfse-form-tip {
  margin-top: 0;
  border-color: #dbe7f5;
  background: #f8fafc;
  color: #334155;
}

.nfse-page .nfse-form-tip > span {
  background: #eaf2ff;
  color: #2563eb;
  box-shadow: none;
}

.nfse-page .nfse-form-tip strong {
  color: #0f172a;
}

.nfse-page .nfse-draft-summary {
  border-color: #fdba74;
  border-radius: 8px;
  background: #fff7ed;
}

@media (max-width: 1100px) {
  .nfse-page .nfse-form-grid {
    grid-template-columns: 1fr;
  }
}

.payables-page {
  display: grid;
  gap: 14px;
}

.payables-page .payables-head {
  min-height: 0;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.payables-page .payables-title h1 {
  margin: 0;
  font-size: 30px;
}

.payables-page .payables-title p {
  margin: 6px 0 0;
}

.payables-page .payables-filter {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px 150px 170px auto auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(223, 228, 234, .95);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(24, 39, 75, .06);
}

.payables-page .payables-filter label {
  display: grid;
  gap: 5px;
  color: #5f6f86;
  font-size: 13px;
  font-weight: 800;
}

.payables-page .payables-filter input,
.payables-page .payables-filter select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  font-weight: 700;
}

.payables-page .payables-filter .btn {
  min-height: 42px;
  border-radius: 10px;
  padding-inline: 18px;
}

.payables-page .payables-filter [data-open-payable-modal] {
  font-size: 0;
}

.payables-page .payables-filter [data-open-payable-modal]::after {
  content: "Novo lancamento";
  font-size: 16px;
}

.payables-page .payables-tabs {
  margin-bottom: 0;
}

.payables-page .metrics {
  grid-template-columns: repeat(3, minmax(180px, 290px));
  gap: 12px;
  margin-bottom: 0;
}

.payables-page .metrics article {
  min-height: 118px;
  padding: 18px;
}

.payables-page .metrics article strong {
  font-size: 28px;
}

.payables-page .panel {
  padding: 18px;
}

.payables-page .modern-table th,
.payables-page .modern-table td {
  padding: 10px 14px;
  font-size: 15px;
  vertical-align: middle;
}

.payables-page .modern-table td:nth-child(3) {
  max-width: 340px;
}

.payables-page .modern-table td:nth-child(3) small {
  font-size: 13px;
  line-height: 1.28;
}

.payables-page .actions .btn.small {
  min-height: 38px;
  padding: 0 14px;
}

@media (max-width: 1180px) {
  .payables-page .payables-filter {
    grid-template-columns: minmax(220px, 1fr) 140px 140px 150px auto;
  }
}

@media (max-width: 820px) {
  .payables-page .payables-head {
    align-items: stretch;
    flex-direction: column;
  }

  .payables-page .payables-filter,
  .payables-page .metrics {
    grid-template-columns: 1fr;
  }
}

/* Painel GE Clientes */
.license-panel-page {
  display: grid;
  gap: 22px;
}

.license-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .94), rgba(30, 64, 175, .9)),
    #0f172a;
  color: #ffffff;
  box-shadow: 0 24px 44px rgba(15, 23, 42, .18);
}

.license-eyebrow,
.license-card-head span {
  color: #f97316;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.license-hero h1 {
  margin: 6px 0 8px;
  color: #ffffff;
  font-size: 34px;
  line-height: 1.05;
}

.license-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, .78);
  font-size: 16px;
}

.license-hero-actions,
.license-action-row,
.license-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.license-hero-actions .btn {
  background: rgba(255, 255, 255, .95);
  border-color: rgba(255, 255, 255, .7);
}

.license-hero-actions .btn.primary {
  background: #f97316;
  border-color: #f97316;
  color: #ffffff;
}

.license-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.license-metric-card {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 18px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

.license-metric-card span {
  color: #64748b;
  font-weight: 800;
}

.license-metric-card strong {
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
}

.license-metric-card small {
  color: #64748b;
}

.license-metric-card.primary {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.license-metric-card.danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.license-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.license-column,
.license-main {
  display: grid;
  gap: 18px;
}

.license-card {
  border-radius: 8px;
}

.license-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.license-card-head h2 {
  margin: 3px 0 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.1;
}

.license-client-form {
  display: grid;
  gap: 12px;
}

.license-form-grid,
.license-invoice-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.license-invoice-form {
  grid-template-columns: minmax(180px, 1fr) 150px 140px auto;
  align-items: end;
  margin-bottom: 14px;
}

.license-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px auto;
  gap: 8px;
  align-items: end;
  width: min(100%, 620px);
}

.license-client-list,
.license-invoice-list,
.license-check-list,
.license-alert-list {
  display: grid;
  gap: 10px;
}

.license-client-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.4fr) 130px 120px minmax(150px, .8fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.license-client-row.selected {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.license-client-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.license-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 900;
}

.license-client-main strong,
.license-alert-row strong,
.license-invoice-row strong,
.license-check-list strong {
  display: block;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.license-client-main small,
.license-alert-row small,
.license-invoice-row small,
.license-check-list small,
.license-client-check small,
.license-client-money small {
  color: #64748b;
}

.license-client-money,
.license-client-check {
  display: grid;
  gap: 2px;
}

.license-client-money strong,
.license-client-check strong {
  color: #0f172a;
  font-size: 15px;
}

.license-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.license-status.success {
  background: #dcfce7;
  color: #15803d;
}

.license-status.warning {
  background: #fef3c7;
  color: #b45309;
}

.license-status.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.license-status.muted {
  background: #f1f5f9;
  color: #64748b;
}

.license-alert-row,
.license-invoice-row,
.license-check-list article {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  text-decoration: none;
}

.license-alert-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.license-alert-row b {
  color: #b91c1c;
}

.license-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .8fr);
  gap: 18px;
}

.license-invoice-row {
  grid-template-columns: minmax(180px, 1fr) 110px 100px auto;
}

.license-invoice-row.open {
  background: #fffdf5;
}

.license-token-box,
.license-config-box {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #f8fafc;
}

.license-token-box code,
.license-config-box code {
  display: block;
  max-width: 100%;
  padding: 8px;
  border-radius: 6px;
  background: #0f172a;
  color: #e2e8f0;
  overflow-x: auto;
  white-space: nowrap;
}

.license-access-form {
  display: grid;
  gap: 12px;
}

.license-check-list article {
  grid-template-columns: minmax(180px, 1fr) minmax(120px, .7fr) 110px 130px;
}

@media (max-width: 1280px) {
  .license-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .license-workspace,
  .license-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .license-hero,
  .license-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .license-filter-form,
  .license-form-grid,
  .license-invoice-form,
  .license-metrics,
  .license-client-row,
  .license-invoice-row,
  .license-check-list article {
    grid-template-columns: 1fr;
  }

  .license-hero-actions .btn,
  .license-action-row .btn,
  .license-filter-form .btn,
  .license-invoice-form .btn {
    width: 100%;
  }
}

.users-page {
  display: grid;
  gap: 18px;
}

.users-head,
.users-list-head,
.user-card-head,
.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.users-head h1,
.users-page h2,
.users-page h3 {
  margin: 0 0 6px;
}

.users-head .eyebrow {
  margin: 0 0 4px;
  color: #f97316;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.users-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.user-metric {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.user-metric strong {
  display: block;
  color: #071326;
  font-size: 28px;
  line-height: 1;
}

.user-metric span:not(.metric-icon) {
  display: block;
  margin-top: 6px;
  color: #60718a;
  font-weight: 800;
}

.users-page .metric-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  font-size: 24px;
}

.users-page .metric-icon.blue { background: #2563eb; }
.users-page .metric-icon.green { background: #16a34a; }
.users-page .metric-icon.orange { background: #f97316; }

.users-layout {
  display: grid;
  grid-template-columns: minmax(520px, .95fr) minmax(560px, 1.05fr);
  gap: 18px;
  align-items: start;
}

.user-editor-card,
.users-list-card {
  display: grid;
  gap: 18px;
}

.users-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.users-form-grid.compact {
  gap: 12px;
}

.users-form-grid .wide {
  grid-column: 1 / -1;
}

.users-page label {
  margin: 0;
}

.users-page input,
.users-page select {
  min-height: 48px;
}

.user-active-check {
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: #f8fbff;
}

.user-section-card {
  padding: 16px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: #f8fbff;
}

.user-permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.users-page .permission-group {
  padding: 12px;
  border: 1px solid #dbe6f5;
  border-radius: 8px;
  background: #fff;
}

.users-page .permission-group strong {
  display: block;
  margin-bottom: 10px;
  color: #071326;
}

.users-page .permission-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.users-page .permission-check {
  color: #52657f;
  font-weight: 700;
}

.user-status-pill,
.role-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.user-status-pill.active {
  color: #047857;
  background: #d8fbe5;
}

.user-status-pill.inactive {
  color: #b91c1c;
  background: #fee2e2;
}

.role-chip {
  color: #40516a;
  background: #eef2f7;
}

.users-table-wrap {
  overflow-x: auto;
}

.users-table {
  min-width: 760px;
}

.users-table th,
.users-table td {
  vertical-align: middle;
}

.user-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}

.user-name-cell strong,
.user-name-cell small {
  display: block;
}

.user-name-cell small {
  margin-top: 3px;
  color: #60718a;
  font-weight: 700;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 2px solid #f59e0b;
  border-radius: 999px;
  color: #f97316;
  background: #fff7ed;
  font-weight: 900;
}

.users-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.users-actions form {
  display: inline-flex;
  margin: 0;
}

.users-page .empty-state {
  padding: 26px;
  color: #60718a;
  text-align: center;
  font-weight: 800;
}

@media (max-width: 1200px) {
  .users-layout,
  .users-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .users-head,
  .users-list-head,
  .user-card-head,
  .section-title-row {
    flex-direction: column;
  }

  .users-form-grid,
  .user-permission-grid,
  .users-page .permission-checks {
    grid-template-columns: 1fr;
  }
}

/* Online: product descriptions must be readable without leaving the card. */
.online-lunch-page .online-product,
.online-catalog-page .online-product,
.online-lunch-page .online-product-info,
.online-catalog-page .online-product-info {
  min-width: 0;
}

.online-lunch-page .online-product-description,
.online-catalog-page .online-product-description,
.online-lunch-page .online-product-info p,
.online-catalog-page .online-product-info p {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 900px) {
  .online-lunch-page .online-product,
  .online-catalog-page .online-product,
  .online-group-card:not(.online-group-marmitex) .online-product-has-photo,
  .online-group-marmitex .online-product {
    align-items: start;
  }

  .online-lunch-page .online-product-description,
  .online-catalog-page .online-product-description,
  .online-lunch-page .online-product-info p,
  .online-catalog-page .online-product-info p,
  .online-group-card:not(.online-group-marmitex) .online-product-has-photo .online-product-info p,
  .online-group-marmitex .online-product-info p {
    display: block !important;
    overflow: visible !important;
    max-height: none !important;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
    font-size: 13px;
    line-height: 1.3;
  }

  .online-lunch-page .online-add,
  .online-catalog-page .online-add,
  .online-group-marmitex .online-add {
    align-self: center;
  }
}

.counter-head-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.counter-import-modal {
  width: min(980px, calc(100vw - 32px));
  max-width: 980px;
}

.counter-import-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.counter-import-modal-head h2 {
  margin: 0 0 6px;
}

.counter-import-modal-head p {
  margin: 0;
  color: #5b6b85;
}

.counter-import-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid #dce6f4;
}

.counter-import-tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  padding: 10px 12px;
  color: #50627d;
  font-weight: 800;
  cursor: pointer;
}

.counter-import-tabs button.active {
  color: #0d6efd;
  border-color: #0d6efd;
}

.counter-import-tabs strong {
  margin-left: 6px;
}

.counter-import-search {
  display: block;
  margin-bottom: 14px;
  color: #34445c;
  font-weight: 700;
}

.counter-import-search input {
  width: 100%;
  margin-top: 6px;
}

.counter-import-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(58vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.counter-import-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid #dce6f4;
  border-radius: 10px;
  background: #fff;
}

.counter-import-row[hidden] {
  display: none !important;
}

.counter-import-row div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.counter-import-row span,
.counter-import-row small {
  color: #5b6b85;
}

.counter-import-row strong {
  color: #0f172a;
}

.counter-import-row > div:last-child {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.counter-import-empty {
  margin-top: 12px;
}

@media (max-width: 720px) {
  .counter-head-actions {
    justify-content: stretch;
  }

  .counter-head-actions .btn {
    flex: 1;
  }

  .counter-import-row {
    grid-template-columns: 1fr;
  }

  .counter-import-row > div:last-child {
    justify-content: space-between;
  }
}

.commission-receipt-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid #a9ddbd;
    border-radius: 14px;
    background: #effaf3;
    color: #176b3a;
}

.commission-receipt-notice strong,
.commission-receipt-notice span {
    display: block;
}

.commission-receipt-notice span {
    margin-top: 4px;
    color: #4a6e58;
}

.commission-receipt-notice-actions,
.commission-row-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.commission-row-actions form {
    margin: 0;
}

.commission-row-actions .receipt {
    color: #075ecf;
    border-color: #9fc8ff;
    background: #eef6ff;
}

/* Mantem as listas da OS dentro dos cards quando houver muitos itens. */
.quote-items-table.os-items-scroll {
    height: 260px;
    max-height: 260px;
    overflow-x: auto;
    overflow-y: scroll !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: auto;
    scrollbar-color: #f47c20 #e7edf5;
}

.quote-items-table.os-items-scroll .modern-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 #dbe4ef;
}

.quote-items-table.os-items-scroll::-webkit-scrollbar {
    width: 16px;
    height: 12px;
}

.quote-items-table.os-items-scroll::-webkit-scrollbar-thumb {
    min-height: 42px;
    border: 3px solid #e7edf5;
    border-radius: 999px;
    background: #f47c20;
}

.quote-items-table.os-items-scroll::-webkit-scrollbar-track {
    border-left: 1px solid #d6e0ec;
    background: #e7edf5;
}

.quote-items-table.os-items-scroll::-webkit-scrollbar-thumb:hover {
    background: #d95f08;
}

.os-items-scroll-shell.has-visible-scrollbar {
    display: block;
}

.os-items-scroll-shell .quote-items-table.os-items-scroll {
    margin-top: 10px;
}

.os-visible-scrollbar {
    display: none !important;
}

.os-visible-scrollbar[hidden] {
    display: none !important;
}

.os-visible-scrollbar button {
    flex: 0 0 24px;
    width: 22px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: #f47c20;
    color: #fff;
    font-size: 11px;
    line-height: 24px;
    cursor: pointer;
}

.os-visible-scrollbar-track {
    position: relative;
    flex: 1;
    min-height: 60px;
    border-radius: 999px;
    background: #dbe4ef;
    cursor: pointer;
}

.os-visible-scrollbar-track span {
    position: absolute;
    top: 0;
    left: 3px;
    right: 3px;
    min-height: 38px;
    border-radius: 999px;
    background: #f47c20;
    box-shadow: 0 2px 6px rgba(170, 74, 8, .3);
    cursor: grab;
    touch-action: none;
}

.os-visible-scrollbar-track span:active {
    cursor: grabbing;
    background: #d95f08;
}

.os-items-table th:first-child,
.os-items-table td:first-child {
    width: 46px;
    min-width: 46px;
    text-align: center;
}

.os-items-table th:nth-child(2),
.os-items-table td:nth-child(2) {
    width: auto;
    text-align: left;
}

.os-item-number {
    color: #f47c20;
    font-size: 13px !important;
    font-weight: 900;
}

.os-service-items-table th:nth-child(3),
.os-service-items-table td:nth-child(3) {
    width: 190px;
    text-align: left;
}

.os-service-items-table th:nth-child(4),
.os-service-items-table td:nth-child(4) {
    width: 46px;
    text-align: right;
}

.os-service-items-table th:nth-child(5),
.os-service-items-table td:nth-child(5),
.os-service-items-table th:nth-child(6),
.os-service-items-table td:nth-child(6) {
    width: 68px;
    text-align: right;
}

.os-service-items-table th:nth-child(7),
.os-service-items-table td:nth-child(7) {
    width: 54px;
    text-align: center;
}

@media (max-width: 800px) {
    .quote-items-table.os-items-scroll {
        height: 230px;
        max-height: 230px;
    }

    .commission-receipt-notice {
        align-items: stretch;
        flex-direction: column;
    }
}
