/* Modern product catalogue. */
body.modern-products-page {
  background: #f4f7fb;
  color: #15243a;
}

body.modern-products-page .main-footer {
  display: none;
}

.products-page-wrapper {
  min-height: calc(100vh - 50px) !important;
  padding-bottom: 28px;
  background:
    radial-gradient(circle at 92% 0, rgba(32, 137, 210, .08), transparent 28%),
    #f4f7fb;
  color: #15243a;
}

.products-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 24px 14px;
}

.products-page-heading h1 {
  margin: 0;
  color: #10213a;
  font-size: 25px;
  font-weight: 700;
}

.products-page-heading p {
  margin: 5px 0 0;
  color: #7a879a;
  font-size: 13px;
}

.products-page-heading .breadcrumb {
  position: static;
  margin: 5px 0 0;
  padding: 0;
  background: transparent;
  font-size: 12px;
}

.products-page-content {
  padding: 0 24px;
}

.products-page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.products-page-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
}

.products-primary-action {
  border: 1px solid #1189d0;
  background: #1189d0;
  color: #fff;
  box-shadow: 0 5px 12px rgba(17, 137, 208, .18);
}

.products-primary-action:hover,
.products-primary-action:focus {
  border-color: #0877b8;
  background: #0877b8;
  color: #fff;
}

.products-secondary-action {
  border: 1px solid #d5dee9;
  background: #fff;
  color: #42516a;
}

.products-secondary-action:hover,
.products-secondary-action:focus {
  border-color: #9ecceb;
  background: #f8fbfe;
  color: #1189d0;
}

.products-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
  padding: 10px;
  border: 1px solid #e7ecf2;
  border-radius: 10px;
  background: rgba(255, 255, 255, .58);
  box-shadow: 0 2px 8px rgba(25, 47, 76, .04);
}

