/*
 * Sales workflow UI polish.
 * Scoped classes keep the visual upgrade away from unrelated AdminLTE screens.
 */
.sales-page {
  background: #f4f7fb;
}

.sales-page .content {
  padding-bottom: 18px;
}

.sales-page .content-header {
  padding: 14px 14px 8px;
}

.sales-shell {
  padding: 0 14px 18px;
}

.sales-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: #172331;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(18, 30, 45, 0.14);
}

.sales-hero h1,
.sales-hero h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.15;
}

.sales-hero p {
  margin: 5px 0 0;
  color: #b9c7d6;
  font-size: 0.92rem;
}

.sales-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  color: #f2b84b;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.sales-hero-actions,
.sales-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.sales-hero-btn {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  color: #172331;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(5, 12, 20, 0.18);
}

.sales-hero-btn:hover {
  color: #0f172a;
  background: #f8fafc;
}

.sales-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 8px;
  color: #e8f0f8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.84rem;
  white-space: nowrap;
}

.sales-card {
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(18, 30, 45, 0.1);
}

.sales-card > .card-header,
.sales-card-header {
  background: #ffffff;
  border-bottom: 1px solid #e7edf4;
}

.detail-card .card-body {
  padding: 16px;
  background: #ffffff;
}

.detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.detail-kicker {
  display: block;
  margin-bottom: 4px;
  color: #667789;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.detail-title,
.detail-toolbar h3 {
  margin: 0;
  color: #172331;
  font-size: 1.18rem;
  font-weight: 850;
  line-height: 1.2;
}

.detail-title span {
  color: #1e6f68;
}

.detail-table-wrap {
  min-height: 220px;
}

.purchase-page .sales-hero {
  background: #243246;
}

.purchase-page .sales-eyebrow {
  color: #9dd6ff;
}

.purchase-page .sales-primary-btn,
.purchase-page .record {
  background: #234f7a;
  box-shadow: 0 9px 16px rgba(35, 79, 122, 0.22);
}

.purchase-page .sales-primary-btn:hover,
.purchase-page .record:hover {
  background: #1d4266;
}

.purchase-entry-card {
  margin-bottom: 18px;
}

.purchase-entry-body {
  background: #f8fafc;
}

.purchase-meta-header {
  padding: 14px 16px;
}

.purchase-meta-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 8px 6px;
}

.purchase-meta-table th {
  color: #667789;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.purchase-meta-table td {
  min-width: 145px;
  vertical-align: middle;
}

.purchase-meta-table td:has(.sname) {
  min-width: 280px;
}

.purchase-meta-header .sname,
.purchase-meta-header .select2-container {
  width: 100% !important;
  min-width: 280px;
}

.purchase-pay-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  align-items: center;
}

.purchase-pay-options br {
  display: none;
}

.purchase-pay-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin: 0;
  padding: 6px 10px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.purchase-items-card,
.purchase-summary-card {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(18, 30, 45, 0.1);
}

.purchase-items-card {
  min-height: 420px;
}

.purchase-scanbar .form-control {
  min-height: 44px;
  font-weight: 700;
}

.purchase-scanbar .input-group-text {
  color: #ffffff;
  background: #234f7a;
  border-color: #234f7a;
}

.purchase-product-table {
  min-width: 920px;
}

.purchase-product-table input.form-control {
  min-width: 80px;
}

.purchase-summary-card::before {
  background: #f2b84b;
}

.purchase-summary-card .input-group-addon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  color: #667789;
  background: #f8fafc;
  border: 1px solid #d9e2ec;
  border-right: 0;
  border-radius: 7px 0 0 7px;
}

.purchase-summary-card .input-group .form-control {
  border-radius: 0 7px 7px 0;
}

.purchase-filter-header .d-flex {
  gap: 12px;
  flex-wrap: wrap;
}

.purchase-total-card {
  background: #234f7a;
  box-shadow: 0 9px 16px rgba(35, 79, 122, 0.2);
}

.purchase-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.purchase-status.is-cash {
  color: #14532d;
  background: #dcfce7;
}

.purchase-status.is-credit {
  color: #7c2d12;
  background: #ffedd5;
}

.purchase-product-modal .modal-header {
  align-items: center;
}

.purchase-product-modal .modal-title {
  margin: 0;
  color: #172331;
  font-size: 1.15rem;
  font-weight: 850;
}

