/* =============================================================================
   HALOPALAR eHRD - ENTERPRISE EXECUTIVE BI DASHBOARD LAYOUT & DESIGN SYSTEM
   ============================================================================= */

:root {
  --color-primary: #0B2545;
  --color-primary-dark: #071930;
  --color-bg-main: #FFFFFF;
  --color-bg-card: #F8FAFC;
  --color-bg-subtle: #F1F5F9;
  --color-border: #E2E8F0;
  
  --color-text-main: #0F172A;
  --color-text-muted: #475569;
  --color-text-light: #94A3B8;
  
  --color-warning: #F97316;
  --color-success: #10B981;
  --color-danger: #EF4444;
  
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sidebar-width: 260px;
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-family);
  background-color: #F1F5F9 !important;
  color: var(--color-text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* GLOBAL UNRESTRICTED APP CONTAINER */
#app, .app-layout {
  display: flex;
  width: 100vw;
  min-height: 100vh;
  box-sizing: border-box;
  background-color: #F1F5F9;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Container Tab Sub-Menu Modal */
.sub-menu-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  border-bottom: 2px solid #E2E8F0;
  margin-bottom: 16px;
}

.sub-menu-container .tab-btn,
.sub-menu-container button {
  background: #F1F5F9 !important;
  color: #475569 !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 10px !important;
  padding: 10px 16px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease-in-out !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

.sub-menu-container .tab-btn:hover,
.sub-menu-container button:hover {
  background: #E2E8F0 !important;
  color: #0F172A !important;
}

.sub-menu-container .tab-btn.active,
.sub-menu-container button.active {
  background: #0F172A !important;
  color: #FFFFFF !important;
  border-color: #0F172A !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25) !important;
  transform: translateY(-1px);
}

/* 1. SIDEBAR KIRI (FIXED 260px) */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  background: #1E2226;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.sidebar.hidden {
  transform: translateX(-100%);
}

.sidebar-header {
  padding: 20px 18px 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-link {
  display: inline-block;
  text-decoration: none;
}

.sidebar-logo {
  max-height: 48px;
  width: auto;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.sidebar-notif-btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s ease;
}

.sidebar-notif-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.notif-red-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background-color: var(--color-danger);
  border: 1.5px solid #1E2226;
  border-radius: 50%;
  display: none;
}

.notif-red-dot.active {
  display: block;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-section-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94A3B8;
  padding: 12px 12px 4px 12px;
  letter-spacing: 0.8px;
  opacity: 0.8;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: #CBD5E1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.nav-item i {
  font-size: 15px;
  width: 20px;
  text-align: center;
}