.product-summary-card {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 92px;
  padding: 15px 17px;
  border: 1px solid #edf0f4;
  border-radius: 9px;
  outline: 0;
  background: #fff;
  color: #15243a;
  font: inherit;
  text-align: left;
  box-shadow: 0 2px 7px rgba(25, 47, 76, .045);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.product-summary-card:hover,
.product-summary-card:focus,
.product-summary-card.active {
  border-color: #c9d9e8;
  box-shadow: 0 7px 18px rgba(25, 47, 76, .09);
  transform: translateY(-1px);
}

.product-summary-card.active {
  box-shadow: 0 0 0 2px rgba(18, 137, 208, .1), 0 7px 18px rgba(25, 47, 76, .08);
}

.product-summary-icon {
  display: inline-flex;
  flex: 0 0 56px;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-right: 15px;
  border-radius: 50%;
  font-size: 21px;
}

.product-summary-card.is-total .product-summary-icon {
  background: linear-gradient(135deg, #168dce, #0878bf);
  color: #fff;
  box-shadow: 0 7px 16px rgba(17, 137, 208, .22);
}

.product-summary-card.is-stock .product-summary-icon {
  background: #dff7e9;
  color: #11a05b;
}

.product-summary-card.is-low .product-summary-icon {
  background: #fff0d9;
  color: #e38a00;
}

.product-summary-card.is-empty .product-summary-icon {
  background: #ffe5e5;
  color: #e24b4b;
}

.product-summary-copy {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  min-width: 0;
}

.product-summary-copy small {
  overflow: hidden;
  color: #6f7d91;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .25px;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-summary-copy strong {
  margin-top: 4px;
  color: #18283f;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.15;
}

.product-summary-copy em {
  overflow: hidden;
  margin-top: 4px;
  color: #94a0b0;
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.products-catalog-panel {
  overflow: hidden;
  margin: 0;
  border: 1px solid #e1e7ef;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(21, 43, 70, .055);
}

.products-catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid #e9edf2 !important;
  background: linear-gradient(90deg, #fff 0%, #fbfdff 100%);
}

.products-catalog-header:before,
.products-catalog-header:after {
  display: none !important;
  content: none !important;
}

.products-catalog-title {
  display: flex;
  align-items: center;
  min-width: 0;
}

.products-catalog-icon {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: 13px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e2f3fd, #eef8fe);
  color: #1685c7;
  font-size: 17px;
}

.products-catalog-header h2 {
  margin: 0;
  color: #172840;
  font-size: 17px;
  font-weight: 700;
}

.products-catalog-header p {
  margin: 5px 0 0;
  color: #8591a3;
  font-size: 12px;
}

.products-inventory-value {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: 184px;
  min-height: 50px;
  padding: 8px 13px 8px 10px;
  border: 1px solid #dce7f0;
  border-radius: 8px;
  background: #f5faff;
}

.products-inventory-icon {
  display: inline-flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: 10px;
  border-radius: 8px;
  background: #dff2fc;
  color: #1285c8;
  font-size: 14px;
}

.products-inventory-copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.products-inventory-copy small {
  color: #77869a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .35px;
  text-transform: uppercase;
}

.products-inventory-copy strong {
  margin-top: 2px;
  color: #1183c8;
  font-size: 14px;
}

.products-table-body {
  padding: 14px 16px 16px;
}

.products-stock-filters {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
}

.product-stock-filter {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #dce4ed;
  border-radius: 5px;
  outline: 0;
  background: #fff;
  color: #536177;
  font-size: 12px;
  font-weight: 600;
  transition: .17s ease;
}

.product-stock-filter:hover,
.product-stock-filter:focus {
  border-color: #9ecceb;
  color: #1189d0;
}

.product-stock-filter.active {
  border-color: #168dce;
  background: #168dce;
  color: #fff;
  box-shadow: 0 3px 9px rgba(22, 141, 206, .18);
}

.products-table-scroll {
  width: 100%;
}

.products-page-wrapper .dataTables_wrapper > .row:first-child {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.products-page-wrapper .dataTables_length,
.products-page-wrapper .dataTables_filter,
.products-page-wrapper .dataTables_info,
.products-page-wrapper .dataTables_paginate {
  color: #65738a;
  font-size: 12px;
}

.products-page-wrapper .dataTables_length label,
.products-page-wrapper .dataTables_filter label {
  margin: 0;
  color: #65738a;
  font-weight: 600;
}

.products-page-wrapper .dataTables_filter {
  text-align: right;
}

.products-page-wrapper .dataTables_length select,
.products-page-wrapper .dataTables_filter input {
  height: 36px;
  border: 1px solid #ccd7e4;
  border-radius: 5px;
  outline: 0;
  background: #fff;
  color: #263750;
  font-size: 12px;
  box-shadow: none;
}

.products-page-wrapper .dataTables_length select:focus,
.products-page-wrapper .dataTables_filter input:focus {
  border-color: #62a9d8;
  box-shadow: 0 0 0 2px rgba(17, 137, 208, .08);
}

.products-page-wrapper .dataTables_filter input {
  width: 235px;
  margin-left: 8px;
  padding: 7px 11px;
}

.products-modern-table {
  width: 100% !important;
  margin: 0 0 11px !important;
  border-color: #e4e9ef;
  background: #fff;
}

.products-modern-table > thead > tr > th {
  height: 47px;
  padding: 10px 9px !important;
  border-color: #e1e7ee !important;
  border-bottom-width: 1px !important;
  background: #f7f9fc;
  color: #526076;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
  text-transform: uppercase;
  vertical-align: middle !important;
  white-space: nowrap;
}

.products-modern-table > tbody > tr > td {
  height: 62px;
  padding: 8px 9px !important;
  border-color: #e8edf2 !important;
  color: #263750;
  font-size: 12px;
  vertical-align: middle !important;
}

.products-modern-table.table-striped > tbody > tr:nth-of-type(odd) {
  background: #fbfcfe;
}

.products-modern-table > tbody > tr:hover {
  background: #f4f9fd !important;
}

.products-modern-table th:first-child,
.products-modern-table td:first-child {
  width: 42px !important;
  color: #8a96a7;
  text-align: center;
}

.products-modern-table th:nth-child(2),
.products-modern-table td:nth-child(2) {
  width: 70px !important;
  text-align: center;
}

.products-modern-table th:nth-child(6),
.products-modern-table td:nth-child(6) {
  width: 105px !important;
  text-align: center;
}

.products-modern-table th:nth-child(7),
.products-modern-table td:nth-child(7),
.products-modern-table th:nth-child(8),
.products-modern-table td:nth-child(8) {
  min-width: 108px;
  white-space: nowrap;
}

.products-modern-table th:nth-child(9),
.products-modern-table td:nth-child(9) {
  min-width: 120px;
  white-space: nowrap;
}

.products-modern-table th:last-child,
.products-modern-table td:last-child {
  width: 128px !important;
  text-align: center;
  white-space: nowrap;
}

.product-image-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #e0e7ef;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(24, 45, 75, .05);
}

.product-image-frame img {
  width: 38px;
  height: 38px;
  border-radius: 5px;
  object-fit: contain;
}

.product-stock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 72px;
  min-height: 29px;
  padding: 5px 9px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 700;
}

.product-stock-badge.is-ok {
  background: #ddf6e8;
  color: #128a51;
}

.product-stock-badge.is-warning {
  background: #fff2d9;
  color: #bd7400;
}

.product-stock-badge.is-low {
  background: #ffe8dc;
  color: #d86427;
}

.product-stock-badge.is-empty {
  background: #ffe3e3;
  color: #c93e45;
}

.product-row-actions {
  display: inline-flex;
  gap: 5px;
}

.product-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 5px !important;
  font-size: 12px;
  box-shadow: none;
}

.product-row-action.is-view {
  border-color: #b9ddf1;
  background: #eaf7fd;
  color: #1684c2;
}

.product-row-action.is-edit {
  border-color: #f1d6a4;
  background: #fff6e6;
  color: #c57b00;
}

.product-row-action.is-delete {
  border-color: #f1c6c9;
  background: #fff0f1;
  color: #d3454c;
}

.product-row-action:hover,
.product-row-action:focus {
  filter: brightness(.96);
}

.products-page-wrapper .dataTables_processing {
  top: 90px;
  height: auto;
  padding: 12px;
  border: 1px solid #dce5ee;
  border-radius: 6px;
  background: rgba(255, 255, 255, .96);
  color: #1189d0;
  box-shadow: 0 8px 22px rgba(20, 42, 70, .12);
}

.products-page-wrapper .pagination > li > a,
.products-page-wrapper .pagination > li > span {
  min-width: 34px;
  height: 34px;
  padding: 7px 10px;
  border-color: #dce3ec;
  color: #536177;
  text-align: center;
}

.products-page-wrapper .pagination > .active > a,
.products-page-wrapper .pagination > .active > span {
  border-color: #168dce;
  background: #168dce;
  color: #fff;
}

/* Product forms */
#addProduct .modal-dialog,
#modalEditProduct .modal-dialog {
  width: 720px;
  max-width: calc(100% - 30px);
  margin: 30px auto;
}

