


/* =========================
   CORE & RESET
========================= */
body {
  background: #f8fafc; /* Lebih cerah & bersih */
  font-family: 'Inter', sans-serif;
  color: #1e293b;
  -webkit-tap-highlight-color: transparent; /* Hapus shadow biru saat klik di HP */
}

/* Container utama agar tidak overflow horizontal */
.app {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* =========================
   OWNER LAYOUT (WAJIB)
========================= */

/* Keadaan Default (Sidebar Terbuka) */
.sidebar .logo {
  padding: 16px;
  display: flex;
  align-items: center;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.3s ease; /* Tambahkan transisi agar halus */
  justify-content: center;   /* Agar logo tetap di tengah saat mengecil */
}

.sidebar .logo img {
  height: 32px;
  width: auto;
  transition: all 0.3s ease; /* Transisi untuk ukuran gambar */
}

/* Keadaan Saat Sidebar Tertutup/Mengecil */
/* Asumsi: Anda menambahkan class .close atau .collapsed pada parent .sidebar menggunakan JS */
.sidebar.close .logo {
  padding: 12px 0; /* Sesuaikan padding agar tidak terlalu lebar */
}

.sidebar.close .logo img {
  height: 20px; /* Ukuran logo saat sidebar tertutup */
}

.sidebar .logo span {
  margin-left: 10px;
  color: #1e88e5;
  font-size: 16px;
}

/* MENU */
.sidebar .menu {
  flex: 1;
  overflow-y: auto;
  padding: 8px 8px 32px;
  list-style: none;
  margin: 0;
}

.sidebar .menu li {
  margin-bottom: 6px;
}

.sidebar .menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #334155;
  text-decoration: none;
  border-radius: 10px;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar .menu a i {
  font-size: 18px;
}

/* ACTIVE + HOVER */
.sidebar .menu li.active a,
.sidebar .menu a:hover {
  background: #1e88e5;
  color: #ffffff;
}

/* =========================
   SIDEBAR SCROLL & SUBMENU FIX
   (SYNC DENGAN CSS LAMA)
========================= */

/* Sidebar jadi flex column + full height */
.sidebar {
  width: 240px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  height: 100vh;
  flex-shrink: 0;
  transition: width 0.3s ease, transform 0.25s ease; /* Tambahkan transisi lebar */
  z-index: 3000;
}

/* Logo jangan ikut scroll */
.sidebar .logo {
  padding: 0 16px;
  flex-shrink: 0;
}

/* Menu area yang bisa scroll */
.sidebar .menu {
  flex: 1;               /* ISI SISA TINGGI */
  overflow-y: auto;      /* SCROLL AKTIF */
  padding: 8px 8px 32px;
}

/* Scrollbar halus */
.sidebar .menu::-webkit-scrollbar {
  width: 6px;
}
.sidebar .menu::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}

/* =========================
   SECTION TITLE
========================= */
.menu-section {
  font-size: 11px;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 14px 16px 6px;
  letter-spacing: 0.5px;
}

/* =========================
   SUBMENU SYSTEM
========================= */
.has-sub > a {
  position: relative;
}

/* Chevron */
.has-sub > a::after {
  content: '\F282';
  font-family: bootstrap-icons;
  font-size: 12px;
  margin-left: auto;
  transition: transform 0.2s ease;
}

/* Rotate saat open */
.has-sub.open > a::after {
  transform: rotate(180deg);
}

/* Submenu container */
.submenu {
  display: none;
  margin-left: 6px;
  margin-top: 4px;
  padding-left: 6px;
  border-left: 2px solid #e5e7eb;
}

.has-sub.open .submenu {
  display: block;
}

/* Submenu item */
.submenu li a {
  padding: 8px 12px 8px 28px;
  font-size: 13px;
  color: #475569;
  border-radius: 8px;
}

/* Active submenu */
.submenu li.active a {
  background: #e3f2fd;
  color: #1e88e5;
  font-weight: 600;
}

/* =========================
   COLLAPSE MODE SYNC
========================= */
.sidebar.collapsed .menu-section {
  display: none;
}