.inventory-page .sales-hero {
  background: #183532;
}

.inventory-page .sales-eyebrow {
  color: #80e0c7;
}

.inventory-card,
.stock-adjust-card {
  margin-bottom: 18px;
}

.inventory-toolbar .d-flex,
.stock-adjust-header .d-flex {
  gap: 12px;
  flex-wrap: wrap;
}

.inventory-actions {
  gap: 8px;
  flex-wrap: wrap;
}

.inventory-page .btn-app {
  min-width: 104px;
  height: 54px;
  margin: 0 4px 4px 0;
  border-radius: 8px;
}

.inventory-total-card {
  background: #1e6f68;
  box-shadow: 0 9px 16px rgba(30, 111, 104, 0.2);
}

.inventory-table-wrap {
  min-height: 360px;
}

.low-stock-row {
  background: #fff7d6 !important;
}

.low-stock-row:hover {
  background: #ffefb0 !important;
}

.stock-qty {
  display: inline-flex;
  justify-content: flex-end;
  min-width: 72px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 850;
}

.stock-qty.is-low {
  color: #7c2d12;
  background: #ffedd5;
}

.stock-adjust-card .card-body {
  background: #f8fafc;
}

.stock-meta-row {
  margin-bottom: 10px;
}

.stock-meta-row .form-group {
  margin-bottom: 12px;
}

.stock-meta-row label {
  color: #667789;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stock-adjust-table-wrap {
  min-height: 260px;
  background: #ffffff;
}

.stock-adjust-table {
  width: 1380px;
  min-width: 1380px;
  table-layout: fixed;
}

.stock-adjust-table .adjust-no-col {
  width: 46px;
}

.stock-adjust-table .adjust-product-col {
  width: 400px;
  min-width: 400px;
}

.stock-adjust-table .adjust-name-col {
  width: 400px;
  min-width: 400px;
}

.stock-adjust-table .adjust-balance-col,
.stock-adjust-table .adjust-qty-col,
.stock-adjust-table .adjust-unit-col {
  width: 90px;
}

.stock-adjust-table .adjust-note-col {
  width: 260px;
}

.stock-adjust-table .adjust-action-col,
.stock-adjust-table th:nth-child(8),
.stock-adjust-table td:nth-child(8) {
  width: 54px;
}

.stock-adjust-table .select2-container {
  width: 400px !important;
  min-width: 400px;
}

.stock-adjust-table .select2-container--bootstrap4 .select2-selection {
  width: 100%;
}

.stock-adjust-dropdown {
  min-width: 400px !important;
}

.stock-adjust-table input.form-control {
  width: 100%;
}

.stock-adjust-table .stock,
.stock-adjust-table .qty,
.stock-adjust-table .unit {
  min-width: 0;
  text-align: right;
}

.stock-adjust-table .btnadd,
.stock-adjust-table .btnremove {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 7px;
}

.stock-adjust-card .card-footer {
  background: #ffffff;
  border-top: 1px solid #e7edf4;
}

.business-page .sales-hero,
.finance-page .sales-hero,
.salary-page .sales-hero,
.expense-page .sales-hero {
  background: #243246;
}

.party-page .sales-eyebrow {
  color: #9dd6ff;
}

.finance-page .sales-eyebrow {
  color: #80e0c7;
}

.salary-page .sales-eyebrow {
  color: #d7c3ff;
}

.expense-page .sales-eyebrow {
  color: #ffc4a3;
}

.business-card,
.finance-card,
.salary-card,
.expense-card {
  margin-bottom: 18px;
}

.business-toolbar,
.finance-toolbar,
.salary-toolbar,
.expense-toolbar {
  padding: 14px 16px;
}

.business-toolbar .d-flex,
.finance-toolbar .d-flex,
.salary-toolbar .d-flex,
.expense-toolbar .d-flex {
  gap: 12px;
  flex-wrap: wrap;
}

.business-total-card,
.salary-total-card,
.expense-total-card {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 180px;
  min-height: 58px;
  padding: 9px 13px;
  color: #ffffff;
  background: #234f7a;
  border-radius: 8px;
  box-shadow: 0 9px 16px rgba(35, 79, 122, 0.18);
}

.business-total-card span,
.salary-total-card span,
.expense-total-card span {
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0.78;
  text-transform: uppercase;
}

