@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap");

* {
  padding: 0;
  margin: 0;
  list-style-type: none;
  text-decoration: none !important;
  scroll-behavior: smooth;
  box-sizing: border-box;
}

:root {
  --font-prime: #3396d3;
  --white-color: #fff;
  --background-color: #eeeeee;
  --vague-black: rgb(88, 88, 88);
}

::after,
::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

h1 {
  font-weight: 600;
  font-size: 1.5rem;
}

body {
  font-family: "Poppins", sans-serif;
}

.wrapper {
  display: flex;
}

.main {
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  transition: all 0.35s ease-in-out;
  background-color: var(--background-color);
}

#sidebar {
  width: 70px;
  min-width: 70px;
  z-index: 1000;
  transition: all 0.25s ease-in-out;
  display: flex;
  flex-direction: column;
  background-color: var(--white-color);
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
}

#sidebar.expand {
  width: 260px;
  min-width: 260px;
}

#toggle-btn {
  background-color: transparent;
  cursor: pointer;
  border: 0;
  padding: 1rem 1.5rem;
}

.sidebar-logo {
  margin: 16px 0;
}

.sidebar-logo a {
  color: black;
  font-size: 1.15rem;
  font-weight: 600;
}

#sidebar:not(.expand) .sidebar-logo,
#sidebar:not(.expand) a.sidebar-link span {
  display: none;
}

.sidebar-nav {
  padding: 2rem 0;
  flex: 1 1 auto;
  font-weight: 500;
}

.sidebar-nav i {
  font-weight: 500;
}

.sidebar-footer {
  font-weight: 500;
}

.sidebar-footer i {
  font-weight: 500;
}

a.sidebar-link {
  padding: 0.625rem 1.625rem;
  color: var(--vague-black);
  display: block;
  font-size: 0.9rem;
  white-space: nowrap;
  border-left: 3px solid transparent;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  transition: 0.2s ease-in;
}

.sidebar-link i {
  font-size: 1.5rem;
  margin-right: 0.75rem;
  font-weight: 500;
}

a.sidebar-link:hover {
  background: rgb(229, 229, 229);
  color: rgb(26, 26, 26);
}

.sidebar-item {
  position: relative;
}

#sidebar:not(.expand) .sidebar-item .sidebar-dropdown {
  position: absolute;
  top: 0;
  left: 70px;
  padding: 0;
  min-width: 15rem;
  display: none;
}

#sidebar:not(.expand) .sidebar-item:hover .has-dropdown + .sidebar-dropdown {
  display: block;
  max-height: 15em;
  width: 100%;
  opacity: 1;
}

#sidebar.expand .sidebar-link[data-bs-toggle="collapse"]::after {
  border: solid;
  border-width: 0 0.075rem 0.075rem 0;
  content: "";
  display: inline-block;
  padding: 2px;
  position: absolute;
  right: 1.5rem;
  top: 1.4rem;
  transform: rotate(-135deg);
  transition: all 0.2s ease-out;
}

.sidebar-link span {
  font-size: 16px;
  transform: translateY(-5px);
}

#sidebar.expand .sidebar-link[data-bs-toggle="collapse"].collapsed::after {
  transform: rotate(45deg);
  transition: all 0.2s ease-out;
}

.logo {
  color: var(--white-color);
  padding: 1px 7px;
  background: var(--font-prime);
  border-radius: 6px;
  font-weight: 600;
}

.active {
  background: var(--font-prime);
  color: white !important;
}

.card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bg-light {
  background-color: #f9fbfd !important;
}

.text-primary {
  color: #3b82f6 !important;
}

.text-warning {
  color: #d97706 !important;
}

.cashier-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.products-section {
  flex: 2;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.cart-section {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.product-card {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 15px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.product-card h5 {
  font-size: 16px;
  font-weight: 600;
  color: #222;
}

.product-card .price {
  color: #2563eb;
  font-weight: bold;
  font-size: 18px;
}

.product-card .stock {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}

.product-card button {
  background-color: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  width: 100%;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.product-card button:hover {
  background-color: #1e4fd0;
}

.cart-items {
  min-height: 100px;
  border-top: 1px solid #eee;
  padding-top: 10px;
  font-size: 14px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.total {
  font-weight: 600;
  color: #2563eb;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #eee;
  padding-top: 10px;
  font-size: 18px;
}

.recent-card {
  flex: 1 1 250px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  padding: 15px;
  transition: all 0.2s ease-out;
}

.recent-card:hover {
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  transform: translateY(-5px);
}

.recent-card h6 {
  font-weight: 600;
  font-size: 16px;
  color: #222;
}

.recent-card .category {
  color: #6b7280;
  font-size: 14px;
}

.recent-card .price {
  color: #2563eb;
  font-weight: 600;
  font-size: 18px;
}

.recent-card .stock {
  font-size: 13px;
  color: #666;
}

.form-container {
  display: none;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-container.tampilkan {
  display: block;
}

.form-container h3 {
  margin-top: 0;
  font-size: 20px;
  color: #1e3a8a;
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.form-group {
  flex: 1;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: #374151;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: #f9fafb;
  font-size: 14px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.save-btn,
.cancel-btn {
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease;
}

.save-btn {
  background-color: #2563eb;
  color: white;
}

.save-btn:hover {
  background-color: #1d4ed8;
}

.cancel-btn {
  background-color: #f3f4f6;
  color: #374151;
}

.cancel-btn:hover {
  background-color: #e5e7eb;
}

.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-btn.edit {
  background-color: #3b82f6;
  color: white;
}

.action-btn.edit:hover {
  background-color: #2563eb;
}

.action-btn.delete {
  background-color: #ef4444;
  color: white;
}

.action-btn.delete:hover {
  background-color: #dc2626;
}

.navbar {
  left: 42%;
  display: flex;
  background-color: #dcdde1;
  border-radius: 50px;
  overflow: hidden;
  width: 200px;
  justify-content: space-between;
  margin-bottom: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 10;
}

.nav-btn {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #2f3640;
}

.nav-btn.active {
  background-color: #40739e;
  color: white;
  margin: 0 6px;
  box-shadow: 0 2px 8px rgba(64, 115, 158, 0.4);
}

.content {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 100px);
  overflow: hidden; /* agar container yang animasi tidak keluar area */
  display: flex;
}

.container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: white;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
  overflow-y: auto;
  padding: 20px;
}

.container.show {
  opacity: 1;
  transform: translateY(0);
  z-index: 1;
}

@media (min-width: 1024px) {
  .content {
    min-height: calc(100vh - 70px); /* di layar besar lebih proporsional */
  }
}

@media (max-width: 768px) {
  .content {
    min-height: auto;
  }
  .container {
    padding: 10px;
  }
}

.infotambahan {
  width: 100%;
  position: relative;
  height: 20vh;
}

.isikartu {
  width: 100%;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  position: absolute;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.isikartu.aktif {
  opacity: 1;
  transform: translateY(0);
  z-index: 1;
}