/* ==========================================================================
   FMS (Forwarder Management System) - Two-Level Tab Bar & Hamburger Menu
   Spesifikasi: docs/PANDUAN.pdf
   - Row 1 (Primary): Hamburger menu (≡) + Modul Tabs + Overflow ("2 ⌵") + Coretax Status + Notif
   - Row 2 (Secondary): Sub-Tabs (List, Data Baru, Edit) + Quick "+ Data Baru"
   - Sidebar Collapsing: Mini icon-only sidebar (58px) with tooltips
   ========================================================================== */

/* ── CSS Tokens ── */
:root {
  --fms-tab-inactive-bg: #dce6f0;
  --fms-tab-inactive-text: #5a768a;
  --fms-tab-inactive-border: #d1dbe6;
  --fms-tab-hover-bg: #edf2f8;
  --fms-tab-hover-text: #1e3a5f;
  --fms-tab-active-bg: #ffffff;
  --fms-tab-active-text: #326cca;
  --fms-tab-active-border: #326cca;
  --fms-tab-bar-bg: #f1f5f9;
  --fms-tab-bar-border: #e2e8f0;
  --fms-sidebar-width: 260px;
  --fms-sidebar-collapsed-width: 58px;
}

/* ── Dark Mode Tokens ── */
.dark {
  --fms-tab-inactive-bg: #1e2d45;
  --fms-tab-inactive-text: #7a9bbf;
  --fms-tab-inactive-border: #253a57;
  --fms-tab-hover-bg: #253a57;
  --fms-tab-hover-text: #93c5fd;
  --fms-tab-active-bg: #0f172a;
  --fms-tab-active-text: #93c5fd;
  --fms-tab-active-border: #3b82f6;
  --fms-tab-bar-bg: #0f172a;
  --fms-tab-bar-border: #1e2d45;
}

/* Hide default Unfold breadcrumb/header to prevent duplicate header */
#main > div.border-b:not(#neoerp-tabbar) {
  display: none !important;
}

/* ==========================================================================
   Sidebar Collapse System (Hamburger Menu / Icon-Only Mini Sidebar)
   ========================================================================== */

@media (min-width: 768px) {
  /* Force sidebar wrapper to reserve width properly */
  #page > div.relative:first-child {
    display: block !important;
    position: relative !important;
    flex-shrink: 0 !important;
    z-index: 50 !important;
  }

  #page > div.relative:first-child > div[x-show="sidebarOpen"],
  #page > div.relative:first-child > div {
    display: block !important;
    position: relative !important;
    height: 100% !important;
  }

  #nav-sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    max-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    z-index: 50 !important;
  }

  /* Hide default unfold close button on desktop */
  #nav-sidebar-inner .material-symbols-outlined[x-on\:click="sidebarToggle()"] {
    display: none !important;
  }
}

/* Smooth transitions for width */
#page > div.relative:first-child,
#page > div.relative:first-child > div,
#nav-sidebar,
#nav-sidebar-inner {
  transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.2s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Sidebar Inner Container */
#nav-sidebar-inner {
  height: 100vh !important;
  max-height: 100vh !important;
  min-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

#nav-sidebar-inner > div:first-child,
#nav-sidebar-inner > form,
#nav-sidebar-inner [data-controller="search"],
#nav-sidebar-inner .navigation_header {
  flex-shrink: 0 !important;
}

#nav-sidebar-apps {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin !important;
}

#nav-sidebar-apps::-webkit-scrollbar {
  width: 4px;
}

#nav-sidebar-apps::-webkit-scrollbar-thumb {
  background: rgba(50, 108, 202, 0.3);
  border-radius: 4px;
}

/* User profile pinned at the bottom */
#nav-sidebar-inner > div:last-child {
  margin-top: auto !important;
  flex-shrink: 0 !important;
  background: inherit !important;
  border-top: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.dark #nav-sidebar-inner > div:last-child {
  border-top-color: rgba(30, 41, 59, 0.8) !important;
}

/* ── Collapsed Sidebar Rules (body.sidebar-collapsed) ── */
body.sidebar-collapsed #page > div.relative:first-child,
body.sidebar-collapsed #page > div.relative:first-child > div,
body.sidebar-collapsed #nav-sidebar,
body.sidebar-collapsed #nav-sidebar-inner {
  width: var(--fms-sidebar-collapsed-width) !important;
  min-width: var(--fms-sidebar-collapsed-width) !important;
  max-width: var(--fms-sidebar-collapsed-width) !important;
}