.business-total-card strong,
.salary-total-card strong,
.expense-total-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.28rem;
  line-height: 1.1;
}

.supplier-page .business-total-card,
.salary-total-card {
  background: #5b4a8b;
  box-shadow: 0 9px 16px rgba(91, 74, 139, 0.18);
}

.expense-total-card {
  background: #8a4a36;
  box-shadow: 0 9px 16px rgba(138, 74, 54, 0.18);
}

.business-form-panel,
.finance-entry-panel,
.expense-entry-panel {
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
}

.business-form-panel .form-group:last-of-type,
.finance-entry-panel .form-group:last-of-type,
.expense-entry-panel .form-group:last-of-type {
  margin-bottom: 14px;
}

.business-page label,
.finance-page label,
.salary-page label,
.expense-page label {
  color: #667789;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.business-page .form-control,
.finance-page .form-control,
.salary-page .form-control,
.expense-page .form-control {
  min-height: 38px;
  border-color: #d9e2ec;
  border-radius: 7px;
}

.business-page textarea.form-control,
.finance-page textarea.form-control,
.salary-page textarea.form-control,
.expense-page textarea.form-control {
  min-height: 82px;
}

.business-modal label,
.salary-modal label,
.expense-modal label {
  color: #667789;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.business-modal .form-control,
.salary-modal .form-control,
.expense-modal .form-control {
  min-height: 38px;
  border-color: #d9e2ec;
  border-radius: 7px;
}

.business-modal textarea.form-control,
.salary-modal textarea.form-control,
.expense-modal textarea.form-control {
  min-height: 82px;
}

.business-page .btn,
.finance-page .btn,
.salary-page .btn,
.expense-page .btn {
  border-radius: 7px;
  font-weight: 800;
}

.business-page .btn-primary,
.finance-page .btn-primary,
.salary-page .btn-primary,
.expense-page .btn-primary {
  background: #234f7a;
  border-color: #234f7a;
  box-shadow: 0 7px 14px rgba(35, 79, 122, 0.18);
}

.finance-page .btn-primary {
  background: #1e6f68;
  border-color: #1e6f68;
}

.salary-page .btn-primary {
  background: #5b4a8b;
  border-color: #5b4a8b;
}

.expense-page .btn-primary {
  background: #8a4a36;
  border-color: #8a4a36;
}

.business-table-wrap,
.finance-table-wrap,
.salary-table-wrap,
.expense-table-wrap {
  min-height: 320px;
  padding: 2px;
  overflow-x: auto;
}

.business-page table.dataTable,
.finance-page table.dataTable,
.salary-page table.dataTable,
.expense-page table.dataTable {
  margin-top: 0 !important;
}

.business-page .table thead th,
.finance-page .table thead th,
.salary-page .table thead th,
.expense-page .table thead th {
  color: #334155;
  background: #f6f9fc;
  border-bottom: 1px solid #d9e2ec;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.business-page .table td,
.finance-page .table td,
.salary-page .table td,
.expense-page .table td {
  vertical-align: middle;
}

.business-page .btn-group .btn,
.finance-page .btn-group .btn,
.salary-page .btn-group .btn,
.expense-page .btn-group .btn {
  min-width: 31px;
  min-height: 30px;
  padding: 5px 8px;
}

.business-filter,
.finance-filter,
.salary-filter,
.expense-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.business-filter table,
.finance-filter table,
.salary-filter table,
.expense-filter table {
  border-collapse: separate;
  border-spacing: 7px 0;
}

.business-filter th,
.finance-filter th,
.salary-filter th,
.expense-filter th {
  color: #667789;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.finance-entry-panel .select2-container,
.expense-entry-panel .select2-container {
  width: 100% !important;
}

.daily-report-page .sales-hero {
  background: #183532;
}

.daily-report-page .sales-eyebrow {
  color: #80e0c7;
}

.daily-report-card .card-body {
  padding: 16px;
  background: #ffffff;
}

.daily-report-toolbar .d-flex {
  gap: 12px;
  flex-wrap: wrap;
}

.daily-report-range {
  min-width: 230px;
  padding: 9px 13px;
  color: #172331;
  background: #f8fafc;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  text-align: right;
}

.daily-report-range span {
  display: block;
  color: #667789;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.daily-report-range strong {
  display: block;
  margin-top: 5px;
  color: #172331;
  font-size: 0.98rem;
  line-height: 1.2;
}

.daily-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.daily-summary-card {
  min-height: 112px;
  padding: 14px;
  background: #fbfdff;
  border: 1px solid #e1e8f0;
  border-left: 4px solid #1e6f68;
  border-radius: 8px;
}

.daily-summary-card .summary-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.daily-summary-card .summary-top span {
  color: #667789;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.daily-summary-card .summary-top i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  color: #1e6f68;
  background: #e4f5f2;
  border-radius: 8px;
}

.daily-summary-card strong {
  display: block;
  margin-top: 13px;
  color: #172331;
  font-size: 1.48rem;
  font-weight: 900;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.daily-summary-card.is-receipts {
  border-left-color: #234f7a;
}

.daily-summary-card.is-receipts .summary-top i {
  color: #234f7a;
  background: #e7f0fb;
}

.daily-summary-card.is-expenses {
  border-left-color: #b42318;
}

.daily-summary-card.is-expenses .summary-top i {
  color: #b42318;
  background: #fee4e2;
}

.daily-summary-card.is-expenses strong,
.daily-summary-card.is-negative strong,
.daily-report-page .is-negative {
  color: #b42318;
}

.daily-summary-card.is-balance {
  border-left-color: #8a6a1f;
}

.daily-summary-card.is-balance .summary-top i {
  color: #8a6a1f;
  background: #fff4cf;
}

.daily-summary-card.is-positive strong,
.daily-report-page .is-positive {
  color: #1e6f68;
}

.daily-report-table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
}

.daily-report-table {
  min-width: 680px;
  margin-bottom: 0;
}

.daily-report-table thead th {
  color: #334155;
  background: #f6f9fc;
  border-bottom: 1px solid #d9e2ec;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.daily-report-table tbody th,
.daily-report-table tbody td {
  padding: 13px;
  border-top-color: #edf2f7;
  vertical-align: middle;
}

.daily-report-page .table tbody tr:hover {
  background: #fbfdfb;
}

.report-row-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #516173;
  background: #f8fafc;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 900;
}

.report-account {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.report-account i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  color: #1e6f68;
  background: #e4f5f2;
  border-radius: 8px;
}

.report-account strong,
.report-account small {
  display: block;
}

.report-account strong {
  color: #172331;
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.2;
}

.report-account small {
  margin-top: 2px;
  color: #667789;
  font-size: 0.82rem;
}

.report-amount {
  min-width: 160px;
  color: #172331;
  font-size: 1rem;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.report-total-row {
  background: #f8fbfa;
}

.report-total-row th,
.report-total-row td {
  border-top: 2px solid #d9e2ec !important;
}

.report-total-row .report-account i {
  color: #8a6a1f;
  background: #fff4cf;
}

.customer-profile-card {
  min-width: 280px;
  padding: 9px 13px;
  color: #172331;
  background: #f8fafc;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
}

.customer-profile-card .detail-title {
  font-size: 1.02rem;
}

.sale-edit-page .sales-hero {
  background: #183532;
}

.sale-edit-page .sales-eyebrow {
  color: #80e0c7;
}

.edit-vr-card {
  margin-bottom: 18px;
}

.edit-vr-meta-header {
  padding: 14px 16px;
}

.edit-vr-meta-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 8px 6px;
}

.edit-vr-meta-table th {
  color: #667789;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.edit-vr-meta-table td {
  min-width: 170px;
}

.edit-vr-body {
  background: #f8fafc;
}

.edit-vr-products {
  min-height: 430px;
  border: 0;
  box-shadow: none;
}

.edit-vr-table-wrap {
  min-height: 360px;
}

.edit-vr-table-wrap #producttable {
  min-width: 880px;
}

.edit-vr-table-wrap #producttable .pname {
  min-width: 320px;
}

.edit-vr-table-wrap #producttable input[readonly] {
  color: #172331;
  background-color: #ffffff !important;
  border-color: #d9e2ec;
}

.edit-vr-summary {
  top: 12px;
}

.edit-vr-summary .input-group-addon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  color: #667789;
  background: #f8fafc;
  border: 1px solid #d9e2ec;
  border-right: 0;
  border-radius: 7px 0 0 7px;
}

