/* ========================================================
   SEMILIR SENJA CAFE & POS — ULTRA ELEGANT SIDE NAVIGATION DRAWER
   Sage Green Luxury Aesthetic (Sage Green, Mint & Glassmorphism)
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- Toggle Button (Pojok Kanan Atas Fixed) --- */
#snp-toggle-btn {
  position: fixed;
  top: 12px;
  right: 14px;
  left: auto;
  z-index: 10001;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid rgba(91, 112, 101, 0.35);
  background: rgba(244, 247, 245, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(91, 112, 101, 0.12);
  outline: none;
}

[data-theme="dark"] #snp-toggle-btn {
  background: rgba(15, 23, 19, 0.92);
  border-color: rgba(143, 168, 155, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#snp-toggle-btn:hover {
  background: rgba(91, 112, 101, 0.15);
  border-color: rgba(91, 112, 101, 0.8);
  box-shadow: 0 6px 24px rgba(91, 112, 101, 0.25);
  transform: scale(1.06);
}

#snp-toggle-btn.is-open {
  background: rgba(91, 112, 101, 0.2);
  border-color: #5B7065;
  box-shadow: 0 0 0 3px rgba(91, 112, 101, 0.25);
}

/* Hamburger / X Icon Lines */
#snp-toggle-btn .snp-bar {
  position: absolute;
  width: 22px;
  height: 2.5px;
  background: #5B7065;
  border-radius: 99px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] #snp-toggle-btn .snp-bar {
  background: #8FA89B;
}

#snp-toggle-btn .snp-bar:nth-child(1) { transform: translateY(-7px); }
#snp-toggle-btn .snp-bar:nth-child(2) { transform: translateY(0); }
#snp-toggle-btn .snp-bar:nth-child(3) { transform: translateY(7px); }

/* Animated to X when open */
#snp-toggle-btn.is-open .snp-bar:nth-child(1) { transform: rotate(45deg) translateY(0); }
#snp-toggle-btn.is-open .snp-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
#snp-toggle-btn.is-open .snp-bar:nth-child(3) { transform: rotate(-45deg) translateY(0); }

/* --- Backdrop Overlay --- */
#snp-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none !important;
  transition: opacity 0.3s ease;
}

#snp-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto !important;
}

#snp-wrapper {
  pointer-events: none !important;
}

#snp-toggle-btn {
  pointer-events: auto !important;
}

/* --- Side Panel Drawer (Right Side) --- */
#snp-panel {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  z-index: 10001;
  width: 295px;
  height: 100vh;
  background: rgba(244, 247, 245, 0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none !important;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
  overflow-y: auto;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
}

[data-theme="dark"] #snp-panel {
  background: rgba(15, 23, 19, 0.96);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
  border-left: 1px solid rgba(143, 168, 155, 0.18);
}

#snp-panel.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto !important;
}