/* Hide resize handle in collapsed mode */
body.sidebar-collapsed #nav-sidebar .cursor-col-resize {
  display: none !important;
}

/* Hide brand text & subtitle in header, keep icon centered */
body.sidebar-collapsed #nav-sidebar-inner .navigation_header {
  padding: 0 6px !important;
  justify-content: center !important;
}

body.sidebar-collapsed #nav-sidebar-inner .navigation_header > div {
  padding: 0 !important;
  justify-content: center !important;
  margin: 0 !important;
}

body.sidebar-collapsed #nav-sidebar-inner .navigation_header h1,
body.sidebar-collapsed #nav-sidebar-inner .navigation_header div.flex.flex-col,
body.sidebar-collapsed #nav-sidebar-inner .navigation_header span.material-symbols-outlined.ml-auto {
  display: none !important;
}

/* Hide search box */
body.sidebar-collapsed #nav-sidebar-inner form,
body.sidebar-collapsed #nav-sidebar-inner [data-controller="search"] {
  display: none !important;
}

/* Hide group titles & badges */
body.sidebar-collapsed #nav-sidebar-apps h2,
body.sidebar-collapsed #nav-sidebar-apps .app_list_badge {
  display: none !important;
}

body.sidebar-collapsed #nav-sidebar-apps hr {
  margin: 6px 8px !important;
}

/* Center menu item icons in 58px width */
body.sidebar-collapsed #nav-sidebar-apps ol {
  display: flex !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  align-items: center !important;
}

/* Collapsible Navigation Headers (Accordion Style) */
#nav-sidebar-apps h2 {
  cursor: pointer !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  margin: 3px 8px 2px 8px !important;
  transition: all 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
  user-select: none !important;
}

#nav-sidebar-apps h2:hover {
  background-color: rgba(50, 108, 202, 0.08) !important;
  color: var(--fms-primary) !important;
}

.dark #nav-sidebar-apps h2:hover {
  background-color: rgba(59, 130, 246, 0.15) !important;
  color: #93c5fd !important;
}

#nav-sidebar-apps h2 span.material-symbols-outlined {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  font-size: 19px !important;
  opacity: 0.65;
}

#nav-sidebar-apps h2:hover span.material-symbols-outlined {
  opacity: 1;
}

/* Indent and spacing for sub-menu items */
#nav-sidebar-apps ol {
  padding-left: 10px !important;
  margin-bottom: 4px !important;
}

body.sidebar-collapsed #nav-sidebar-apps ol > li {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
}

body.sidebar-collapsed #nav-sidebar-apps ol > li > a {
  width: 42px !important;
  height: 38px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  padding: 0 !important;
  margin: 0 auto 3px auto !important;
  justify-content: center !important;
  border-radius: 6px !important;
}

body.sidebar-collapsed #nav-sidebar-apps ol > li > a > span:not(.material-symbols-outlined),
body.sidebar-collapsed #nav-sidebar-apps ol > li > a > div {
  display: none !important;
}

body.sidebar-collapsed #nav-sidebar-apps ol > li > a span.material-symbols-outlined {
  margin-right: 0 !important;
  font-size: 20px !important;
}

/* User profile at bottom — show only avatar */
body.sidebar-collapsed #nav-sidebar-inner > div:last-child {
  padding: 10px 0 !important;
}

body.sidebar-collapsed #nav-sidebar-inner > div:last-child > div.cursor-pointer {
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
}

body.sidebar-collapsed #nav-sidebar-inner > div:last-child div.flex.flex-col,
body.sidebar-collapsed #nav-sidebar-inner > div:last-child span.material-symbols-outlined.ml-auto {
  display: none !important;
}

/* ==========================================================================
   Row 1: Primary Tab Bar (#neoerp-tabbar)
   ========================================================================== */

#neoerp-tabbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: var(--fms-tab-bar-bg);
  border-bottom: 2px solid var(--fms-tab-bar-border);
  min-height: 42px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  flex-shrink: 0;
  gap: 12px;
}

/* ── Hamburger Menu Toggle Button ── */
.nt-hamburger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--fms-tab-inactive-text);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin-right: 2px;
}

.nt-hamburger-btn:hover {
  background: var(--fms-tab-hover-bg);
  color: var(--fms-tab-active-text);
  border-color: rgba(50, 108, 202, 0.3);
}

