:root {
  --lh-blue: #17324d;
  --lh-wine: #a23444;
  --lh-gold: #c8a86b;
  --lh-green: #00a884;
  --lh-ink: #182433;
  --lh-line: #dce3ea;
}

body {
  background: #f5f7fb;
}

.top-main {
  background: #fff;
  border-bottom: 1px solid var(--lh-line);
  min-height: 56px;
}

.nav-main .navbar {
  background: #fff;
  border-bottom: 1px solid var(--lh-line);
  min-height: 54px;
}

.nav-main .navbar-nav {
  gap: 2px;
}

.nav-main .nav-link {
  border-radius: 6px;
}

.nav-main .nav-item.active > .nav-link,
.nav-main .dropdown-item.active {
  color: var(--lh-green);
}

.page-wrapper > .page-header {
  background: #f5f7fb;
  margin: 0;
  padding: 16px 0 10px;
}

.page-body {
  padding-top: 12px;
}

.container-fluid {
  max-width: none;
}

.navbar-brand a {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--lh-green);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.brand-mark-lg {
  font-size: 24px;
  height: 64px;
  width: 64px;
}

.brand-text {
  color: var(--lh-ink);
  font-weight: 700;
}

.card {
  border-radius: 8px;
}

.kpi-card .avatar {
  height: 44px;
  width: 44px;
}

.section-tile,
.quick-action-card,
.module-card {
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.section-tile:hover,
.quick-action-card:hover,
.module-card:hover {
  border-color: rgba(23, 50, 77, .22);
  box-shadow: 0 10px 24px rgba(23, 50, 77, .08);
  transform: translateY(-1px);
}

.section-tile .avatar,
.quick-action-card .avatar,
.module-card .avatar {
  height: 42px;
  width: 42px;
}

.quick-action-card .avatar {
  height: 48px;
  width: 48px;
}

.quick-action-card .h2 {
  font-size: 1.18rem;
  line-height: 1.25;
}

.section-tile .display-6 {
  font-size: 1.45rem;
}

.page-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.filter-card .card-body {
  padding: 12px;
}

.wide-table {
  overflow-x: auto;
}

.wide-table table {
  min-width: 1100px;
}

.daily-sales-table table {
  min-width: 1560px;
}

.ledger-table table {
  min-width: 980px;
}

.report-table table {
  min-width: 1120px;
}

.responsive-card-table th,
.responsive-card-table td {
  vertical-align: top;
}

@media (min-width: 768px) {
  .wide-table .responsive-card-table th:first-child,
  .wide-table .responsive-card-table td:first-child {
    background: #fff;
    box-shadow: 8px 0 12px -14px rgba(15, 23, 42, .45);
    left: 0;
    position: sticky;
    z-index: 2;
  }

  .wide-table .responsive-card-table thead th:first-child {
    z-index: 4;
  }

  .wide-table .responsive-card-table .table-actions-cell,
  .wide-table .responsive-card-table thead th:last-child {
    background: #fff;
    box-shadow: -8px 0 12px -14px rgba(15, 23, 42, .45);
    position: sticky;
    right: 0;
    z-index: 3;
  }
}

.inline-control {
  min-width: 86px;
}

.inline-edit {
  min-height: 32px;
  min-width: 86px;
}

.inline-edit-display {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: inherit;
  cursor: text;
  display: block;
  min-height: 30px;
  min-width: 86px;
  padding: 5px 7px;
  text-align: left;
  width: 100%;
}

.inline-edit-display:hover,
.inline-edit-display:focus {
  background: #f8fafc;
  border-color: #cbd5e1;
  outline: 0;
}

.inline-control[type="date"] {
  min-width: 136px;
}

.inline-control.is-saving {
  border-color: #f59f00;
  box-shadow: 0 0 0 .1rem rgba(245, 159, 0, .18);
}

.modal-xl {
  max-width: min(1180px, calc(100vw - 32px));
}

.btn-icon {
  height: 32px;
  width: 32px;
}

.auth-page {
  background:
    linear-gradient(180deg, rgba(23, 50, 77, .96), rgba(23, 50, 77, .88)),
    url("https://images.unsplash.com/photo-1526628953301-3e589a6a8b74?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.auth-page .h2 {
  color: #fff;
}

.pin-login-card .form-label {
  font-weight: 700;
}

.pin-display {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--lh-line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: center;
  min-height: 54px;
  padding: 12px;
}

.pin-display span {
  background: #cbd5e1;
  border-radius: 999px;
  display: block;
  height: 12px;
  width: 12px;
}

.pin-display span.active {
  background: var(--lh-green);
}

.pin-keypad {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pin-key {
  font-size: 1.2rem;
  font-weight: 700;
  height: 52px;
}

@media (max-width: 767px) {
  .page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header .btn-list {
    width: 100%;
  }

  .page-header .btn-list .btn {
    flex: 1 1 auto;
  }

  .quick-action-card .h2 {
    font-size: 1.08rem;
  }

}

@media (max-width: 1399px) {
  .page-wrapper > .page-header {
    padding-top: 12px;
  }

  .wide-table table {
    min-width: 960px;
  }

  .daily-sales-table table {
    min-width: 1240px;
  }

  .ledger-table table {
    min-width: 860px;
  }

  .report-table table {
    min-width: 920px;
  }

  .responsive-card-table th,
  .responsive-card-table td {
    font-size: .8125rem;
    padding: .5rem .55rem;
  }

  .inline-edit,
  .inline-edit-display,
  .inline-control {
    min-width: 68px;
  }
}

@media (max-width: 767px) {
  .page-wrapper > .page-header {
    padding: 10px 0 8px;
  }

  .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }

  .page-title {
    font-size: 1.15rem;
    line-height: 1.25;
  }

  .page-actions .btn-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .page-actions .btn-list .btn {
    flex: 1 1 calc(50% - 8px);
    min-width: 132px;
  }

  .wide-table {
    overflow-x: visible;
  }

  .wide-table table,
  .daily-sales-table table,
  .ledger-table table,
  .report-table table {
    min-width: 0 !important;
  }

  .responsive-card-table,
  .responsive-card-table thead,
  .responsive-card-table tbody,
  .responsive-card-table tr,
  .responsive-card-table td {
    display: block;
    width: 100%;
  }

  .responsive-card-table thead {
    display: none;
  }

  .responsive-card-table tbody tr {
    background: #fff;
    border: 1px solid var(--lh-line);
    border-radius: 8px;
    margin: 0 0 10px;
    padding: 8px 0;
  }

  .responsive-card-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .responsive-card-table tbody td {
    align-items: start;
    border: 0;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(96px, 42%) minmax(0, 1fr);
    padding: 6px 12px;
    white-space: normal;
  }

  .responsive-card-table tbody td::before {
    color: #64748b;
    content: attr(data-label);
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.35;
  }

  .responsive-card-table tbody td[colspan] {
    display: block;
    text-align: center;
  }

  .responsive-card-table tbody td[colspan]::before {
    display: none;
  }

  .responsive-card-table tbody td.text-end {
    text-align: left !important;
  }

  .responsive-card-table .badge {
    justify-self: start;
  }

  .table-actions-cell .btn-list {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .inline-edit,
  .inline-edit-display,
  .inline-control {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .inline-edit-display {
    padding-left: 0;
  }

  .modal-xl {
    max-width: calc(100vw - 16px);
  }
}
