/* ==============================================
   🍅 HongleeMarket - Professional FINANCIAL PREMIUM Theme
   Project: Startup Consulting (Management System Concept) - v19.10.0 RESPONSIVE FIX
   Fixes: Mobile Layout Breakage, Theme Unification (Trend/Forecast)
   ============================================== */

/* 🔸 GLOBAL RESET & BASE COLORS */
:root {
  --bs-primary: #111111 !important;
  --bs-success: #C6FF00 !important;
  --bs-body-bg: #f8f9fa !important;
  --accent-neon: #C6FF00 !important;
  --fin-gray-bright: #e5e7eb !important;
  --fin-gray-muted: #9ca3af !important;
}

/* Force dark outer frame & True Financial Font Stack */
html,
body,
.layout-wrapper,
.layout-container,
.authentication-wrapper {
  background-color: #000000 !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh !important;
  font-family: 'Pretendard Variable', 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif !important;
  letter-spacing: -0.02em !important;
}

/* 🔸 LAYOUT CONTENT (WIDE VIEW) - GAP FIX */
.layout-page {
  background-color: #f8f9fa !important;
  padding-left: 0 !important;
  /* CRITICAL: Remove sidebar gap */
  margin-left: 0 !important;
}

.layout-page .container-fluid,
.layout-page .container-xxl {
  padding-left: 1.5rem !important;
  /* Restore inner breathing room */
}

/* 🔸 BRANDING & LOGO (SIDEBAR RECOVERY & NO-LINE) */
.layout-menu .app-brand {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: 1.5rem 1.25rem !important;
  background-color: #111111 !important;
  min-height: 110px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.app-brand-link {
  display: flex !important;
  flex-direction: column !important;
  text-decoration: none !important;
  border: none !important;
  outline: none !important;
}

/* HANGUL "홍이마켓" - PURE WHITE */
.app-brand-link::before {
  content: "홍이마켓" !important;
  display: block !important;
  color: #ffffff !important;
  font-size: 1.7rem !important;
  font-weight: 950 !important;
  letter-spacing: -1px !important;
  white-space: nowrap !important;
  visibility: visible !important;
}

.app-brand-link::after {
  content: "MANAGEMENT SYSTEM" !important;
  display: block !important;
  font-size: 0.65rem !important;
  color: rgba(255, 255, 255, 0.6) !important;
  font-weight: 600 !important;
  letter-spacing: 3.5px !important;
  margin-top: 5px !important;
}

/* Hide original distracting items */
.app-brand-text,
.app-brand img,
.app-brand-logo,
.app-brand i {
  display: none !important;
}

.layout-menu-toggle {
  display: block !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
}

/* 🔸 SIDEBAR MENU (FIXED LINE & SCROLL) */
.layout-menu {
  background-color: #111111 !important;
  border: none !important;
  box-shadow: none !important;
  width: 260px !important;
  display: flex !important;
  flex-direction: column !important;
  /* FIX: ENABLE SCROLLING */
  height: 100vh !important;
  position: sticky !important;
  top: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Custom Scrollbar for Sidebar */
.layout-menu::-webkit-scrollbar {
  width: 4px;
}

.layout-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.layout-menu,
.menu-inner,
.menu-item,
.menu-link,
.menu-header {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.layout-menu .menu-inner {
  flex: 1 !important;
  display: block !important;
}

/* 🔹 FIX: USER INFO (FINANCIAL NEON) */
.layout-menu .fw-semibold {
  color: #C6FF00 !important;
  font-weight: 900 !important;
  font-size: 1.1rem !important;
}

.layout-menu [class*="badge"],
.layout-menu .user-info-text,
.layout-menu .menu-inner>li.menu-item:first-child .menu-link span:not(.fw-semibold) {
  color: #C6FF00 !important;
  border: 1.2px solid #C6FF00 !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  font-weight: 900 !important;
  font-size: 0.75rem !important;
}

/* 🔹 FIX: MENU COLORS (FINANCIAL GRAY #e5e7eb) */
.layout-menu .menu-link,
.layout-menu .menu-item .menu-link,
.layout-menu .menu-item.open>.menu-link,
.layout-menu .menu-item.active>.menu-link {
  color: #e5e7eb !important;
  background-color: transparent !important;
  opacity: 1 !important;
}

/* Hover state remains Neon */
.layout-menu .menu-item .menu-link:hover {
  color: #C6FF00 !important;
}

/* Active Highlight */
.layout-menu .menu-item.active:not(.open)>.menu-link,
.layout-menu .menu-sub .menu-item.active>.menu-link {
  color: #C6FF00 !important;
  font-weight: 800 !important;
}

/* Sub-menu text */
.layout-menu .menu-sub .menu-link {
  padding-left: 2.8rem !important;
  color: rgba(229, 231, 235, 0.75) !important;
}

/* 🔹 FIX: MENU LOGIC ISOLATION (REMOVED BLOCKING RULE) */
/* The previous 'display: none' rule prevented valid user interaction. */
/* Auto-expansion is now handled by the JS Guard in footer.blade.php */

/* 🔹 FIX: LABEL READABILITY (BLACK TEXT ON NEON) */
.bg-label-success {
  background-color: #C6FF00 !important;
  color: #000000 !important;
  /* Black text for max contrast */
  font-weight: 800 !important;
}

/* Show indicator ONLY for the final active leaf */
.layout-menu .menu-item.active:not(.open)>.menu-link:before {
  content: "";
  position: absolute;
  left: 0;
  width: 5px;
  height: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: #C6FF00 !important;
  border-radius: 0 4px 4px 0;
}

/* 🔸 LOGIN PAGE BRANDING */
.authentication-inner .app-brand {
  background-color: #ffffff !important;
  justify-content: center !important;
  border: none !important;
  min-height: 80px !important;
}

.authentication-inner .app-brand-link::before {
  content: "홍이마켓" !important;
  color: #000000 !important;
  font-size: 2.3rem !important;
  font-weight: 950 !important;
}

.authentication-inner .card {
  border: none !important;
  box-shadow: 0 50px 150px rgba(0, 0, 0, 0.9) !important;
}

/* 🔹 MOBILE RESPONSIVE FIX (v19.10) */
/* Revert aggressive desktop styles on mobile to prevent layout breakage */
@media (max-width: 1199.98px) {
  .layout-menu {
    position: fixed !important;
    /* Revert sticky to fixed for overlay */
    transform: translate3d(-100%, 0, 0);
    /* Initially hide off-canvas */
    transition: all 0.2s ease-in-out;
  }

  .layout-menu.expanded {
    transform: translate3d(0, 0, 0);
  }

  .layout-page {
    padding-left: 0 !important;
    /* Mobile doesn't need padding-left as menu is overlay */
    margin-left: 0 !important;
  }

  /* 🔹 FIX: RESTORE HAMBURGER MENU ON MOBILE */
  .layout-menu-toggle {
    display: block !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    position: absolute !important;
    left: 1rem !important;
    top: 1rem !important;
    z-index: 1100 !important;
    color: #000000 !important;
    /* Black icon */
  }
}

/* True Financial Master Sync V19.10.1 Sat Feb 14 06:45:00 KST 2026 */