.edit-vr-summary .input-group .form-control {
  border-radius: 0 7px 7px 0;
}

.salary-info-table {
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.salary-info-table .table {
  margin-bottom: 0;
}

.salary-info-table h3 {
  margin: 0;
  color: #172331;
  font-size: 1.04rem;
  font-weight: 850;
}

.salary-info-table th {
  width: 18%;
  color: #667789;
  background: #f8fafc;
}

.salary-info-table td {
  background: #ffffff;
}

.salary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.business-page .modal-content,
.finance-page .modal-content,
.salary-page .modal-content,
.expense-page .modal-content,
.business-modal .modal-content,
.salary-modal .modal-content,
.expense-modal .modal-content {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(18, 30, 45, 0.22);
}

.business-page .modal-header,
.finance-page .modal-header,
.salary-page .modal-header,
.expense-page .modal-header,
.business-modal .modal-header,
.salary-modal .modal-header,
.expense-modal .modal-header {
  background: #f8fafc;
  border-bottom: 1px solid #e1e8f0;
}

.business-page .modal-title,
.finance-page .modal-title,
.salary-page .modal-title,
.expense-page .modal-title,
.business-modal .modal-title,
.salary-modal .modal-title,
.expense-modal .modal-title {
  color: #172331;
  font-size: 1.12rem;
  font-weight: 850;
}

@media (max-width: 767.98px) {
  .business-total-card,
  .salary-total-card,
  .expense-total-card {
    align-items: flex-start;
    width: 100%;
  }

  .business-form-panel,
  .finance-entry-panel,
  .expense-entry-panel {
    margin-bottom: 12px;
  }

  .business-filter table,
  .finance-filter table,
  .salary-filter table,
  .expense-filter table {
    width: 100%;
    border-spacing: 0 6px;
  }

  .business-filter th,
  .business-filter td,
  .finance-filter th,
  .finance-filter td,
  .salary-filter th,
  .salary-filter td,
  .expense-filter th,
  .expense-filter td {
    display: block;
    width: 100%;
    padding: 2px 0 !important;
  }
}

.voucher-detail-page .sales-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.voucher-card {
  max-width: 980px;
  margin: 0 auto 24px;
  padding: 26px;
  color: #172331;
  background: #ffffff;
  border: 1px solid #e5ecf3;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(18, 30, 45, 0.11);
}

.voucher-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 2px solid #172331;
}