/* --- Header Panel --- */
.snp-header {
  padding: 26px 22px 20px 22px;
  border-bottom: 1px solid rgba(91, 112, 101, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-theme="dark"] .snp-header {
  border-bottom-color: rgba(143, 168, 155, 0.15);
}

.snp-header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.snp-header-brand-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #5B7065 0%, #3F5248 100%);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  box-shadow: 0 4px 16px rgba(91, 112, 101, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .snp-header-brand-logo {
  background: linear-gradient(135deg, #8FA89B 0%, #5B7065 100%);
  box-shadow: 0 4px 18px rgba(143, 168, 155, 0.3);
}

.snp-header-brand-text {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1C1B1A;
  line-height: 1.25;
}

[data-theme="dark"] .snp-header-brand-text {
  color: #F8FAFC;
}

.snp-header-brand-text small {
  display: block;
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #5B7065;
  margin-top: 2px;
}

[data-theme="dark"] .snp-header-brand-text small {
  color: #8FA89B;
}

/* --- Nav Section Content --- */
.snp-nav {
  padding: 18px 14px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.snp-nav-label {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #94A3B8;
  padding: 10px 10px 4px 10px;
}

[data-theme="dark"] .snp-nav-label {
  color: #64748B;
}

.snp-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

[data-theme="dark"] .snp-menu-item {
  color: #CBD5E1;
}

.snp-menu-item:hover {
  background: rgba(91, 112, 101, 0.08);
  color: #5B7065;
  transform: translateX(4px);
}

[data-theme="dark"] .snp-menu-item:hover {
  background: rgba(143, 168, 155, 0.12);
  color: #8FA89B;
  transform: translateX(4px);
}

/* Active Menu Item State (Sage Green Luxury Cafe Theme) */
.snp-menu-item.snp-active {
  background: linear-gradient(135deg, rgba(91, 112, 101, 0.12) 0%, rgba(143, 168, 155, 0.18) 100%) !important;
  color: #5B7065 !important;
  font-weight: 800;
  border: 1px solid rgba(91, 112, 101, 0.32);
  box-shadow: 0 4px 14px rgba(91, 112, 101, 0.08);
}

[data-theme="dark"] .snp-menu-item.snp-active {
  background: linear-gradient(135deg, rgba(143, 168, 155, 0.15) 0%, rgba(91, 112, 101, 0.25) 100%) !important;
  color: #AAC3B5 !important;
  border-color: rgba(143, 168, 155, 0.4);
  box-shadow: 0 4px 16px rgba(143, 168, 155, 0.15);
}

.snp-menu-item.snp-active::after {
  content: '';
  position: absolute;
  right: 14px;
  width: 8px;
  height: 8px;
  background: #5B7065;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(91, 112, 101, 0.8);
}

[data-theme="dark"] .snp-menu-item.snp-active::after {
  background: #8FA89B;
  box-shadow: 0 0 12px #8FA89B;
}

.snp-menu-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Sage Green Badges */
.snp-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
  background: linear-gradient(135deg, #5B7065 0%, #6B8476 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(91, 112, 101, 0.25);
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  letter-spacing: 0.5px;
}

.snp-badge.badge-kds {
  background: linear-gradient(135deg, #4E6557 0%, #7A9687 100%);
}

.snp-badge.badge-vip {
  background: linear-gradient(135deg, #638573 0%, #8FA89B 100%);
  color: #0F1713;
  box-shadow: 0 2px 10px rgba(99, 133, 115, 0.35);
}

.snp-badge.badge-login {
  background: linear-gradient(135deg, #5B7065 0%, #8FA89B 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(91, 112, 101, 0.3);
}

.snp-divider {
  height: 1px;
  background: rgba(91, 112, 101, 0.12);
  margin: 12px 10px;
}

[data-theme="dark"] .snp-divider {
  background: rgba(143, 168, 155, 0.15);
}

/* ========================================================
   MOBILE UNDERBAR DOCK SYSTEM (Screens <= 992px)
   Replaces Side Panel on Mobile HP with 4 Core Items:
   [Beranda | Menu | Login System | Mode Terang/Gelap]
   ======================================================== */
#snp-mobile-underbar {
  display: none;
}

@media (max-width: 992px) {
  /* HIDE Sidebar Drawer & Sidebar Button completely on Mobile HP */
  #snp-toggle-btn, #snp-panel, #snp-backdrop {
    display: none !important;
  }

  /* SHOW Symbol-Only Mobile Underbar Dock on HP */
  #snp-mobile-underbar {
    display: block !important;
    position: fixed !important;
    bottom: 16px !important;
    top: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 36px) !important;
    max-width: 380px !important;
    z-index: 999999 !important;
  }

  .snp-underbar-dock {
    background: rgba(244, 247, 245, 0.94) !important;
    border: 1.5px solid rgba(91, 112, 101, 0.28) !important;
    border-radius: 99px !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-evenly !important;
    align-items: center !important;
    height: 62px !important;
    padding: 0 12px !important;
    box-shadow: 0 14px 40px rgba(91, 112, 101, 0.22) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
  }

  [data-theme="dark"] .snp-underbar-dock {
    background: rgba(15, 23, 19, 0.94) !important;
    border-color: rgba(143, 168, 155, 0.3) !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7) !important;
  }

  .snp-ub-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    position: relative !important;
    padding: 6px 12px !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
  }

  .snp-ub-icon-box {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #5B7065 !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  [data-theme="dark"] .snp-ub-icon-box {
    color: #8FA89B !important;
  }

  .snp-ub-svg {
    width: 1.45rem !important;
    height: 1.45rem !important;
    transition: transform 0.25s ease !important;
  }

  /* Active Icon Pill Glow */
  .snp-ub-btn.active .snp-ub-icon-box {
    background: linear-gradient(135deg, #5B7065 0%, #6B8476 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 18px rgba(91, 112, 101, 0.45) !important;
    transform: translateY(-4px) scale(1.08) !important;
  }

  [data-theme="dark"] .snp-ub-btn.active .snp-ub-icon-box {
    background: linear-gradient(135deg, #8FA89B 0%, #638573 100%) !important;
    color: #0F1713 !important;
    box-shadow: 0 6px 18px rgba(143, 168, 155, 0.5) !important;
  }

  /* Sleek Underbar Line Indicator underneath active icon */
  .snp-ub-dot {
    width: 0;
    height: 3.5px;
    background: #5B7065;
    border-radius: 99px;
    margin-top: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
  }

  [data-theme="dark"] .snp-ub-dot {
    background: #8FA89B;
  }

  .snp-ub-btn.active .snp-ub-dot {
    width: 18px !important;
    opacity: 1 !important;
  }

  body {
    padding-bottom: 88px !important;
  }
}
