body.kasir-page {
  height: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
}

body.kasir-page .wrapper {
  min-height: 0 !important;
  height: 100vh !important;
  overflow: hidden !important;
}

body.kasir-page .content-wrapper {
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

body {
  background-color: #f9fafb;
  font-family: "Inter", sans-serif;
}

.content-kasir {
  height: 100%;
  display: grid;
  grid-template-columns: 7fr 5fr;   /* left / right */
  gap: 1rem;
  background-color: #232244;
}

.sidebar-mini .main-sidebar {
  width: 80px !important;
  overflow: visible !important;
}

.sidebar {
  overflow: hidden;
  padding: 0;
  width: 80px;
}

.brand-link {
  width: 80px !important;
} 

.nav-main {
  position: relative;
  width: 80px !important;
  height: 100%;
  padding: 8px;
}

.nav-item {
  width: 100% !important;
  position: relative;
}

.nav-sidebar .nav-link {
  color: #6c757d;
  border-radius: 10px;
  width: 100% !important;
}

.nav-sidebar .nav-link.active,
.nav-sidebar .nav-link:hover {
  background-color: #f1f1f1;
  color: #0d6efd;
}

.submenu {
    /* position: absolute; */
    /* top: 0;
    left: 65px;  */
    /* push submenu outside the sidebar */
    background: #e5e5e5;
    border-radius: 12px;
    padding: 10px 0;
    width: 65px;
    display: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    z-index: 9999;
}

.submenu.show {
    display: block;
}

.submenu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.submenu ul li a {
    padding: 8px 15px;
    color: #6c757d;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submenu ul li a:hover {
  background-color: #e5e5e5;
  color: #000;
}

.card {
  border-radius: 1rem !important;
}

.product-card img {
  height: 160px;
  object-fit: cover;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

.product-card:hover {
  transform: translateY(-3px);
  transition: all 0.2s;
}

.btn-outline-primary.active {
  background-color: #0d6efd;
  color: #fff;
}

.sticky-lg-top {
  position: sticky;
}

.content-wrapper {
  margin-left: 80px !important;
  height: 100dvh !important;
}

/* .bg-coffee-blue {
  background-color: #2c294b;
} */

/* Header bar */
.header-bar {
  background-color: #232244;
}

/* Search box */
.search-box {
  background-color: #2f2e5e;
  border-radius: 12px;
  height: 42px;
  min-width: 230px;
  color: #c3c3d1;
  display: flex;
  align-items: center;
  padding: 0 14px;
  /* margin-left: 75px;  */
  /* spacing after search box */
}
.search-box i {
  font-size: 1rem;
  color: #c3c3d1;
  margin-right: 8px;
}
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  color: #fff;
  font-size: 0.95rem;
  flex: 1;
}
.search-box input::placeholder {
  color: #aaa9c4;
}

/* Icon buttons */
.icon-btn {
  background-color: #2f2e5e;
  color: #c3c3d1;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: 0.2s ease;
  margin-right: 8px; /* spacing between icons */
}
.icon-btn:last-of-type {
  margin-right: 20px; /* extra gap before the blue button */
}
.icon-btn:hover {
  background-color: #3a3972;
  color: #fff;
}
.icon-btn .dot {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 8px;
  height: 8px;
  background-color: #38d878;
  border-radius: 50%;
}

/* "New Goal" button */
.header-bar .btn-primary {
  background-color: #2176ff;
  border: none;
  font-size: 0.95rem;
  height: 42px;
  border-radius: 12px;
  transition: 0.2s ease;
  padding: 0 20px;
}
.header-bar .btn-primary:hover {
  background-color: #1b60d4;
}

.header-bar .btn-warning {
  border: none;
  font-size: 0.95rem;
  height: 42px;
  border-radius: 12px;
  transition: 0.2s ease;
  padding: 0 20px;
}

.header-bar-kasir .btn-primary {
  background-color: #2176ff;
  border: none;
  font-size: 0.95rem;
  height: 42px;
  border-radius: 12px;
  transition: 0.2s ease;
  padding: 0 20px;
}
.header-bar-kasir .btn-primary:hover {
  background-color: #1b60d4;
}

.header-bar-kasir .btn-warning {
  border: none;
  font-size: 0.95rem;
  height: 42px;
  border-radius: 12px;
  transition: 0.2s ease;
  padding: 0 20px;
}

.darkblue-bg {
  background-color: #232244;
  height: 150px;
}

.darkblue-bg-kasir {
  background-color: #232244;
  height: 115px;
}

.container-fluid {
  margin-top: -140px;
}

.item-card {
  padding: 10px !important;
}

.prod-container {
  height: calc(100vh - 165px);
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #f9f9f9;
  border-radius: 15px;
  padding: 10px;
}

.category-container {
  display: flex;
  flex-wrap: nowrap;
  overflow: auto;
  justify-content: flex-start;
  gap: 5px;
  margin-bottom: 8px;
}

.category-card {
  flex: 0 1 80px;
  margin-top: 5px;
  margin-bottom: 5px;
  text-align: center;
  border: 2px solid transparent;
  border-radius: 15px;
  padding: 5px;
  background: #fff;
  transition: all 0.25s ease;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-card.active {
  border-color: #0d6efd;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
}

.category-card img {
  width: 30px; 
  height: 30px;
}

.category-icon {
  font-size: 48px;
  margin-bottom: 0.5rem;
  color: #0d6efd;
}

.category-name {
  margin-top:5px;
  font-weight: 600;
  color: #212529;
  font-size: 14px;
}

.category-info {
  width: 80px;
  color: #6c757d;
  font-size: 12px;
}

.category-info-long {
  width: 130px;
  color: #6c757d;
  font-size: 12px;
}

.category-info-xl {
  width: 170px;
  color: #6c757d;
  font-size: 12px;
}

.add-to-order {
  width: 100% !important;
}

/* --- Responsive Layout Fixes --- */

/* General body and wrapper adjustments */
@media (max-width: 992px) {
  .content-wrapper {
    margin-left: 0 !important;
  }

  .main-sidebar {
    overflow: visible !important;
    position: fixed;
    z-index: 1050;
    height: 100%;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .main-sidebar.active {
    transform: translateX(0);
  }

  .mobile-nav { display:flex !important; justify-content:space-between; align-items:center; background:#fff; padding:10px 15px; border-bottom:1px solid #e6e6e6; position:sticky; top:0; z-index:1050; }
}

/* Header responsiveness */
@media (max-width: 768px) {
  .header-bar {
    flex-direction: column;
    align-items: flex-start !important;
    padding: 1rem;
    gap: 0.75rem;
  }

  .header-bar h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }

  .search-box {
    width: 100%;
    /* margin-right: 16px; */
  }

  .header-bar .d-flex.align-items-center {
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
  }

  .icon-btn {
    margin-right: 8px;
  }

  .header-bar .btn-primary {
    width: 100%;
    margin-top: 0.5rem;
  }

  .header-bar .btn-warning {
    width: 100%;
    margin-top: 0.5rem;
  }
}

/* Product grid and order layout */
@media (max-width: 992px) {
  .row > .col-lg-8,
  .row > .col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .sticky-lg-top {
    position: relative;
    top: 0;
  }

  .card.p-3 {
    margin-top: 1rem;
  }
}

/* Category cards */
@media (max-width: 768px) {
  .category-container {
    justify-content: center;
    gap: 1rem;
  }

  .category-card {
    flex: 0 1 45%;
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .category-card {
    flex: 0 1 100%;
  }

  .category-icon {
    font-size: 36px;
  }

  .category-name {
    margin-top: 5px;
    font-size: 1rem;
  }

  .category-info {
    font-size: 0.85rem;
  }
}

/* Product cards */
@media (max-width: 768px) {
  .product-card img {
    height: 140px;
  }
}

/* Adjust footer on mobile */
@media (max-width: 576px) {
  footer {
    font-size: 0.8rem;
    padding: 1rem;
  }
}

@media (min-width: 992px) { .mobile-nav { display:none !important; } }

#paymentMethodGroup .btn {
  flex: 1 1 auto; 
}
#paymentMethodGroup .btn.active {
  background-color: #0d6efd;
  color: white;
}

#jenisTransaksiGroup .btn {
  font-size: 18px;
  font-weight: bold;
  flex: 1 1 auto; 
}
#jenisTransaksiGroup .btn.active {
  background-color: #0d6efd;
  color: white;
}