.voucher-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.voucher-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 68px;
  width: 68px;
  height: 68px;
  overflow: hidden;
  color: #ffffff;
  background: #1e6f68;
  border-radius: 8px;
  font-size: 1.8rem;
  font-weight: 900;
}

.voucher-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.voucher-brand h2 {
  margin: 0 0 4px;
  color: #101827;
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.1;
}

.voucher-brand p {
  margin: 0;
  color: #516173;
  font-size: 0.92rem;
  line-height: 1.35;
}

.voucher-title {
  min-width: 210px;
  padding: 12px 14px;
  color: #ffffff;
  background: #172331;
  border-radius: 8px;
  text-align: right;
}

.voucher-title span {
  display: block;
  color: #f2b84b;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.voucher-title strong {
  display: block;
  margin-top: 5px;
  font-size: 1.25rem;
  line-height: 1.1;
}

.return-title {
  background: #1e6f68;
}

.voucher-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.voucher-meta-grid > div {
  min-height: 70px;
  padding: 11px 12px;
  background: #f8fafc;
  border: 1px solid #e5ecf3;
  border-radius: 8px;
}

.voucher-meta-grid span {
  display: block;
  margin-bottom: 5px;
  color: #667789;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.voucher-meta-grid strong {
  display: block;
  color: #172331;
  font-size: 0.95rem;
  line-height: 1.25;
}

.voucher-table-wrap {
  overflow-x: auto;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
}

.voucher-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.voucher-table th,
.voucher-table td {
  padding: 10px 11px;
  border-bottom: 1px solid #e7edf4;
  vertical-align: top;
}