#addProduct .modal-content,
#modalEditProduct .modal-content,
#modalViewProduct .modal-content {
  overflow: hidden;
  border: 0;
  border-radius: 9px;
  box-shadow: 0 18px 55px rgba(15, 31, 54, .24);
}

#addProduct .modal-header,
#modalEditProduct .modal-header,
#modalViewProduct .modal2-header {
  min-height: 58px;
  padding: 17px 20px !important;
  border: 0;
  background: linear-gradient(90deg, #168ac7, #147eb9) !important;
  color: #fff;
}

#addProduct .modal-title,
#modalEditProduct .modal-title,
#modalViewProduct .modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

#addProduct .modal-header .close,
#modalEditProduct .modal-header .close,
#modalViewProduct .modal2-header .close {
  margin-top: -2px;
  color: #fff;
  font-size: 25px;
  opacity: .9;
  text-shadow: none;
}

#addProduct .modal-body,
#modalEditProduct .modal-body,
#modalViewProduct .modal-body {
  max-height: calc(100vh - 185px);
  padding: 20px 24px;
  overflow-y: auto;
  background: #f7f9fc;
}

#addProduct .box-body,
#modalEditProduct .box-body {
  padding: 0;
}

#addProduct .form-group,
#modalEditProduct .form-group {
  margin-bottom: 14px;
}

#addProduct .form-group.row,
#modalEditProduct .form-group.row {
  margin-right: -7px;
  margin-left: -7px;
}

#addProduct .form-group.row > [class*="col-"],
#modalEditProduct .form-group.row > [class*="col-"] {
  padding-right: 7px;
  padding-left: 7px;
}

#addProduct .form-control,
#addProduct .input-group-addon,
#modalEditProduct .form-control,
#modalEditProduct .input-group-addon {
  min-height: 43px;
  border-color: #ccd6e3;
  border-radius: 5px;
  box-shadow: none;
  font-size: 14px;
}

#addProduct .form-control:focus,
#modalEditProduct .form-control:focus {
  border-color: #5b9fd0;
  box-shadow: 0 0 0 2px rgba(17, 137, 208, .08);
}

#addProduct .input-group-addon,
#modalEditProduct .input-group-addon {
  min-width: 48px;
  background: #fff;
  color: #315479;
}

#addProduct .panel,
#modalEditProduct .panel {
  margin: 18px 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #34445e;
  font-weight: 700;
}

#addProduct .help-block,
#modalEditProduct .help-block {
  margin: 7px 0;
  color: #8995a6;
  font-size: 12px;
}

#addProduct .preview,
#modalEditProduct .preview {
  width: 104px;
  height: 104px;
  margin-top: 5px;
  border: 1px solid #d7dfe9;
  border-radius: 7px;
  background: #fff;
  object-fit: contain;
}

#addProduct .modal-footer,
#modalEditProduct .modal-footer,
#modalViewProduct .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  min-height: 67px;
  padding: 14px 20px;
  border-top: 1px solid #e1e7ef;
  background: #fff;
}