/* Smooth fade transition */
.product-wrapper {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Phase 1: fade-out animation */
.product-hide {
  opacity: 0 !important;
  transform: scale(0.92) !important;
}

.member-dropdown {
    position: absolute;
    top: 92px; /* appears right below icon */
    right: 178px;
    background: #2f2e5e;
    color: #c3c3d1;
    border-radius: 8px;
    padding: 10px 0;
    width: 300px;
    display: none; /* hidden by default */
    z-index: 9999; /* on top of everything */
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity .2s ease, transform .2s ease;
}

.setting-dropdown {
    position: absolute;
    top: 59px; /* appears right below icon */
    left: 230px;
    background: #2f2e5e;
    color: #c3c3d1;
    border-radius: 8px;
    padding: 10px 0;
    width: 200px;
    display: none; /* hidden by default */
    z-index: 9999; /* on top of everything */
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity .2s ease, transform .2s ease;
}

.setting-separator {
  font-size: 11px;
  padding: 5px 10px;
  background-color: #232244;
}

.member-dropdown.show, .setting-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.member-item, .setting-item {
    padding: 8px 15px;
    cursor: pointer;
}

.member-item:hover, .setting-item:hover {
    background: #3a3972;
    color: #fff;
}

.member-item.selected, .setting-item.selected  {
    background: #007bff;
    color: white;
}

.member-search input {
    font-size: 0.9rem;
}

.shift-info {
  height: 42px;
  display: inline-block;
  border-radius: 12px;
}

.order-grouping {
  border: 1px dotted #ccc;
  padding: 20px 15px 5px 15px;
  margin-bottom: 10px;
  background-color: #f9faf9;
}

.stock-list {
  list-style: none;
  margin-bottom: 0 !important;
  padding-left: 0 !important;
}

.stock-item {
  margin: 0;
  padding: 5px;
}

.bg-customwhite{
  background-color: #e3e5e3;
}

.bg-customred{
  background-color: #f3aeae;
}

.modeContainer {
  background-color: #f9f9f9;
  padding: 10px;
  border: 1px solid #ccc;
}

.nama-menu{
  height: 52px;
}

.btn-mode {
  padding: 9.5px 14px;
}

.item-note[readonly] {
  background-color: #f8f9fa;
  cursor: not-allowed;
}

.kasir-left-column {
  display: grid;
  grid-template-rows: 50px 95px 1fr; /* header, categories, products */
  height: 100%;
}

.kasir-right-column {
  display: grid;
  grid-template-rows: 45px 1fr;
  height: 100%;
}

.kasir-right-column > .btn-group {
  align-self: start;
  justify-self: start;
}

#jenisTransaksiGroup {
  width: fit-content;
}

.card-kasir {
  height: calc(100vh - 65px);
  overflow: hidden;
}

/* form fills card */
body.kasir-page #posForm {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr 110px 50px;
}

.expand {
  grid-template-rows: 1fr 170px 50px !important;
}

/* scrollable middle */
.form-scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.member-chip {
  display: flex;
  background-color: #e9f9f0;
  border: 1px solid #b3e6c8;
}