.nt-hamburger-btn:active {
  transform: scale(0.94);
}

.nt-hamburger-btn span.material-symbols-outlined {
  font-size: 21px !important;
  line-height: 1;
}

.dark .nt-hamburger-btn {
  color: #94a3b8;
}

.dark .nt-hamburger-btn:hover {
  background: #334155;
  color: #93bbf0;
  border-color: #475569;
}

/* ── Tabs Track (Left) ── */
.nt-tabs-track {
  display: flex;
  align-items: flex-end;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  gap: 2px;
  padding-top: 4px;
  flex-grow: 1;
  min-width: 0;
}

.nt-tabs-track::-webkit-scrollbar {
  display: none !important;
  height: 0 !important;
}

/* ── Primary Tab Item ── */
.nt-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid var(--fms-tab-inactive-border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: var(--fms-tab-inactive-bg);
  color: var(--fms-tab-inactive-text);
  transition: all 0.15s ease;
  user-select: none;
  max-width: 200px;
  flex-shrink: 0;
}

.nt-tab:hover {
  background: var(--fms-tab-hover-bg);
  color: var(--fms-tab-hover-text);
}

.nt-tab.active {
  background: var(--fms-tab-active-bg);
  color: var(--fms-tab-active-text);
  border-top: 2.5px solid var(--fms-tab-active-border);
  border-left-color: rgba(50, 108, 202, 0.2);
  border-right-color: rgba(50, 108, 202, 0.2);
  font-weight: 600;
  box-shadow: 0 -1px 4px rgba(50, 108, 202, .10);
}

.nt-icon {
  font-size: 16px !important;
  opacity: 0.75;
  line-height: 1;
}

.nt-tab.active .nt-icon {
  opacity: 1;
  color: var(--fms-tab-active-text);
}

.nt-title {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
  line-height: 1.3;
}

/* ── Tab Close Button ── */
.nt-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  font-size: 14px;
  line-height: 1;
  color: #8a9eb0;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.12s ease;
  padding: 0;
  margin-left: 2px;
  flex-shrink: 0;
}

.nt-close:hover {
  background: rgba(50, 108, 202, .18);
  color: var(--fms-tab-active-text);
}

/* ── Tab Overflow Dropdown Button & Menu ("2 ∨") ── */
.nt-overflow-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 4px;
  margin-right: 4px;
  flex-shrink: 0;
}

.nt-overflow-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 28px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.nt-overflow-btn:hover,
.nt-overflow-btn.active {
  background: #e2e8f0;
  color: #1e293b;
  border-color: #94a3b8;
}

.nt-overflow-count {
  font-size: 12px;
  font-family: inherit;
}

.nt-overflow-arrow {
  font-size: 16px !important;
  line-height: 1;
  transition: transform 0.2s ease;
}

.nt-overflow-btn.active .nt-overflow-arrow {
  transform: rotate(180deg);
}

.dark .nt-overflow-btn {
  background: #334155;
  color: #cbd5e1;
  border-color: #475569;
}

.dark .nt-overflow-btn:hover,
.dark .nt-overflow-btn.active {
  background: #475569;
  color: #f8fafc;
  border-color: #64748b;
}

/* ── Overflow Menu Dropdown ── */
.nt-overflow-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 220px;
  max-width: 280px;
  max-height: 380px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 99999;
  overflow: hidden;
  animation: ntMenuFadeIn 0.15s ease forwards;
}

@keyframes ntMenuFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.dark .nt-overflow-menu {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.nt-overflow-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dark .nt-overflow-menu-header {
  background: #0f172a;
  border-color: #334155;
  color: #94a3b8;
}

.nt-overflow-close-all {
  font-size: 11px;
  font-weight: 600;
  color: #ef4444;
  background: none;
  border: none;
  cursor: pointer;
  text-transform: none;
  padding: 0;
}

.nt-overflow-close-all:hover {
  text-decoration: underline;
}

.nt-overflow-menu-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0;
}

.nt-overflow-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 12.5px;
  color: #334155;
  cursor: pointer;
  transition: background 0.1s ease;
  user-select: none;
}

.nt-overflow-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.nt-overflow-item.active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.dark .nt-overflow-item {
  color: #cbd5e1;
}

.dark .nt-overflow-item:hover {
  background: #334155;
  color: #f8fafc;
}

.dark .nt-overflow-item.active {
  background: rgba(30, 58, 138, 0.4);
  color: #60a5fa;
}