#addProduct .modal-footer .btn,
#modalEditProduct .modal-footer .btn,
#modalViewProduct .modal-footer .btn {
  float: none !important;
  min-width: 112px;
  height: 39px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
}

#modalViewProduct .product-details-dialog {
  width: 690px;
  max-width: calc(100% - 30px);
  margin: 45px auto;
}

.product-details-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
}

.product-details-visual {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border: 1px solid #e1e7ef;
  border-radius: 9px;
  background: #fff;
}

.product-details-visual img {
  width: 135px;
  height: 135px;
  object-fit: contain;
}

.product-details-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 29px;
  margin-top: 15px;
  padding: 5px 12px;
  border-radius: 15px;
  background: #ddf6e8;
  color: #128a51;
  font-size: 11px;
  font-weight: 700;
}

.product-details-status.is-low {
  background: #ffe8dc;
  color: #d86427;
}

.product-details-status.is-empty {
  background: #ffe3e3;
  color: #c93e45;
}

.product-details-content {
  min-width: 0;
}

.product-details-category {
  display: inline-flex;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 13px;
  background: #e8f5fc;
  color: #1684c2;
  font-size: 11px;
  font-weight: 700;
}

.product-details-content h3 {
  margin: 10px 0 17px;
  color: #172840;
  font-size: 22px;
  font-weight: 700;
}

.product-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.product-details-grid > div {
  display: flex;
  flex-direction: column;
  min-height: 67px;
  padding: 11px 12px;
  border: 1px solid #e2e8ef;
  border-radius: 6px;
  background: #fff;
}

.product-details-grid > div.is-wide {
  grid-column: 1 / -1;
}

.product-details-grid small {
  color: #8491a3;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .25px;
  text-transform: uppercase;
}

.product-details-grid strong {
  overflow: hidden;
  margin-top: 6px;
  color: #293a52;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dashboard-dark.modern-products-page .products-page-wrapper {
  background: #111b2b;
}

body.dashboard-dark.modern-products-page .products-page-heading h1,
body.dashboard-dark.modern-products-page .products-catalog-header h2,
body.dashboard-dark.modern-products-page .product-summary-copy strong {
  color: #edf3fb;
}

body.dashboard-dark.modern-products-page .products-summary-grid,
body.dashboard-dark.modern-products-page .product-summary-card,
body.dashboard-dark.modern-products-page .products-catalog-panel,
body.dashboard-dark.modern-products-page .products-catalog-header,
body.dashboard-dark.modern-products-page .products-inventory-value,
body.dashboard-dark.modern-products-page .product-stock-filter,
body.dashboard-dark.modern-products-page .products-modern-table,
body.dashboard-dark.modern-products-page .products-modern-table > tbody > tr > td {
  border-color: #2b3c52;
  background: #172438;
  color: #dce6f2;
}

body.dashboard-dark.modern-products-page .products-modern-table > thead > tr > th,
body.dashboard-dark.modern-products-page .products-modern-table.table-striped > tbody > tr:nth-of-type(odd) {
  border-color: #2b3c52 !important;
  background: #132034;
  color: #bac7d7;
}

body.dashboard-dark.modern-products-page .products-modern-table > tbody > tr:hover {
  background: #1b2b41 !important;
}

body.dashboard-dark.modern-products-page .products-catalog-icon,
body.dashboard-dark.modern-products-page .products-inventory-icon {
  background: #213a54;
  color: #6fc3f0;
}

@media (max-width: 1199px) {
  .products-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .products-page-heading {
    display: block;
    padding: 18px 12px 12px;
  }

  .products-page-heading .breadcrumb {
    margin-top: 10px;
  }

  .products-page-content {
    padding: 0 10px;
  }

  .products-page-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .products-page-actions .btn {
    width: 100%;
  }

  .products-summary-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .product-summary-card {
    min-height: 82px;
  }

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

  .products-inventory-value {
    width: 100%;
  }

  .products-stock-filters {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .product-stock-filter {
    flex: 0 0 auto;
  }

  .products-page-wrapper .dataTables_wrapper > .row:first-child {
    display: block;
  }

  .products-page-wrapper .dataTables_filter,
  .products-page-wrapper .dataTables_length {
    margin-bottom: 8px;
    text-align: left;
  }

  .products-page-wrapper .dataTables_filter input {
    width: calc(100% - 65px);
  }

  #addProduct .modal-dialog,
  #modalEditProduct .modal-dialog {
    width: auto;
    margin: 12px;
  }

  #modalViewProduct .product-details-dialog {
    width: auto;
    margin: 12px;
  }

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

  .product-details-visual img {
    width: 105px;
    height: 105px;
  }
}
