/* ==========================================================================
   IYI SOLUTION - FLOATING METALLIC TOP COMMAND DOCK & TOP SIDEBAR
   Innovation: Unified Top-Tier Dock with Dual Contextual Ribbons
   ========================================================================== */

.top-command-dock-wrapper {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  padding: 0 16px;
}

/* Master Dock Container */
.top-command-dock {
  pointer-events: auto;
  width: 100%;
  max-width: var(--container-max);
  background: rgba(10, 14, 11, 0.82);
  border: 1px solid rgba(163, 230, 53, 0.25);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 
    0 16px 36px -10px rgba(0, 0, 0, 0.8),
    0 0 24px -5px rgba(163, 230, 53, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.25);
  transition: all var(--transition-normal);
  overflow: visible;
}

.top-command-dock.dock-scrolled {
  background: rgba(7, 10, 8, 0.94);
  border-color: rgba(163, 230, 53, 0.35);
  box-shadow: 
    0 20px 45px -10px rgba(0, 0, 0, 0.9),
    0 0 30px -4px rgba(163, 230, 53, 0.22);
}

/* Tier 1: Master Command Bar */
.master-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  min-height: 64px;
}

/* Brand Logo */
.brand-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-emblem {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #182319, #090e0a);
  border: 1.5px solid var(--lime-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(163, 230, 53, 0.3), inset 0 1px 1px #d9f99d;
  transition: transform var(--transition-fast);
}

.brand-identity:hover .brand-emblem {
  transform: scale(1.05) rotate(3deg);
  box-shadow: 0 0 30px rgba(163, 230, 53, 0.5);
}

.brand-emblem svg {
  width: 24px;
  height: 24px;
  fill: var(--lime-primary);
  filter: drop-shadow(0 0 4px var(--lime-primary));
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-name span {
  color: var(--lime-primary);
  background: var(--grad-lime-metallic);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-status-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-status-tag .live-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-glow 1.5s infinite;
}

/* Primary Mode Switcher (Landing vs Dashboard) */
.mode-switcher {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-medium);
  padding: 4px;
  border-radius: var(--radius-full);
  gap: 4px;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-silver);
  transition: all var(--transition-fast);
}

.mode-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.8;
}

.mode-btn:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.06);
}

.mode-btn.active-mode {
  background: var(--grad-lime-metallic);
  color: #050a05;
  font-weight: 700;
  box-shadow: 0 2px 14px rgba(163, 230, 53, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.mode-btn.active-mode svg {
  fill: #050a05;
  opacity: 1;
}

/* Global Right Controls */
.dock-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language Switcher */
.lang-selector {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  color: var(--text-dim);
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  color: var(--text-white);
}

.lang-btn.active-lang {
  color: #060906;
  background: var(--lime-primary);
  box-shadow: 0 0 10px rgba(163, 230, 53, 0.4);
}

/* Sign In / User Profile CTA */
.btn-nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-white);
  border: 1px solid var(--border-medium);
  background: rgba(255, 255, 255, 0.04);
  transition: all var(--transition-fast);
}

.btn-nav-auth:hover {
  border-color: var(--lime-primary);
  color: var(--lime-glow);
  box-shadow: var(--glow-lime-sm);
}

/* Cart Trigger Button in Top Command Dock */
.btn-nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-white);
  border: 1px solid var(--lime-border);
  background: rgba(163, 230, 53, 0.08);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-nav-cart:hover {
  background: rgba(163, 230, 53, 0.2);
  border-color: var(--lime-primary);
  color: var(--lime-glow);
  box-shadow: var(--glow-lime-sm);
}

.btn-nav-cart svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.cart-count-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--lime-primary);
  color: #060a06;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(163, 230, 53, 0.6);
}

/* User Logged in Pill */
.user-pill {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 6px;
  background: rgba(163, 230, 53, 0.08);
  border: 1px solid var(--lime-border);
  border-radius: var(--radius-full);
  cursor: pointer;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lime-primary);
  color: #050a05;
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-name-text {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-titanium);
}

/* Tier 2: Contextual Sub-Nav Bar (The Top Sidebar Ribbon) */
.sub-nav-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 20px;
  background: rgba(7, 10, 8, 0.6);
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
  overflow: visible;
  position: relative;
}

.sub-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: visible;
  position: relative;
}

.sub-nav-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.sub-nav-item svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  fill: currentColor;
}

.sub-nav-item:hover {
  color: var(--lime-glow);
  background: rgba(163, 230, 53, 0.08);
}

.sub-nav-item.active-sub {
  color: var(--lime-glow);
  background: rgba(163, 230, 53, 0.12);
  border: 1px solid rgba(163, 230, 53, 0.25);
  font-weight: 600;
}

/* Dropdown Menu for Services in Top Dock */
.nav-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.nav-dropdown-btn {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-titanium);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-dropdown-btn svg {
  width: 14px;
  height: 14px;
  fill: var(--lime-glow);
}

.nav-dropdown-btn:hover,
.nav-dropdown-wrapper.dropdown-open .nav-dropdown-btn {
  color: var(--lime-glow);
  background: rgba(163, 230, 53, 0.14);
  border-color: rgba(163, 230, 53, 0.35);
  box-shadow: 0 0 15px rgba(163, 230, 53, 0.2);
}