.voucher-table thead th {
  color: #334155;
  background: #eef4f3;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.voucher-table tbody td,
.voucher-table tbody th {
  color: #1f2937;
  font-size: 0.92rem;
}

.voucher-table tbody tr:last-child td,
.voucher-table tbody tr:last-child th {
  border-bottom: 0;
}

.voucher-table td strong {
  display: block;
  color: #172331;
}

.voucher-table td span {
  display: block;
  margin-top: 2px;
  color: #667789;
  font-size: 0.8rem;
}

.voucher-empty {
  padding: 26px !important;
  color: #667789 !important;
  text-align: center;
}

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

.voucher-note {
  flex: 1 1 auto;
  min-height: 88px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e5ecf3;
  border-radius: 8px;
}

.voucher-note strong,
.voucher-note span {
  display: block;
}

.voucher-note strong {
  margin-bottom: 5px;
  color: #172331;
}

.voucher-note span {
  color: #667789;
}

.voucher-summary {
  flex: 0 0 310px;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  overflow: hidden;
}

.voucher-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 12px;
  border-bottom: 1px solid #e7edf4;
}

.voucher-summary div:last-child {
  border-bottom: 0;
}

.voucher-summary span {
  color: #516173;
  font-weight: 800;
}

.voucher-summary strong {
  color: #172331;
  font-size: 1rem;
}

.voucher-summary .voucher-grand {
  color: #ffffff;
  background: #1e6f68;
}

.voucher-summary .voucher-grand span,
.voucher-summary .voucher-grand strong {
  color: #ffffff;
}

.voucher-sign-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 60px;
  margin-top: 48px;
}

.voucher-sign-row div {
  padding-top: 12px;
  border-top: 1px solid #172331;
  text-align: center;
}

.voucher-sign-row span {
  color: #516173;
  font-weight: 800;
}

.voucher-screen-action {
  width: 54px;
}

.sales-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.sales-form-grid .form-group {
  margin-bottom: 0;
}

.sales-form-grid label,
.sales-filter label,
.pos-summary-card label,
.pos-meta-header th {
  color: #667789;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.pos-meta-header table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 8px 6px;
}

.pos-meta-header .cr_cname,
.pos-meta-header .c_cname {
  min-width: 320px;
}

.pos-meta-header .sname,
.pos-meta-header #cid,
.pos-meta-header #c_cname,
.pos-meta-header .select2-container {
  width: 100% !important;
  min-width: 320px;
}

.pos-meta-header .select2-dropdown {
  min-width: 320px;
}

@media (max-width: 991.98px) {
  .pos-meta-header .cr_cname,
  .pos-meta-header .c_cname,
  .pos-meta-header .sname,
  .pos-meta-header #cid,
  .pos-meta-header #c_cname,
  .pos-meta-header .select2-container,
  .pos-meta-header .select2-dropdown {
    min-width: 240px;
  }
}

.pos-meta-header br {
  display: none;
}

.pos-meta-header td,
.pos-meta-header th {
  vertical-align: middle;
}

.pos-meta-header th {
  white-space: nowrap;
}

.pos-meta-header .form-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}

.pos-meta-header .form-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  margin: 0;
  padding: 7px 10px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #d9e2ec;
  border-radius: 7px;
  font-size: 0.88rem;
}

.sales-page .form-control,
.sales-page .custom-select,
.sales-page .select2-container--bootstrap4 .select2-selection {
  min-height: 40px;
  border-color: #d9e2ec;
  border-radius: 7px;
  background-color: #fbfdff;
}

.sales-page .form-control:focus,
.sales-page .select2-container--bootstrap4.select2-container--focus .select2-selection {
  border-color: #20c997;
  box-shadow: 0 0 0 0.16rem rgba(32, 201, 151, 0.14);
}

.sales-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sales-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  margin: 0;
  padding: 8px 11px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #d9e2ec;
  border-radius: 7px;
  text-transform: none;
  font-size: 0.9rem;
}

.sales-panel {
  border: 1px solid #e5ecf3;
  border-radius: 8px;
  box-shadow: none;
}

.sales-scanbar .input-group {
  margin-bottom: 12px !important;
}

.sales-scanbar .form-control {
  min-height: 46px;
  font-weight: 700;
}

.sales-scanbar .input-group-text {
  min-width: 48px;
  justify-content: center;
  color: #ffffff;
  background: #1e6f68;
  border-color: #1e6f68;
  border-radius: 0 7px 7px 0;
}

.sales-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5ecf3;
  border-radius: 8px;
  background: #ffffff;
}

.sales-page .table {
  margin-bottom: 0;
}