.nav-item:hover, .nav-item.active {
  background-color: #2A3036;
  color: #FFFFFF;
  border-left-color: #009F4D;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.sidebar-footer-profile {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: block;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.sidebar-footer-profile:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-collapse-toggle-btn {
  position: absolute;
  right: -28px;
  top: 50vh;
  transform: translateY(-50%);
  width: 28px !important;
  height: 56px !important;
  min-width: 28px;
  min-height: 56px;
  background: #0B2545;
  color: #60A5FA;
  border: 1.5px solid #1E3A8A;
  border-left: none;
  border-radius: 0 10px 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 3px 0 12px rgba(0, 0, 0, 0.35);
  padding: 0;
  font-size: 12px;
  transition: background 0.2s ease, width 0.2s ease, box-shadow 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.sidebar-collapse-toggle-btn:hover {
  background: #1E3A8A;
  color: #FFFFFF;
  width: 36px !important;
  box-shadow: 3px 0 16px rgba(37, 99, 235, 0.5);
}

.sidebar-clock-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.sidebar-clock-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.sidebar-expand-tab-btn {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 28px !important;
  height: 56px !important;
  min-width: 28px;
  min-height: 56px;
  background: #0B2545;
  color: #60A5FA;
  border: 1.5px solid #1E3A8A;
  border-left: none;
  border-radius: 0 10px 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99999;
  box-shadow: 3px 0 12px rgba(0, 0, 0, 0.35);
  padding: 0;
  font-size: 12px;
  transition: background 0.2s ease, width 0.2s ease, box-shadow 0.2s ease;
  animation: sidebarTabPulse 2.5s ease-in-out infinite;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@keyframes sidebarTabPulse {
  0%, 100% { box-shadow: 3px 0 12px rgba(0,0,0,0.35); }
  50% { box-shadow: 3px 0 22px rgba(37, 99, 235, 0.65); }
}

.sidebar-expand-tab-btn:hover {
  background: #1E3A8A;
  color: #FFFFFF;
  width: 36px !important;
  box-shadow: 3px 0 16px rgba(37, 99, 235, 0.5);
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

/* MAIN WRAPPER BASE */
.main-wrapper {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #F1F5F9;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: margin-left, width;
}

.sticky-announcement-banner {
  display: none !important;
}

.main-content, #app-content {
  flex: 1;
  width: 100%;
  min-width: 0;
}

.app-view {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: block;
  box-sizing: border-box;
}

/* CARDS & METRICS */
.metrics-grid, .exec-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* ALL METRIC CARDS: SOFT PASTEL LIGHT BLUE */
.metric-card, .exec-metric-card,
.metric-card:nth-child(1), .exec-metric-card:nth-child(1), .exec-metric-card.widget-working,
.metric-card:nth-child(2), .exec-metric-card:nth-child(2), .exec-metric-card.widget-late,
.metric-card:nth-child(3), .exec-metric-card:nth-child(3), .exec-metric-card.widget-alpha,
.metric-card:nth-child(4), .exec-metric-card:nth-child(4), .exec-metric-card.widget-leave {
  background: linear-gradient(135deg, #F0F7FF 0%, #E0F2FE 100%) !important;
  border: 1.5px solid #BAE6FD !important;
  color: #0F172A !important;
  box-shadow: 0 4px 16px rgba(14, 116, 144, 0.08) !important;
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.metric-card:hover, .exec-metric-card:hover {
  transform: translateY(-3px) !important;
  border-color: #38BDF8 !important;
  box-shadow: 0 8px 24px rgba(14, 116, 144, 0.16) !important;
}

.metric-header, .exec-metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.metric-title, .exec-metric-title {
  font-size: 11.5px !important;
  font-weight: 800 !important;
  color: #0369A1 !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.metric-icon, .exec-metric-icon {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  color: #93C5FD !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 2px 8px rgba(14, 116, 144, 0.08) !important;
}

.metric-icon i, .exec-metric-icon i,
.exec-metric-card.widget-working .exec-metric-icon,
.exec-metric-card.widget-working .exec-metric-icon i,
.exec-metric-card.widget-late .exec-metric-icon,
.exec-metric-card.widget-late .exec-metric-icon i,
.exec-metric-card.widget-alpha .exec-metric-icon,
.exec-metric-card.widget-alpha .exec-metric-icon i,
.exec-metric-card.widget-leave .exec-metric-icon,
.exec-metric-card.widget-leave .exec-metric-icon i {
  color: #93C5FD !important;
}

.metric-value, .exec-metric-value {
  font-size: 32px !important;
  font-weight: 900 !important;
  color: #0B2545 !important;
  margin-bottom: 6px !important;
  line-height: 1.1 !important;
}

.metric-sub, .exec-metric-sub {
  font-size: 11.5px !important;
  color: #475569 !important;
  font-weight: 600 !important;
}

.metric-sub a, .exec-metric-sub a {
  color: #0284C7 !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
}

.active-comp-pill {
  display: inline-block;
  background: #FFFFFF !important;
  color: #0369A1 !important;
  border: 1px solid #BAE6FD !important;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
  margin: 2px 3px 0 0;
  box-shadow: 0 1px 3px rgba(14, 116, 144, 0.06);
}

.active-comp-pill:hover {
  background: #E0F2FE !important;
  border-color: #38BDF8 !important;
}

.dashboard-grid, .exec-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
}

@media (max-width: 1200px) {
  .dashboard-grid, .exec-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
   TAMBAHAN FIX: SEMBUNYIKAN TOMBOL EXPAND SIDEBAR DI MOBILE / STAFF VIEW
   ============================================================================= */
@media (max-width: 1023px), (pointer: coarse) {
  #sidebar-expand-tab-btn {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* Padding & Margin Pembungkus Layar Mobile (10px atas, 16px samping) */
@media (max-width: 1023px) {
  .main-content, 
  #app-content,
  .staff-pwa-wrapper {
    padding: 5px 4px 4px 4px !important;
    box-sizing: border-box !important;
  }
}

.hero-profile-card {
  background: linear-gradient(135deg, #0B2545 0%, #1E3A8A 100%);
  color: #FFFFFF;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(11, 37, 69, 0.15);
}

.hero-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.hero-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  object-fit: cover;
}

.hero-info h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 2px;
}

.hero-info p {
  font-size: 12.5px;
  opacity: 0.85;
}

.widget-card {
  background-color: var(--color-bg-main);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 14px rgba(11, 37, 69, 0.04);
}

.btn-fancy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-fancy-primary { background: #2563EB; color: #FFFFFF; }
.btn-fancy-primary:hover { background: #1D4ED8; }
.btn-fancy-danger { background: #EF4444; color: #FFFFFF; }
.btn-fancy-danger:hover { background: #DC2626; }
.btn-fancy-outline { background: #FFFFFF; color: var(--color-primary); border: 1.5px solid var(--color-border); }
.btn-fancy-outline:hover { background: #F1F5F9; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-main);
}

.form-control {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--color-border);
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  background: #FFFFFF;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  line-height: 1.3;
}

select, select.form-control, input.form-control {
  box-sizing: border-box;
  line-height: 1.3;
}

select.form-control {
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 8px;
  padding-right: 24px;
}

.form-control:focus {
  outline: none;
  border-color: #2563EB;
}

.data-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  background: #FFFFFF;
}

.data-table th {
  background: #F8FAFC;
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--color-text-muted);
  border-bottom: 1.5px solid var(--color-border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-main);
  vertical-align: top;
}

/* Zebra Striping Alternate Rows */
.data-table tbody tr:nth-child(odd) {
  background-color: #FFFFFF !important;
}

.data-table tbody tr:nth-child(even) {
  background-color: #F0F0F0 !important;
}

.data-table .form-control {
  padding: 6px 10px;
  box-sizing: border-box;
  line-height: 1.3;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-success { background-color: #D1FAE5; color: #065F46; }
.badge-warning { background-color: #FFEDD5; color: #9A3412; }
.badge-danger  { background-color: #FEE2E2; color: #991B1B; }
.badge-info    { background-color: #E0F2FE; color: #075985; }

.hidden { display: none !important; }

/* MODALS */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(11, 37, 69, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  background: #FFFFFF;
  border-radius: 24px;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(11, 37, 69, 0.25);
  transform: scale(0.95);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.modal-backdrop.active .modal-window {
  transform: scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-primary);
}

.modal-close-btn {
  background: var(--color-bg-subtle);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 16px;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.mobile-top-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 2px 8px rgba(11, 37, 69, 0.05);
}

.hamburger-btn {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #0B2545;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 37, 69, 0.5);
  backdrop-filter: blur(3px);
  z-index: 998;
}

.sidebar-overlay.open {
  display: block;
}

.version-badge-footer {
  position: fixed;
  bottom: 8px;
  right: 12px;
  background: rgba(11, 37, 69, 0.88);
  color: #93C5FD;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  z-index: 99999;
  pointer-events: none;
  border: 1px solid rgba(147, 197, 253, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.5px;
  font-family: monospace;
}


/* =============================================================================
   1. DESKTOP EXECUTIVE & ADMIN VIEW (>= 1024px)
   ============================================================================= */
@media (min-width: 1024px) {
  .main-content, 
  #app-content {
    padding: 32px 40px !important;
    max-width: 1600px;
    margin: 0 auto;
  }

  /* Offset only when a visible sidebar is actually rendered (logged-in shell).
     Unscoped, this pushed the logged-out auth screen 260px off-center. */
  .sidebar:not(.collapsed) ~ .main-wrapper {
    margin-left: var(--sidebar-width, 260px) !important;
    width: calc(100% - var(--sidebar-width, 260px)) !important;
  }

  .sidebar.collapsed ~ .main-wrapper,
  .sidebar.hidden ~ .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .version-badge-footer {
    display: block !important;
  }
}


/* =============================================================================
   2. STAFF VIEW / MOBILE PWA (< 1024px ATAU THEME STAFF)
   ============================================================================= */
@media (max-width: 1023px) {
  .mobile-top-header {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 999;
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .sidebar-expand-tab-btn {
    width: 40px !important;
    min-width: 40px !important;
    height: 50px !important;
    min-height: 50px !important;
    font-size: 14px !important;
    display: flex !important;
  }

  .main-content, 
  #app-content,
  .staff-pwa-wrapper,
  .staff-pwa-container {
    padding: 4px 4px 4px 4px !important;
    width: 100% !important;
  }
  
  .app-view {
    padding: 0 !important;
  }

  .metrics-grid, .exec-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .version-badge-footer,
  #app-version-tag {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .metrics-grid, .exec-metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* Sembunyikan version number dan paksa margin tipis jika user role staff */
body.theme-staff .version-badge-footer,
body.theme-staff #app-version-tag,
.staff-pwa-wrapper .version-badge-footer {
  display: none !important;
}

body.theme-staff .main-content,
body.theme-staff #app-content {
  padding: 10px 14px !important;
}

/* SURAT PERINGATAN (SP) NOTIFICATION DARK STYLING (v3.9.06) */
.notif-sp-card,
div[data-sp="true"] {
  background-color: #0F172A !important;
  color: #FFFFFF !important;
  border-left-color: #EF4444 !important;
}

.notif-sp-card strong,
.notif-sp-card p,
.notif-sp-card div {
  color: #FFFFFF !important;
}

.badge-bell-container {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 6px !important;
  flex-wrap: wrap !important;
}

.badge-bell-icon {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  border-radius: 6px !important;
  padding: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  cursor: help !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12) !important;
  box-sizing: border-box !important;
}

.badge-bell-icon:hover {
  transform: scale(1.2) !important;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25) !important;
}

/* =============================================================================
   3. GLOBAL HEADER & USER AVATAR RESTRICTIONS (v3.9.84)
   ============================================================================= */
#global-header, .header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  position: sticky;
  top: 0;
  z-index: 100;
}

#global-header.hidden, .header.hidden {
  display: none !important;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.sidebar-toggle {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #475569;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: none;
}

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

.page-title {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
}

.page-subtitle {
  font-size: 11.5px;
  color: #64748B;
  font-weight: 600;
}

.header-icon-btn {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.header-icon-btn:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

#header-user-avatar, .user-avatar {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 1.5px solid #E2E8F0;
  background-color: #E2E8F0;
  display: block !important;
  flex-shrink: 0;
}

.user-info-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
}

.user-role-badge {
  font-size: 11px;
  color: #64748B;
  font-weight: 600;
}

@media (max-width: 1023px) {
  #global-header, .header {
    display: none !important;
  }
}