.nt-overflow-item-icon {
  font-size: 16px !important;
  opacity: 0.7;
  flex-shrink: 0;
}

.nt-overflow-item.active .nt-overflow-item-icon {
  opacity: 1;
  color: #2563eb;
}

.dark .nt-overflow-item.active .nt-overflow-item-icon {
  color: #60a5fa;
}

.nt-overflow-item-title {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nt-overflow-active-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
  flex-shrink: 0;
}

.dark .nt-overflow-active-dot {
  background: #60a5fa;
}

.nt-overflow-item-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  font-size: 14px;
  line-height: 1;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.1s ease;
  flex-shrink: 0;
}

.nt-overflow-item:hover .nt-overflow-item-close {
  opacity: 1;
}

.nt-overflow-item-close:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* ==========================================================================
   Top-Right Actions: Status Badge & Notification Center
   ========================================================================== */

.nt-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  position: relative;
  padding-bottom: 2px;
}

/* ── Status Badge (Coretax Online) ── */
.nt-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  font-size: 11.5px;
  font-weight: 600;
  color: #065f46;
  user-select: none;
}

.nt-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: nt-pulse 2s infinite ease-in-out;
}

@keyframes nt-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}

.dark .nt-status-badge {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

/* ── Notification Bell Container ── */
.nt-notif-container {
  position: relative;
}

.nt-notif-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--fms-tab-inactive-bg);
  border: 1px solid var(--fms-tab-inactive-border);
  color: var(--fms-tab-inactive-text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nt-notif-btn:hover,
.nt-notif-btn.active {
  background: var(--fms-tab-hover-bg);
  color: var(--fms-tab-active-text);
  border-color: rgba(50, 108, 202, 0.3);
}

.nt-notif-bell {
  font-size: 20px !important;
  line-height: 1;
}

.nt-notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 10px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--fms-tab-bar-bg);
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.4);
  animation: nt-badge-pop 0.3s ease;
}

@keyframes nt-badge-pop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.nt-notif-badge.hidden {
  display: none;
}

/* ── Notification Dropdown ── */
.nt-notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 24px);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.15), 0 4px 10px -2px rgba(0, 0, 0, 0.08);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: nt-dropdown-in 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes nt-dropdown-in {
  0% { opacity: 0; transform: translateY(-8px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.dark .nt-notif-dropdown {
  background: #0f172a;
  border-color: #1e293b;
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.5);
}

.nt-notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.dark .nt-notif-head {
  background: #1e293b;
  border-bottom-color: #334155;
}

.nt-notif-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.dark .nt-notif-title {
  color: #f8fafc;
}

.nt-notif-subtitle {
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
}

.dark .nt-notif-subtitle {
  color: #94a3b8;
}

.nt-notif-mark-read {
  font-size: 11px;
  font-weight: 600;
  color: var(--fms-tab-active-text);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  transition: all 0.12s ease;
}

.nt-notif-mark-read:hover {
  background: rgba(50, 108, 202, 0.1);
  text-decoration: underline;
}

.dark .nt-notif-mark-read {
  color: #60a5fa;
}

.nt-notif-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  overflow-x: auto;
}

.dark .nt-notif-tabs {
  background: #0f172a;
  border-bottom-color: #1e293b;
}

.nt-notif-filter {
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.nt-notif-filter:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.nt-notif-filter.active {
  background: rgba(50, 108, 202, 0.12);
  color: var(--fms-tab-active-text);
  border-color: rgba(50, 108, 202, 0.25);
  font-weight: 600;
}

.dark .nt-notif-filter {
  color: #94a3b8;
}

.dark .nt-notif-filter:hover {
  background: #1e293b;
  color: #f1f5f9;
}

.dark .nt-notif-filter.active {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.3);
}

.nt-notif-list {
  max-height: 330px;
  overflow-y: auto;
  padding: 4px 0;
  scrollbar-width: thin;
}

.nt-notif-list::-webkit-scrollbar {
  width: 4px;
}

.nt-notif-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.nt-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.1s ease;
}

.dark .nt-notif-item {
  border-bottom-color: #1e293b;
}

.nt-notif-item:hover {
  background: #f8fafc;
}

.dark .nt-notif-item:hover {
  background: #1e293b;
}

.nt-notif-item.unread {
  background: #f0f7ff;
}

.dark .nt-notif-item.unread {
  background: rgba(30, 58, 138, 0.25);
}