.dropdown-arrow {
  font-size: 0.65rem;
  color: var(--lime-glow);
  margin-left: 2px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}

.nav-dropdown-wrapper.dropdown-open .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 320px;
  background: rgba(11, 16, 12, 0.98);
  border: 1.5px solid var(--lime-border);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), var(--glow-lime-sm);
  backdrop-filter: blur(28px);
  padding: 10px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 1050;
  animation: slide-up 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Open on click (via .dropdown-open) or hover on mouse devices */
.nav-dropdown-wrapper.dropdown-open .nav-dropdown-menu,
.nav-dropdown-wrapper:hover .nav-dropdown-menu,
.nav-dropdown-wrapper:focus-within .nav-dropdown-menu {
  display: flex;
}

.dropdown-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}

.dropdown-menu-header span:first-child {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--lime-glow);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.dropdown-menu-header span:last-child {
  font-size: 0.625rem;
  background: rgba(163, 230, 53, 0.15);
  color: #d9f99d;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-titanium);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}

.nav-dropdown-item:hover {
  background: rgba(163, 230, 53, 0.12);
  border-color: rgba(163, 230, 53, 0.3);
  color: var(--lime-glow);
  transform: translateX(4px);
}

.dropdown-item-desc {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-dim);
  font-weight: 400;
  margin-top: 2px;
}

.dropdown-menu-footer {
  padding-top: 6px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dropdown-menu-footer a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.dropdown-menu-footer a:hover {
  color: var(--lime-glow);
  background: rgba(255, 255, 255, 0.04);
}


.sub-nav-badge {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(163, 230, 53, 0.15);
  color: var(--lime-glow);
  font-weight: 700;
}

/* Quick Action on Tier 2 */
.sub-nav-quick-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--lime-glow);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: rgba(163, 230, 53, 0.08);
  border: 1px solid var(--lime-border);
  transition: all var(--transition-fast);
}

.sub-nav-quick-cta:hover {
  background: var(--lime-primary);
  color: #060906;
  box-shadow: 0 0 14px rgba(163, 230, 53, 0.4);
}

/* Mobile Hamburger Toggle */
.mobile-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  align-items: center;
  justify-content: center;
  color: var(--text-white);
}

.mobile-nav-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Mobile Slide-Down Command Drawer */
.mobile-command-drawer {
  display: none;
  position: fixed;
  top: 90px;
  left: 16px;
  right: 16px;
  background: rgba(11, 15, 12, 0.96);
  border: 1px solid var(--lime-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(28px);
  padding: 20px;
  z-index: 999;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), var(--glow-lime-sm);
  flex-direction: column;
  gap: 16px;
  animation: slide-drawer 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-command-drawer.drawer-open {
  display: flex;
}

@keyframes slide-drawer {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Adaptations */
@media (max-width: 1024px) {
  /* Tablet */
  .brand-status-tag {
    display: none;
  }
  .sub-nav-quick-cta {
    display: none;
  }
}

@media (max-width: 768px) {
  /* Mobile */
  .top-command-dock-wrapper {
    top: 8px;
    padding: 0 8px;
  }
  .master-bar {
    padding: 8px 12px;
    min-height: 54px;
  }
  .mode-switcher {
    display: none; /* Accessible in drawer */
  }
  .btn-nav-auth {
    display: none;
  }
  .mobile-nav-toggle {
    display: flex;
  }
  .sub-nav-ribbon {
    padding: 4px 10px;
  }
  .sub-nav-item {
    font-size: 0.75rem;
    padding: 4px 8px;
  }
  .nav-dropdown-menu {
    min-width: 280px;
    left: -10px;
  }
}

/* Active state inside Layanan dropdown */
.nav-dropdown-item.active-dropdown-item {
  background: rgba(163, 230, 53, 0.16) !important;
  border-left: 3px solid var(--lime-primary) !important;
  color: var(--lime-glow) !important;
}

/* ==========================================================================
   Kelap-Kelip Animated Badge: 100% BELI PUTUS
   ========================================================================== */
@keyframes pulseBeliPutusGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.7);
    border-color: rgba(163, 230, 53, 0.85);
    background: rgba(163, 230, 53, 0.18);
    color: #bef264;
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 16px 4px rgba(163, 230, 53, 0.9);
    border-color: #a3e635;
    background: rgba(163, 230, 53, 0.38);
    color: #ffffff;
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(163, 230, 53, 0);
    border-color: rgba(163, 230, 53, 0.85);
    background: rgba(163, 230, 53, 0.18);
    color: #bef264;
    transform: scale(1);
  }
}

.badge-beli-putus-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(163, 230, 53, 0.2);
  color: #bef264;
  border: 1.5px solid #a3e635;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  animation: pulseBeliPutusGlow 1.6s infinite ease-in-out;
  vertical-align: middle;
}

.pulse-dot-live {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #a3e635;
  border-radius: 50%;
  box-shadow: 0 0 8px #a3e635;
}