.sidebar.collapsed .submenu {
  display: none !important;
}

.sidebar.collapsed .has-sub > a::after {
  display: none;
}

/* =========================
   MAIN CONTENT OFFSET (AMAN)
========================= */


/* =========================
   SIDEBAR COLLAPSE (OWNER)
========================= */
.sidebar.collapsed {
  width: 72px;
}

.sidebar.collapsed .logo span {
  display: none;
}

.sidebar.collapsed .menu a span {
  display: none;
}

.sidebar.collapsed .menu a {
  justify-content: center;
}


/* =========================
   MAIN & CONTENT (CONSOLIDATED)
========================= */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
}

.content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  /* Tambahkan padding bawah agar tidak tertutup bottom-nav di mobile */
  padding-bottom: 80px; 
}


/* =========================
   POLISHED BOTTOM NAV (APP FEEL)
========================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px; /* Sedikit lebih tinggi */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px); /* Efek kaca transparan (iOS Style) */
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 2000;
  padding-bottom: env(safe-area-inset-bottom); /* Support iPhone notch bawah */
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
}

.bottom-nav a {
  flex: 1;
  text-align: center;
  color: #94a3b8;
  font-size: 11px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav a i {
  font-size: 22px;
  margin-bottom: 2px;
  transition: transform 0.2s ease;
}

/* Efek saat diklik/active */
.bottom-nav a.active {
  color: #1e88e5;
  font-weight: 600;
}

.bottom-nav a.active i {
  transform: translateY(-2px); /* Ikon naik sedikit saat aktif */
}

/* Indikator pil kecil di atas ikon aktif */
.bottom-nav a.active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 20px;
  height: 3px;
  background: #1e88e5;
  border-radius: 0 0 10px 10px;
}
/* Hilangkan indicator di atas ikon jika tidak aktif */
.bottom-nav a::before {
  content: "";
  position: absolute;
  top: 0;
  width: 20px;
  height: 3px;
  background: transparent; /* Default transparan */
  border-radius: 0 0 10px 10px;
}
.bottom-nav a.active::before {
  background: #1e88e5; /* Hanya muncul saat aktif */
}

/* =========================
   KASIR UI & SKELETON LOADING
========================= */
.kasir-content {
  padding: 16px;
  padding-bottom: 90px; /* Jarak agar tidak tertutup bottom nav */
  background: #f8fafc;
}

/* Card Order Lebih Tajam */
.kasir-order {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px;
  border: 1px solid rgba(0,0,0,0.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 16px;
  transition: transform 0.1s active;
}

.kasir-order:active {
  transform: scale(0.98); /* Efek membal saat ditekan */
}

/* LOADING STATE (SKELETON) */
.skeleton {
  background: #eee;
  background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
  border-radius: 16px;
  background-size: 200% 100%;
  animation: shine 1.5s linear infinite;
  height: 140px;
  margin-bottom: 16px;
  border: none;
}

@keyframes shine {
  to { background-position-x: -200%; }
}

/* Empty State Polish */
.empty-state {
  background: transparent;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.7;
}

.empty-state i {
  font-size: 64px;
  color: #cbd5e1;
  margin-bottom: 16px;
}

/* Button Polish */
.btn-success {
  background: #27ae60;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.2s;
}

.btn-success:active {
  background: #1e8449;
  transform: translateY(2px);
}

/* SIDEBAR FIXES (Agar tidak bentrok dengan Kasir Mode) */
/*@media (max-width: 768px) {*/
/*  .sidebar {*/
    /*display: none; /* Sembunyikan sidebar di mobile otomatis 
/*  }*/
/*}*/

/* =========================
   DATE FILTER MODERN
========================= */
.date-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
}

.date-filter i {
  font-size: 18px;
  color: #1e88e5;
}

.date-filter input[type="date"] {
  border: none;
  outline: none;
  font-size: 14px;
  flex: 1;
  background: transparent;
}

/* =========================
   SIDEBAR MOBILE (SYNC NAVBAR)
========================= */

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 3000;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2500;
    display: none;
  }

  .sidebar-overlay.show {
    display: block;
  }
}