.sales-page .table thead th {
  color: #516173;
  background: #f8fafc;
  border-bottom: 1px solid #e5ecf3;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  vertical-align: middle;
  white-space: nowrap;
}

.sales-page .table tbody td,
.sales-page .table tbody th {
  border-top-color: #edf2f7;
  vertical-align: middle;
}

.sales-page .table tbody tr:hover {
  background: #fbfdfb;
}

.pos-summary-card {
  position: sticky;
  top: 12px;
  border: 0;
  border-radius: 8px;
  color: #172331;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(18, 30, 45, 0.1);
}

.pos-summary-card::before {
  content: "";
  display: block;
  height: 5px;
  background: #20c997;
}

.pos-summary-card .form-group {
  margin-bottom: 12px;
}

.pos-summary-card input[readonly] {
  color: #0f172a;
  background: #f8fafc !important;
  font-weight: 800;
}

.pos-summary-card #txttotal,
.pos-summary-card #txtdue,
.pos-summary-card #txtchange {
  font-size: 1.12rem;
}

.sales-primary-btn,
.sales-page .record {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: #1e6f68;
  box-shadow: 0 9px 16px rgba(30, 111, 104, 0.22);
  font-weight: 800;
}

.sales-primary-btn:hover,
.sales-page .record:hover {
  color: #ffffff;
  background: #185d58;
}

.sales-filter-card {
  margin-bottom: 14px;
}

.sales-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.sales-filter-card .d-flex {
  gap: 12px;
  flex-wrap: wrap;
}

.sales-filter .form-control {
  min-width: 170px;
}

.sales-total-card {
  min-width: 220px;
  padding: 10px 14px;
  color: #ffffff;
  background: #1e6f68;
  border-radius: 8px;
  box-shadow: 0 9px 16px rgba(30, 111, 104, 0.2);
  text-align: right;
}

.sales-total-card span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sales-total-card strong,
.sales-total-card h1 {
  display: block;
  margin: 0;
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1.1;
}

.sales-page .btn-app {
  min-width: 118px;
  height: 58px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(18, 30, 45, 0.12);
}

.sales-page .btn-group .btn {
  min-width: 34px;
  border-radius: 7px !important;
  margin-left: 4px;
}

.sales-page div.dt-buttons .btn {
  border-radius: 7px;
  border-color: #d9e2ec;
  background: #ffffff;
  color: #334155;
}

.sales-page .dataTables_filter input {
  min-height: 36px;
  border-radius: 7px;
  border-color: #d9e2ec;
}

.return-footer {
  display: flex;
  justify-content: flex-end;
  background: #ffffff;
  border-top: 1px solid #e7edf4;
}

.return-entry-page .sales-card-header .row {
  align-items: end;
}

.return-entry-page .sales-card-header .form-group {
  margin-bottom: 0;
}

.return-entry-page .sales-card-header .col-md-2,
.return-entry-page .sales-card-header .col-md-3 {
  margin-bottom: 10px;
}

@media (max-width: 1199.98px) {
  .sales-form-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .daily-summary-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .voucher-meta-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .purchase-meta-table,
  .purchase-meta-table tbody,
  .purchase-meta-table tr,
  .purchase-meta-table th,
  .purchase-meta-table td {
    display: block;
    width: 100%;
  }

  .purchase-meta-table {
    border-spacing: 0;
    margin: 0 !important;
  }

  .purchase-meta-table th {
    margin-top: 8px;
  }

  .purchase-meta-table td {
    min-width: 0;
    padding: 4px 0 !important;
  }

  .purchase-meta-header .sname,
  .purchase-meta-header .select2-container {
    min-width: 0;
  }
}

