:root {
  --app-sidebar-width: 17rem;
  --app-header-height: 4rem;
  --app-bg: #f4f6f9;
  --app-sidebar-bg: #17212b;
  --theme-primary: #198754;
  --theme-primary-rgb: 25, 135, 84;
  --theme-primary-dark: #146c43;
  --theme-contrast: #fff;
}

:root[data-theme="skin-blue"] { --theme-primary: #3c8dbc; --theme-primary-rgb: 60, 141, 188; --theme-primary-dark: #307095; --theme-contrast: #fff; }
:root[data-theme="skin-green"] { --theme-primary: #198754; --theme-primary-rgb: 25, 135, 84; --theme-primary-dark: #146c43; --theme-contrast: #fff; }
:root[data-theme="skin-purple"] { --theme-primary: #605ca8; --theme-primary-rgb: 96, 92, 168; --theme-primary-dark: #4d4986; --theme-contrast: #fff; }
:root[data-theme="skin-red"] { --theme-primary: #dd4b39; --theme-primary-rgb: 221, 75, 57; --theme-primary-dark: #b83d2e; --theme-contrast: #fff; }
:root[data-theme="skin-yellow"] { --theme-primary: #f39c12; --theme-primary-rgb: 243, 156, 18; --theme-primary-dark: #c87f0a; --theme-contrast: #212529; }
:root[data-theme="skin-black"] { --theme-primary: #212529; --theme-primary-rgb: 33, 37, 41; --theme-primary-dark: #111315; --theme-contrast: #fff; }

html,
body {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--app-bg);
  color: #27313a;
}

.app-navbar {
  background-color: var(--theme-primary);
  color: var(--theme-contrast);
  transition: background-color .2s ease;
}

.app-navbar .navbar-brand,
.app-navbar .navbar-brand:hover {
  color: var(--theme-contrast);
}

.app-navbar-button {
  color: var(--theme-contrast);
  background: transparent;
}

.app-navbar-button:hover,
.app-navbar-button:focus,
.app-navbar-button.show {
  color: var(--theme-contrast);
  background: rgba(255, 255, 255, .14);
}

.theme-menu { min-width: 13rem; }
.theme-option { display: flex; align-items: center; gap: .65rem; }
.theme-option .bi-check-lg { visibility: hidden; }
.theme-option.active .bi-check-lg { visibility: visible; }
.theme-swatch { width: .85rem; height: .85rem; flex: 0 0 .85rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.theme-swatch-blue { background: #3c8dbc; }
.theme-swatch-green { background: #198754; }
.theme-swatch-purple { background: #605ca8; }
.theme-swatch-red { background: #dd4b39; }
.theme-swatch-yellow { background: #f39c12; }
.theme-swatch-black { background: #212529; }

.app-shell {
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--app-sidebar-width) minmax(0, 1fr);
  grid-template-rows: var(--app-header-height) minmax(calc(100vh - var(--app-header-height)), auto) auto;
  grid-template-areas:
    "header header"
    "sidebar main"
    "sidebar footer";
  transition: grid-template-columns .2s ease;
}

.app-header {
  grid-area: header;
  position: sticky;
  top: 0;
  z-index: 1040;
}

.app-sidebar {
  grid-area: sidebar;
  width: var(--app-sidebar-width) !important;
  --bs-offcanvas-bg: var(--app-sidebar-bg);
  background-color: var(--app-sidebar-bg) !important;
  color: #fff;
  overflow: hidden;
  transition: width .2s ease, opacity .15s ease;
}

.app-main {
  grid-area: main;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.app-footer {
  grid-area: footer;
}

.page-header {
  padding: 1.5rem 1.5rem 0;
}

.page-content {
  padding: 1.5rem;
  min-width: 0;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 2vw, 2.25rem);
}

.page-header h1 small {
  font-size: .9rem;
  color: var(--bs-secondary-color);
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar-profile {
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.sidebar-nav .nav-link,
.sidebar-nav .sidebar-toggle {
  color: rgba(255, 255, 255, .76);
  border-radius: .5rem;
  padding: .65rem .75rem;
  text-decoration: none;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .sidebar-toggle:hover,
.sidebar-nav .nav-link.active,
.sidebar-nav .sidebar-toggle.active {
  color: #fff;
  background: rgba(var(--theme-primary-rgb), .84);
}

.sidebar-submenu {
  padding-left: 1rem;
}

.sidebar-toggle .bi-chevron-down {
  transition: transform .2s ease;
}

.sidebar-toggle[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}

.card {
  border: 0;
  box-shadow: 0 .125rem .5rem rgba(20, 35, 50, .08);
}

.card-header,
.card-footer {
  background: #fff;
}

.info-card {
  color: #fff;
  overflow: hidden;
}

.info-card .info-icon {
  width: 4.5rem;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .12);
  font-size: 2rem;
}

.table > :not(caption) > * > * {
  vertical-align: middle;
}

.table-responsive {
  max-width: 100%;
}

.select2-container {
  width: 100% !important;
}

.select2-container .select2-selection--single {
  min-height: 38px;
  padding-top: 4px;
  border-color: #dee2e6;
}

.form-horizontal .form-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-right: -.75rem;
  margin-left: -.75rem;
  margin-bottom: 1rem;
}

.form-horizontal .form-group > [class*="col-"] {
  padding-right: .75rem;
  padding-left: .75rem;
}

.control-label {
  margin-bottom: .35rem;
}

.card-box {
  padding: 1rem;
  background: #fff;
  border-radius: .5rem;
  box-shadow: 0 .125rem .5rem rgba(20, 35, 50, .08);
}

.products-list { list-style: none; margin: 0; padding: 0; }
.products-list .item { display: flex; align-items: center; gap: .85rem; padding: .75rem 0; border-bottom: 1px solid var(--bs-border-color); }
.products-list .item:last-child { border-bottom: 0; }
.product-img { width: 3.25rem; height: 3.25rem; flex: 0 0 3.25rem; }
.product-img img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: .5rem; border: 1px solid var(--bs-border-color); }
.product-info { min-width: 0; flex: 1; }
.product-title { display: block; color: var(--bs-body-color); font-weight: 600; text-decoration: none; }

.dropdown-menu > li > a {
  display: block;
  padding: .45rem 1rem;
  color: var(--bs-dropdown-link-color);
  text-decoration: none;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li.active > a {
  color: var(--bs-dropdown-link-hover-color);
  background: var(--bs-dropdown-link-hover-bg);
}

.dropdown-menu > li.active > a,
.dropdown-menu > li > a.active {
  color: var(--bs-dropdown-link-active-color);
  background: var(--bs-dropdown-link-active-bg);
}

@media (min-width: 992px) {
  .app-shell.sidebar-collapsed {
    grid-template-columns: 0 minmax(0, 1fr);
  }

  .app-shell.sidebar-collapsed .app-sidebar {
    width: 0 !important;
    opacity: 0;
    pointer-events: none;
  }
}

.modal-header .modal-title {
  order: 1;
}

.modal-header .btn-close {
  order: 2;
  margin-left: auto;
}

.info-box {
  display: flex;
  min-height: 6.5rem;
  margin-bottom: 1rem;
  color: #fff;
  border-radius: .5rem;
  overflow: hidden;
  box-shadow: 0 .125rem .5rem rgba(20, 35, 50, .08);
}

.info-box-icon {
  width: 4.5rem;
  flex: 0 0 4.5rem;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .12);
  font-size: 1.75rem;
}

.info-box-content {
  flex: 1;
  padding: .75rem 1rem;
}

.info-box-text,
.info-box-number,
.progress-description {
  display: block;
}

.info-box-number {
  font-size: 1.35rem;
  font-weight: 700;
}

.info-box .progress {
  height: .25rem;
  margin: .45rem 0;
  background: rgba(255, 255, 255, .3);
}

.info-box .progress-bar {
  background: rgba(255, 255, 255, .75);
}

.bg-purple { background-color: #6f42c1 !important; }
.bg-green { background-color: #198754 !important; }
.bg-yellow { background-color: #f0ad4e !important; }
.bg-aqua { background-color: #0dcaf0 !important; }

.ajax-alert { display: flex; align-items: flex-start; gap: .75rem; border: 0; border-left: .3rem solid currentColor; box-shadow: 0 .25rem 1rem rgba(20, 35, 50, .1); }
.ajax-alert > .bi { margin-top: .1rem; font-size: 1.15rem; }

.report-filters > [class*="col-"] { display: flex; align-items: end; }
.report-filters .input-group, .report-filters .select2-container { flex: 1 1 auto; }
.report-actions { width: 100%; display: flex; justify-content: flex-end; gap: .5rem; }

.pos-page { min-height: 100vh; background: #eef2f6; }
.pos-shell { width: 100%; max-width: none; padding: 1rem; }
.pos-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: .8rem 1rem; background: #17212b; color: #fff; border-radius: .75rem; }
.pos-panel { height: calc(100vh - 6.5rem); min-height: 38rem; display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: .75rem; box-shadow: 0 .25rem 1rem rgba(20, 35, 50, .1); }
.pos-panel-header { padding: 1rem; border-bottom: 1px solid var(--bs-border-color); }
.pos-panel-body { min-height: 0; flex: 1; padding: 1rem; overflow: auto; }
.pos-cart #cartTable { display: table !important; width: 100%; height: auto !important; overflow: visible !important; }
.pos-cart .table-responsive { max-height: 15rem; overflow-y: auto; }
.pos-cart #cartTable th { padding: .45rem .35rem; font-size: .7rem; white-space: nowrap; color: var(--bs-secondary-color); }
.pos-cart #cartTable th h5 { margin: 0; font-size: inherit; font-weight: 700; }
.pos-cart #cartTable td { padding: .4rem .35rem; font-size: .8rem; }
.pos-cart #cartTable td:nth-child(2) { min-width: 8rem; max-width: 12rem; white-space: normal; }
.pos-cart #cartTable .form-control { width: 4rem !important; min-width: 4rem; }
.pos-cart #cartTable .btn { padding: .2rem .4rem; }
.pos-products-grid { align-content: flex-start; overflow-y: auto !important; overflow-x: hidden !important; }
.pos-product-card { height: 100%; padding: .8rem; border: 1px solid var(--bs-border-color); border-radius: .65rem; background: #fff; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.pos-product-card:hover { transform: translateY(-2px); border-color: var(--theme-primary); box-shadow: 0 .4rem 1rem rgba(20, 35, 50, .12); }
.pos-product-card img { width: 5rem; height: 5rem; object-fit: cover; border-radius: .5rem; }
.pos-summary { padding-top: .75rem; border-top: 1px solid var(--bs-border-color); }

.contact-form-single .nav-tabs { display: none; }
.contact-form-single .tab-content { display: flex; flex-direction: column; gap: .75rem; }
.contact-form-single .tab-pane { display: contents !important; opacity: 1 !important; }
.contact-form-single .tab-pane > .row { order: 1; }
.contact-form-single .tab-pane > .contact-section-title,
.contact-form-single .tab-pane[id^="settings"] > .row { order: 2; }
.contact-form-single .tab-pane > .contact-section { order: 3; }
.contact-section-title { margin: .75rem 0 0; padding-bottom: .45rem; border-bottom: 1px solid var(--bs-border-color); font-size: 1rem; font-weight: 700; }
.contact-form-single .row { row-gap: .75rem; }

.login-page {
  --login-primary: #269bd8;
  --login-primary-rgb: 38, 155, 216;
  --login-primary-dark: #167fb8;
  min-height: 100vh;
  margin: 0;
  padding: clamp(.75rem, 2vw, 1.5rem);
  display: grid;
  place-items: center;
  color: #17212b;
  background:
    radial-gradient(circle at 10% 10%, rgba(var(--login-primary-rgb), .15), transparent 28rem),
    #f2f8fc;
}

.login-shell {
  width: min(100%, 70rem);
  min-height: min(44rem, calc(100vh - 3rem));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(24rem, .92fr);
  overflow: hidden;
  border: 1px solid rgba(23, 33, 43, .08);
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0 1.5rem 4rem rgba(23, 33, 43, .12);
}

.login-visual {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  padding: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  color: #fff;
  background: #123b57 url("../../img/login_bg.jpeg") center / cover no-repeat;
}

.login-visual::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(150deg, rgba(7, 48, 76, .94) 5%, rgba(18, 126, 184, .8) 58%, rgba(17, 99, 143, .58)),
    linear-gradient(to top, rgba(4, 31, 49, .82), transparent 55%);
}

.login-visual-content {
  max-width: 31rem;
  margin-top: auto;
  margin-bottom: auto;
}

.login-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.25rem;
  padding: .5rem .8rem;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .03em;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(.5rem);
}

.login-visual h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.045em;
}

.login-visual-content p {
  max-width: 28rem;
  margin: 0;
  color: rgba(255, 255, 255, .8);
  font-size: 1.05rem;
  line-height: 1.7;
}

.login-visual-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  color: rgba(255, 255, 255, .72);
  font-size: .82rem;
}

.login-visual-footer span {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.login-form-panel {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 5vw, 4.5rem);
}

.login-form-wrap {
  width: min(100%, 23.5rem);
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: clamp(3rem, 7vh, 5.5rem);
  color: #17212b;
  font-size: 1.15rem;
  text-decoration: none;
}

.login-brand:hover {
  color: #17212b;
}

.login-brand-icon {
  width: 2.65rem;
  height: 2.65rem;
  display: grid;
  place-items: center;
  border-radius: .8rem;
  color: #fff;
  background: var(--login-primary);
  box-shadow: 0 .5rem 1.2rem rgba(var(--login-primary-rgb), .24);
}

.login-heading {
  margin-bottom: 2rem;
}

.login-heading h2 {
  margin: 0 0 .55rem;
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -.035em;
}

.login-heading p {
  margin: 0;
  color: #6c757d;
}

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  border: 0;
  border-radius: .85rem;
  font-size: .88rem;
}

.login-alert.alert-success {
  color: #125f89;
  background: rgba(var(--login-primary-rgb), .13);
}

.login-form {
  display: grid;
  gap: 1.25rem;
}

.login-form .form-label {
  margin-bottom: .5rem;
  font-size: .86rem;
  font-weight: 600;
  color: #344054;
}

.login-control {
  position: relative;
}

.login-control > .bi:first-child {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 1rem;
  color: #8b959f;
  transform: translateY(-50%);
  pointer-events: none;
}

.login-control .form-control {
  min-height: 3.25rem;
  padding: .75rem 3rem;
  border-color: #dce2e0;
  border-radius: .8rem;
  background: #fbfcfc;
  box-shadow: none;
}

.login-control .form-control:focus {
  border-color: var(--login-primary);
  background: #fff;
  box-shadow: 0 0 0 .22rem rgba(var(--login-primary-rgb), .12);
}

.login-password-toggle {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: .65rem;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: 0;
  border-radius: .6rem;
  color: #7b858e;
  background: transparent;
  transform: translateY(-50%);
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
  color: var(--login-primary-dark);
  background: rgba(var(--login-primary-rgb), .1);
}

.login-submit {
  min-height: 3.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-top: .4rem;
  border: 0;
  border-radius: .8rem;
  color: #fff;
  font-weight: 600;
  background: var(--login-primary);
  box-shadow: 0 .65rem 1.35rem rgba(var(--login-primary-rgb), .22);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.login-submit:hover,
.login-submit:focus-visible {
  color: #fff;
  background: var(--login-primary-dark);
  filter: brightness(.94);
  transform: translateY(-1px);
  box-shadow: 0 .85rem 1.6rem rgba(var(--login-primary-rgb), .28);
}

.login-footer {
  margin: clamp(2.5rem, 7vh, 5rem) 0 0;
  color: #98a09f;
  font-size: .76rem;
  text-align: center;
}

@media (max-width: 767.98px) {
  .login-page {
    padding: 0;
    background: #fff;
  }

  .login-shell {
    width: 100%;
    min-height: 100vh;
    display: block;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-visual {
    display: none;
  }

  .login-form-panel {
    min-height: 100vh;
    padding: 2rem 1.35rem;
  }

  .login-brand {
    margin-bottom: clamp(3.5rem, 12vh, 7rem);
  }

  .login-footer {
    margin-top: 3rem;
  }
}

@media (max-width: 991.98px) {
  .app-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "header"
      "main"
      "footer";
  }

  .app-sidebar {
    grid-area: unset;
  }

  .page-header,
  .page-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .report-filters { row-gap: .75rem; }
  .report-actions { justify-content: stretch; }
  .report-actions .btn { flex: 1; }
  .pos-panel { height: auto; min-height: 32rem; }
  .pos-topbar { align-items: flex-start; flex-wrap: wrap; }
  .pos-topbar .btn { width: 100%; }
}
