.sales-table-page {
  color: #292431;
  background:
    radial-gradient(circle at 88% 5%, rgba(140, 92, 179, .14), transparent 28%),
    linear-gradient(145deg, #f4f3ed 0%, #f0ecef 58%, #eee8f2 100%);
}

.sales-table-page .dashboard-shell {
  min-height: 100vh;
}

.sales-table-page .dashboard-sidebar {
  border-right: 1px solid rgba(104, 74, 126, .2);
  background: linear-gradient(180deg, #241d2d, #17131d);
}

.sales-table-page .logo-symbol {
  color: #fff;
  background: linear-gradient(145deg, #a377c1, #684387);
  box-shadow: 0 8px 24px rgba(93, 51, 126, .38);
}

.sales-table-main {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 38px 42px 64px;
}

.sales-table-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding-inline: 0 !important;
}

.sales-table-topbar h1 {
  margin: 3px 0 7px;
  color: #261f2e;
  font-size: clamp(34px, 4.4vw, 58px);
  letter-spacing: -.045em;
}

.sales-table-panel {
  overflow: hidden;
  border: 1px solid rgba(111, 80, 133, .22);
  border-radius: 18px;
  background: rgba(255, 254, 249, .94);
  box-shadow: 0 18px 48px rgba(66, 48, 75, .11);
}

.sales-table-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(250px, 1.2fr) 170px auto;
  align-items: end;
  gap: 18px;
  padding: 24px 26px;
  border-bottom: 1px solid #ded6e2;
  background: linear-gradient(135deg, #fbfaf5, #f4eef6);
}

.sales-table-toolbar h2 {
  margin: 4px 0 0;
  color: #32283a;
  font-size: 24px;
  letter-spacing: .015em;
}

.sales-table-toolbar label {
  display: grid;
  gap: 7px;
  color: #695d70;
  font-size: 13px;
  font-weight: 850;
}

.sales-table-toolbar input,
.sales-table-toolbar select {
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid #cfc3d6 !important;
  border-radius: 9px !important;
  color: #342a3c !important;
  background: #fff !important;
  font-size: 16px;
  box-shadow: none !important;
}

.sales-table-count {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 9px;
  color: #614177;
  background: #eee3f2;
  font-size: 15px;
  white-space: nowrap;
}

.sales-table-panel > .dashboard-status {
  margin: 24px 26px;
}

.sales-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.sales-ledger-table {
  width: 100%;
  min-width: 900px !important;
  table-layout: auto !important;
  border-collapse: collapse;
}

.sales-ledger-table th,
.sales-ledger-table td {
  padding: 19px 17px;
  border-bottom: 1px solid #e3dce5;
  overflow-wrap: anywhere;
  text-align: left;
  vertical-align: top;
}

.sales-ledger-table th {
  color: #5d4d66;
  background: #f0ebf1;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: .02em;
  white-space: nowrap !important;
}

.sales-ledger-table td {
  color: #352f39;
  background: rgba(255,255,255,.72);
  font-size: clamp(16px, 1.08vw, 19px);
  line-height: 1.48;
}

.sales-ledger-table tbody tr:nth-child(even) td {
  background: #faf8fa;
}

.sales-ledger-table tbody tr:hover td {
  background: #f5eef8;
}

.sales-ledger-table tbody tr.is-requested-sale td {
  background: #eef2ff;
  box-shadow: inset 0 2px #556bd2, inset 0 -2px #556bd2;
}

.sales-ledger-table tbody tr.is-requested-sale td:first-child {
  box-shadow: inset 3px 0 #556bd2, inset 0 2px #556bd2, inset 0 -2px #556bd2;
}

.sales-ledger-table tbody tr.is-requested-sale td:last-child {
  box-shadow: inset -3px 0 #556bd2, inset 0 2px #556bd2, inset 0 -2px #556bd2;
}

.sales-ledger-table th:nth-child(1) { width: 11%; }
.sales-ledger-table th:nth-child(2) { width: 17%; }
.sales-ledger-table th:nth-child(3) { width: 31%; }
.sales-ledger-table th:nth-child(4),
.sales-ledger-table th:nth-child(5) { width: 12%; }
.sales-ledger-table th:nth-child(6) { width: 17%; }

.sales-sort-button {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.sales-sort-button.is-active {
  color: #724a91;
}

.sales-date-cell,
.sales-client-cell,
.sales-money-cell,
.sales-commercial-cell {
  font-weight: 800;
}

.sales-money-cell {
  color: #503268 !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sales-reference-list {
  display: grid;
  gap: 9px;
}

.sales-reference-list > span {
  display: grid;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #d7ccd9;
}

.sales-reference-list > span:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.sales-reference-list strong {
  color: #29212f;
  font-size: 17px;
}

.sales-reference-list small {
  color: #796d7f;
  font-size: 13px;
  font-weight: 700;
}

.sales-reference-empty,
.sales-table-empty {
  color: #827686;
  font-style: italic;
}

.sales-table-empty {
  padding: 44px !important;
  text-align: center !important;
}

@media (max-width: 1100px) {
  .sales-table-main { padding: 28px 18px 48px; }
  .sales-table-toolbar { grid-template-columns: 1fr 1fr; }
  .sales-ledger-table th, .sales-ledger-table td { padding: 14px 9px; }
  .sales-ledger-table td { font-size: 15px; }
  .sales-reference-list strong { font-size: 15px; }
}

@media (max-width: 720px) {
  .sales-table-topbar { align-items: stretch; flex-direction: column; }
  .sales-table-toolbar { grid-template-columns: 1fr; }
  .sales-ledger-table th, .sales-ledger-table td { padding: 11px 6px; font-size: 12px; }
  .sales-reference-list strong { font-size: 12px; }
  .sales-reference-list small { font-size: 10px; }
}