@media (max-width: 767.98px) {
  .sales-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .sales-hero-actions,
  .sales-nav-actions {
    justify-content: flex-start;
  }

  .sales-form-grid,
  .sales-filter {
    display: block;
  }

  .sales-form-grid .form-group,
  .sales-filter .form-group,
  .sales-filter .form-control,
  .sales-filter .btn {
    width: 100%;
    margin-bottom: 10px;
  }

  .sales-total-card {
    width: 100%;
    text-align: left;
  }

  .daily-report-toolbar .d-flex {
    display: block !important;
  }

  .daily-report-range {
    width: 100%;
    margin-top: 10px;
    text-align: left;
  }

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

  .daily-summary-card {
    min-height: 0;
  }

  .daily-report-table {
    min-width: 600px;
  }

  .pos-summary-card {
    position: static;
    margin-top: 12px;
  }

  .purchase-filter-header .d-flex {
    display: block !important;
  }

  .purchase-total-card {
    margin-top: 10px;
  }

  .voucher-card {
    padding: 16px;
  }

  .voucher-top,
  .voucher-bottom {
    flex-direction: column;
  }

  .voucher-brand {
    align-items: flex-start;
  }

  .voucher-title,
  .voucher-summary {
    width: 100%;
    min-width: 0;
    flex-basis: auto;
    text-align: left;
  }

  .voucher-meta-grid,
  .voucher-sign-row {
    grid-template-columns: 1fr;
  }

  .voucher-sign-row {
    gap: 34px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 10mm;
  }

  html,
  body {
    width: auto !important;
    min-width: 0 !important;
    background: #ffffff !important;
  }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .main-header,
  .main-sidebar,
  .main-footer,
  .content-header,
  .control-sidebar,
  .no-print {
    display: none !important;
  }

  .daily-report-page .daily-report-toolbar {
    display: none !important;
  }

  .daily-report-page .daily-summary-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .daily-report-page .daily-summary-card,
  .daily-report-page .daily-report-table-wrap {
    box-shadow: none !important;
    border-color: #111827 !important;
  }

  .daily-report-page .daily-summary-card strong {
    color: #111827 !important;
    font-size: 1rem;
  }

  .daily-report-page .daily-report-table {
    min-width: 0;
  }

  .wrapper,
  .content-wrapper,
  .sales-page,
  .sales-page .content,
  .container-fluid,
  .sales-shell {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  .content-wrapper {
    margin-left: 0 !important;
  }

  .voucher-card {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .voucher-top {
    padding-bottom: 10px;
    border-bottom: 1px solid #111827;
  }

  .voucher-logo {
    flex-basis: 54px;
    width: 54px;
    height: 54px;
  }

  .voucher-brand h2 {
    font-size: 1.25rem;
  }

  .voucher-brand p {
    color: #111827;
    font-size: 0.78rem;
  }

  .voucher-title {
    color: #ffffff !important;
    background: #111827 !important;
    box-shadow: none !important;
  }

  .voucher-meta-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 10px 0;
  }

  .voucher-meta-grid > div {
    min-height: 0;
    padding: 7px;
    border-color: #111827;
  }

  .voucher-meta-grid span {
    color: #111827;
    font-size: 0.62rem;
  }

  .voucher-meta-grid strong {
    color: #111827;
    font-size: 0.75rem;
  }

  .voucher-table-wrap {
    overflow: visible !important;
    border-color: #111827;
  }

  .voucher-table {
    page-break-inside: auto;
  }

  .voucher-table tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  .voucher-table th,
  .voucher-table td {
    padding: 5px 6px;
    border-color: #111827;
    font-size: 0.72rem;
  }

  .voucher-table thead th {
    color: #111827;
    background: #e8eeee !important;
    font-size: 0.62rem;
  }

  .voucher-table td strong,
  .voucher-table td span {
    color: #111827;
  }

  .voucher-bottom {
    gap: 10px;
    margin-top: 10px;
    page-break-inside: avoid;
  }

  .voucher-note {
    min-height: 0;
    padding: 8px;
    border-color: #111827;
  }

  .voucher-note strong,
  .voucher-note span {
    color: #111827;
    font-size: 0.75rem;
  }

  .voucher-summary {
    flex-basis: 250px;
    border-color: #111827;
  }

  .voucher-summary div {
    padding: 5px 7px;
    border-color: #111827;
  }

  .voucher-summary span,
  .voucher-summary strong {
    color: #111827;
    font-size: 0.75rem;
  }

  .voucher-summary .voucher-grand {
    background: #111827 !important;
  }

  .voucher-summary .voucher-grand span,
  .voucher-summary .voucher-grand strong {
    color: #ffffff !important;
  }

  .voucher-sign-row {
    gap: 50px;
    margin-top: 34px;
    page-break-inside: avoid;
  }

  .voucher-sign-row div {
    border-color: #111827;
  }

  .voucher-sign-row span {
    color: #111827;
    font-size: 0.75rem;
  }

  a[href]::after {
    content: "" !important;
  }
}