.nt-notif-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nt-notif-icon-box span {
  font-size: 18px !important;
}

.nt-notif-icon-box.warning {
  background: #fef3c7;
  color: #b45309;
}

.nt-notif-icon-box.success {
  background: #dcfce7;
  color: #15803d;
}

.nt-notif-icon-box.info {
  background: #dbeafe;
  color: #1d4ed8;
}

.nt-notif-body {
  flex-grow: 1;
  min-width: 0;
}

.nt-notif-item-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.dark .nt-notif-item-title {
  color: #f8fafc;
}

.nt-notif-item-desc {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.35;
  margin-top: 2px;
}

.dark .nt-notif-item-desc {
  color: #94a3b8;
}

.nt-notif-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 10.5px;
  color: #94a3b8;
}

.nt-notif-unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fms-tab-active-text);
  flex-shrink: 0;
  margin-top: 6px;
}

.nt-notif-empty {
  padding: 28px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
}

.nt-notif-empty span {
  font-size: 32px !important;
  display: block;
  margin-bottom: 6px;
  opacity: 0.5;
}

.nt-notif-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
  color: #64748b;
}

.dark .nt-notif-foot {
  background: #1e293b;
  border-top-color: #334155;
  color: #94a3b8;
}

.nt-notif-foot-link {
  font-weight: 600;
  color: var(--fms-tab-active-text);
  text-decoration: none;
  transition: color 0.12s ease;
}

.nt-notif-foot-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* ==========================================================================
   Row 2: Secondary Sub-Tab Bar (#neoerp-subtabbar)
   ========================================================================== */

#neoerp-subtabbar {
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: var(--fms-tab-active-bg);
  border-bottom: 1px solid rgba(99, 135, 210, 0.25);
  min-height: 32px;
  position: sticky;
  top: 42px;
  z-index: 39;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 2px;
  flex-shrink: 0;
}

#neoerp-subtabbar::-webkit-scrollbar {
  display: none;
}

/* ── Sub-Tab Item ── */
.nt-subtab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  color: var(--fms-tab-inactive-text);
  background: transparent;
  border-bottom: 2px solid transparent;
  transition: all 0.13s ease;
  user-select: none;
  flex-shrink: 0;
}

.nt-subtab:hover {
  background: rgba(99, 135, 210, 0.10);
  color: var(--fms-tab-hover-text);
}

/* Exact matching user screenshot: Amber/Warm bottom line & highlight */
.nt-subtab.active {
  color: var(--fms-tab-active-text);
  border-bottom: 2.5px solid #f59e0b;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.08);
}

.nt-subicon {
  font-size: 14px !important;
  opacity: 0.7;
  line-height: 1;
}

.nt-subtab.active .nt-subicon {
  opacity: 1;
  color: var(--fms-tab-active-text);
}

.nt-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
  line-height: 1.3;
}

/* ── Sub-Tab Close Button ── */
.nt-subclose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  font-size: 12px;
  line-height: 1;
  color: #8a9eb0;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.12s ease;
  padding: 0;
  margin-left: 2px;
  flex-shrink: 0;
}

.nt-subclose:hover {
  background: rgba(245, 158, 11, 0.20);
  color: #b45309;
}

/* ── Sub-Tab Quick Add Button ("+ Data Baru") ── */
.nt-subtab-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fms-tab-active-text);
  background: #f0f7ff;
  border: 1px solid rgba(50, 108, 202, 0.35);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.nt-subtab-add:hover {
  background: var(--fms-tab-active-text);
  color: #ffffff;
  border-color: var(--fms-tab-active-text);
}

.dark .nt-subtab-add {
  background: rgba(50, 108, 202, 0.2);
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.3);
}

.dark .nt-subtab-add:hover {
  background: #3b82f6;
  color: #ffffff;
}
/* FMS Python 3.11 Unfold 0.91 Sidebar & Main Flex Width Fix */
@media (min-width: 768px) {
  #page > div.relative:first-child { width: 260px !important; min-width: 260px !important; max-width: 260px !important; flex-shrink: 0 !important; }
  #nav-sidebar { width: 260px !important; min-width: 260px !important; max-width: 260px !important; }
  #main { flex: 1 1 0% !important; min-width: 0 !important; position: relative !important; }
}
body.sidebar-collapsed #page > div.relative:first-child,
body.sidebar-collapsed #nav-sidebar {
  width: 58px !important; min-width: 58px !important; max-width: 58px !important;
}
