*{margin:0;padding:0;box-sizing:border-box;font-family:'Inter',sans-serif}
body{display:flex;
  background:#f4f6fa;
 min-height:100vh;
  flex-wrap:wrap;}

.sidebar{
  width:260px;background:#fff;height:100vh;border-right:1px solid #eee;
  padding:20px 15px;overflow-y:auto; position:sticky; top:0; flex-shrink:0;
  scrollbar-width: thin;
}
.logo{display:flex;align-items:center;gap:10px;font-weight:600;font-size:18px;margin-bottom:20px}
.logo span{color:#ff3b5c}
.menu-title{font-size:11px;color:#999;margin:15px 10px}
.menu-item{display:flex;align-items:center;justify-content:space-between;padding:10px;border-radius:8px;margin-bottom:5px;cursor:pointer}
.menu-item:hover{background:#f1f3f7}
.menu-left{display:flex;align-items:center;gap:10px}
.submenu{margin-left:25px;display:none;}
.submenu a{display:block;padding:8px 10px;border-radius:6px;color:#eef3ff;text-decoration:none}
.submenu a.active{background:#eef3ff;color:#3b5cff}

.main{flex:1;display:flex;
  flex-direction:column;
  min-height:100vh; height:auto; width:calc(100% - 260px);}

.topbar{height:65px; 
  background:#fff;
  border-bottom:1px solid #eee;
  display:flex;align-items:center;
  justify-content:space-between;
  padding:0 20px;
   position:sticky;
  top:0;
  z-index:10;
}
.nav-links a{margin-right:20px;text-decoration:none;color:#333;font-size:14px}
.right-icons{display:flex;align-items:center;gap:15px}
.avatar{width:35px;height:35px;border-radius:50%;border:2px solid #00c853}

.content{padding:25px;
   overflow-y:visible;
  flex:1 0 auto;}
.header{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}
.header h2{font-size:22px}
.header p{color:#777;font-size:13px}
.btn{padding:8px 14px;border:1px solid #ddd;border-radius:8px;background:#fff;cursor:pointer}

/* Big dashboard grey box */
.dashboard-box{
  width:100%;
  height:900px;
  background:#e9ecef;
  border-radius:12px;
}

/* Footer */
.footer{
  background:#fff;
  border-top:1px solid #eee;
  padding:15px 25px;
  display:flex;
  justify-content:space-between;
  font-size:13px;
  color:#555;
  margin-top:40px;
}
.footer-links a{
  margin-left:15px;
  text-decoration:none;
  color:#555;
}


/* === Global Responsive Boilerplate === */
.menu-toggle{display:none !important;font-size:20px;cursor:pointer;color:#555;}
.mobile-logo{display:none;}
.nav-link-toggle{display:none;font-size:20px;cursor:pointer;color:#555;}

@media(max-width:900px){
  body { min-height: 100vh; display: flex; flex-wrap: wrap; }
  .main { min-height: 100vh; height: auto; display: flex; flex-direction: column; width: 100%; }
  .content { overflow-y: visible; flex: 1 0 auto; }
  .sidebar{position:fixed;left:-260px;top:0;z-index:1000;transition:.3s;height:100vh;box-shadow:5px 0 15px rgba(0,0,0,0.1);}
  .sidebar.active{left:0}
  
  .topbar {
    height: auto !important;
    padding: 15px 15px 0 15px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    position: relative;
    box-sizing: border-box;
  }
  .topbar > div:first-child { width: 100%; justify-content: space-between; }
  .topbar .right-icons { display: none; /* Hide right icons to save space, or keep them if needed */ }
  
  .topbar > div:first-child {
    display: flex;
    align-items: center;
    gap: 15px;
  }

  .mobile-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff3b5c;
    font-weight: 700;
    font-size: 20px;
  }

  .menu-toggle{display:block !important}
  .nav-link-toggle{display:block}
  
  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    overflow-x: auto;
    width: 100%;
    padding: 10px 15px;
    box-shadow: none;
    white-space: nowrap;
    border-bottom: 1px solid #f1f3f7;
    margin-top: 10px;
    gap: 15px;
  }
  .nav-links::-webkit-scrollbar { display: none; }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 8px 12px;
    margin: 0;
    color: #333;
    display: inline-flex;
    align-items: center;
    background: #f1f3f7;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
  }
  
  

  .header {
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    padding-bottom: 10px;
  }
  
  .header h2 {
    font-size: 18px !important;
  }

  .content, .main-content { padding: 15px !important; }
}

/* === Utility Classes Extracted from Inline Styles === */
.menu-item-sub { padding: 8px 10px; margin-bottom: 0; color: #555; text-decoration: none; }
.submenu-nested { margin-left: 15px; }
.submenu-active { display: block; }
.badge-soon { font-size: 10px; background: #eee; padding: 2px 6px; border-radius: 6px; }
.main-no-padding { padding: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mt-15 { margin-top: 15px !important; }






/* === Navbar & Dropdowns === */
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { margin-right: 0 !important; }
.nav-item { position: relative; }
.nav-item > a {
  text-decoration: none;
  color: #333;
  font-size: 14px;
  padding: 20px 0;
  display: block;
  font-weight: 500;
}
.nav-item:hover > a { color: #3b5cff; }
.nav-item.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 180px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  border-radius: 8px;
  padding: 8px 0;
  z-index: 1000;
  border: 1px solid #eee;
  margin-top: -10px;
}
.dropdown-menu a {
  display: block;
  padding: 8px 16px;
  color: #555;
  text-decoration: none;
  font-size: 13px;
  transition: 0.2s;
}
.dropdown-menu a:hover {
  background: #f8f9fa;
  color: #3b5cff;
}

@media(max-width:900px){
  .nav-item > a { padding: 8px 12px; background: #f1f3f7; border-radius: 6px; }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    margin-top: 5px;
    background: transparent;
    padding-left: 10px;
  }
  .nav-item.dropdown:hover .dropdown-menu { display: block; }
}
/* Fix for pages using .main-wrapper so they can scroll */
.main-wrapper, .main-content {
    min-height: 100vh;
    height: auto;
    overflow-y: visible;
}

/* === Sidebar Logo: Red Square Box === */
.sidebar .logo span {
    background: #e8112d !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    width: 34px !important;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    letter-spacing: 0 !important;
}
.sidebar .logo {
    color: #181C32 !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    gap: 10px !important;
    display: flex !important;
    align-items: center !important;
}
.sidebar .menu-item {
    color: #3F4254 !important;
    font-weight: 500 !important;
    font-size: 13.5px !important;
    padding: 9px 10px !important;
}
.sidebar .menu-left i {
    color: #5E6278 !important;
    font-size: 16px !important;
    width: 22px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
}
.sidebar .menu-item .fa-plus, .sidebar .menu-item .fa-minus {
    color: #5E6278 !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
}
.sidebar .menu-title {
    color: #B5B5C3 !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    padding: 14px 10px 6px !important;
    margin: 0 !important;
}
.sidebar .menu-left:hover{
    color: #3b5cff;
}

.sidebar .menu-item:hover{
    color: #3b5cff;
}

.sidebar .menu-item i:hover{
    color: #3b5cff;
}
.sidebar .submenu a {
    color: #3F4254 !important;
    font-weight: 500 !important;
    font-size: 12.5px !important;
}
.sidebar .submenu a:hover, .sidebar .submenu a.active {
    color: #3b5cff !important;
    background: #f1f3f7 !important;
}

/* === Badge Soon — Blue Pill (matches screenshot) === */
.sidebar .badge-soon {
    color: #3b5cff !important;
    background-color: #EEF3FF !important;
    font-weight: 600 !important;
    font-size: 10.5px !important;
    padding: 3px 8px !important;
    border-radius: 20px !important;
}

/* === Global Sidebar Width & Font Standardization === */
:root {
    --sidebar-width: 260px !important;
}
.sidebar {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    font-family: 'Inter', sans-serif !important;
}
.sidebar *:not(i) {
    font-family: 'Inter', sans-serif !important;
}

/* === Reset Submenu Padding === */
.sidebar .submenu {
    padding-left: 0 !important;
}

/* === Global Responsive Fixes (Sync Breakpoints) === */
@media (max-width: 900px) {
    .main-wrapper, .main-content {
        width: 100% !important;
        padding: 0 15px !important;
        max-width: 100% !important;
    }
    .page-title-box {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }
    .page-actions {
        width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }
}

@media (max-width: 500px) {
    .support-cards {
        grid-template-columns: 1fr !important;
    }
    .table-header-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        min-width: auto !important;
    }
}

/* === Topbar Mobile Responsiveness Fix === */
@media(max-width: 900px) {
    .topbar {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 20px !important;
        height: 70px !important;
    }
    .topbar > div:first-child {
        width: auto !important;
        margin-bottom: 0 !important;
    }
    .topbar .nav-links {
        display: none !important;
    }
    .topbar .right-icons {
        display: flex !important;
        width: auto !important;
        margin-top: 0 !important;
        gap: 15px !important;
    }
}

/* === Mobile Content Padding Fix === */
@media(max-width: 900px) {
    .content {
        padding: 10px !important;
    }
}

/* === Push Footer to Bottom Fix === */
.content {
    display: flex !important;
    flex-direction: column !important;
}
.footer, .site-footer {
    margin-top: auto !important;
}

/* =============================================
   GLOBAL FOOTER - Layout-1
   ============================================= */
.footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 14px 28px !important;
    border-top: 1px solid #f1f1f4 !important;
    background: #fff !important;
    font-size: 13px !important;
    color: #777 !important;
    flex-shrink: 0 !important;
    margin-top: auto !important;
}

.footer .footer-brand {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    color: #555;
}

.footer .footer-brand span {
    color: #e8703a;
    font-weight: 700;
}

.footer .footer-links {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
}

.footer .footer-links a {
    color: #3b82f6 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: color 0.2s !important;
}

.footer .footer-links a:hover {
    color: #1d4ed8 !important;
}

@media (max-width: 600px) {
    .footer {
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center !important;
        padding: 14px 16px !important;
    }
    .footer .footer-links {
        gap: 14px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
}

/* =============================================
   FOOTER POSITION FIX - Full width inside .main
   ============================================= */
.main {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh;
}

.main .footer {
    width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
}

/* For pages where content scrolls, push footer below */
.main .content {
    flex: 1 !important;
}

/* =============================================
   FOOTER - DEFINITIVE POSITION FIX
   Forces footer to ALWAYS span the content area
   ============================================= */
.footer {
    width: 100%;
    margin-top: auto;
    background: #fff !important;
    border-top: 1px solid #f1f1f4 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 28px !important;
    font-size: 13px !important;
}

body > .footer, body > .site-footer {
    width: calc(100% - 260px) !important;
    margin-left: 260px !important;
    align-self: flex-end !important;
}

/* When sidebar is hidden on mobile, footer stretches full width */
@media (max-width: 900px) {
    .footer {
        padding: 10px 16px !important;
    }
    body > .footer, body > .site-footer {
        width: 100% !important;
        margin-left: 0 !important;
    }
}

@media (max-width: 600px) {
    .footer {
        flex-direction: column !important;
        gap: 8px !important;
        padding: 10px 16px !important;
        text-align: center !important;
    }
}

/* Add padding to content so footer doesn't overlap page content */
.content, .main-content, .main-wrapper {
    padding-bottom: 25px !important;
}

/* =============================================
   FOOTER/SIDEBAR STICKY GRID FIX
   Properly structure the layout using CSS Grid to 
   allow the sidebar to stick all the way to the footer.
   ============================================= */
@media (min-width: 901px) {
    body {
        display: grid !important;
        grid-template-columns: 260px minmax(0, 1fr) !important;
        grid-template-rows: 1fr auto !important;
        align-items: start;
    }
    .sidebar {
        grid-column: 1 / 2 !important;
        grid-row: 1 / 3 !important;
        width: 100% !important;
        height: 100vh !important;
    }
    .main {
        grid-column: 2 / 3 !important;
        grid-row: 1 / 2 !important;
        width: 100% !important;
        min-height: 100vh !important;
    }
    body > .footer, body > .site-footer {
        grid-column: 2 / 3 !important;
        grid-row: 2 / 3 !important;
        width: 100% !important;
        margin-left: 0 !important;
    }
}

/* === Topbar right-icons: keep all icons in a horizontal row === */
.topbar .right-icons {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  flex-shrink: 0;
}
.topbar .right-icons > div {
  display: flex !important;
  align-items: center !important;
  position: relative;
}
.search-popup {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  z-index: 9999 !important;
}

/* === Profile Popup === */
.profile-popup {
  position: absolute !important;
  top: calc(100% + 15px) !important;
  right: 0 !important;
  z-index: 9999 !important;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  width: 280px;
  padding: 15px;
  display: none;
  border: 1px solid #f1f1f4;
  font-family: 'Inter', sans-serif;
}
.profile-popup.active {
  display: block;
}
.profile-popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}
.profile-popup-header img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid #10b981;
}
.profile-popup-info h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111;
}
.profile-popup-info p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #555;
}
.profile-popup-pro {
  background: #eff6ff;
  color: #3b82f6;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  margin-left: auto;
}
.profile-popup-divider {
  height: 1px;
  background: #f1f1f4;
  margin: 10px -15px;
}
.profile-popup-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.profile-popup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-radius: 8px;
  color: #111;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s;
}
.profile-popup-item:hover {
  background: #f9f9f9;
}
.profile-popup-item i:first-child {
  color: #6b7280;
  font-size: 18px;
  width: 22px;
  text-align: center;
}
.profile-popup-item-right {
  margin-left: auto;
  color: #9ca3af;
}
.profile-popup-lang {
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: #111;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.profile-popup-btn {
  display: block;
  width: 100%;
  padding: 12px;
  text-align: center;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 15px;
  transition: 0.2s;
}
.profile-popup-btn:hover {
  background: #f9f9f9;
}

/* Toggle Switch */
.theme-switch {
  position: relative;
  width: 40px;
  height: 22px;
  display: inline-block;
}
.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.theme-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #e5e7eb;
  transition: .4s;
  border-radius: 20px;
}
.theme-slider:before {
  position: absolute;
  content: '';
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.theme-switch input:checked + .theme-slider {
  background-color: #10b981;
}
.theme-switch input:checked + .theme-slider:before {
  transform: translateX(18px);
}

/* --- SEARCH POPUP STYLES (Moved to global) --- */
.search-popup { display:none; position:absolute; top:calc(100% + 14px); right:-10px; width:550px; max-width:95vw; background:#fff; border-radius:14px; box-shadow:0 12px 40px rgba(0,0,0,0.12); border:1px solid #f1f1f4; z-index:9999; overflow:hidden; }
.search-popup.active { display:block; animation:fadeIn 0.18s ease; }
.search-box-header { display:flex; align-items:center; gap:12px; padding:14px 18px; border-bottom:1px solid #f1f1f4; }
.search-box-header input { flex:1; border:none; outline:none; font-size:14px; color:#111; background:transparent; }
.search-box-header i { color:#9ca3af; font-size:16px; }
.search-tabs-container { display:flex; align-items:center; justify-content:space-around;  overflow-x: auto;  flex-wrap:nowrap; }
.search-tabs { display:flex; align-items:center; scrollbar-width: none; }
.search-tabs span { padding:10px 12px; font-size:13px; font-weight:500; color:black; cursor:pointer; border-bottom:2px solid transparent; white-space:nowrap; flex-shrink:0; }
.search-tabs span.active { color:#3b82f6; border-bottom-color:#3b82f6; font-weight:600; }
.search-tabs-container > div > i, .search-tabs-container > i { color:#999; cursor:pointer; font-size:16px; flex-shrink:0; }
.search-content { padding:10px 0; max-height:500px; overflow-y:auto; }
.search-section { padding:8px 0; border-bottom:1px solid #f9fafb; }
.section-title { font-size:11px; font-weight:700; color:#9ca3af; text-transform:uppercase; letter-spacing:.7px; padding:4px 18px 6px; margin:0; }
.search-item { display:flex; align-items:center; gap:12px; padding:9px 18px; cursor:pointer; }
.search-item:hover,.search-item.active { background:#f9fafb; }
.settings-icon { font-size:15px; color:#6b7280; width:20px; text-align:center; }
.settings-text { font-size:13px; font-weight:500; color:#111; }
.complex-item { justify-content:space-between; }
.item-left { display:flex; align-items:center; gap:12px; }
.logo-circle { width:42px; height:42px; border-radius:10px; border:1px solid #e5e7eb; display:flex; align-items:center; justify-content:center; background:#f9fafb; flex-shrink:0; font-size:20px; }
.item-title { font-size:13px; font-weight:600; color:#111; }
.item-subtitle { font-size:12px; color:#6b7280; margin-top:2px; }
.item-actions { display:flex; align-items:center; gap:6px; flex-shrink:0; }
.avatar-group { display:flex; align-items:center; }
.avatar-group img { width:28px; height:28px; border-radius:50%; border:2px solid #fff; margin-left:-8px; object-fit:cover; }
.avatar-group img:first-child { margin-left:0; }
.more-badge { width:28px; height:28px; border-radius:50%; background:#22c55e; color:#fff; font-size:10px; font-weight:700; display:flex; align-items:center; justify-content:center; margin-left:-8px; border:2px solid #fff; }
.user-avatar-large { width:38px; height:38px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.status-badge { display:flex; align-items:center; gap:8px; }
.badge-pill { font-size:12px; font-weight:600; padding:4px 10px; border-radius:20px; display:flex; align-items:center; gap:6px; }
.badge-pill.in-office { background:#ecfdf5; color:#10b981; border:1px solid #a7f3d0; }
.badge-pill.in-office .dot { background:#10b981; }
.badge-pill.on-leave { background:#fef2f2; color:#ef4444; border:1px solid #fecaca; }
.badge-pill.on-leave .dot { background:#ef4444; }
.badge-pill.remote { background:#eff6ff; color:#3b82f6; border:1px solid #bfdbfe; }
.badge-pill.remote .dot { background:#3b82f6; }
.badge-pill .dot { width:6px; height:6px; border-radius:50%; display:inline-block; }
.dots-icon { color:#999; font-size:14px; }
.file-icon { width:40px; height:40px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:800; color:#fff; letter-spacing:.5px; flex-shrink:0; }
.file-icon.pdf { background:#ef4444; } .file-icon.doc { background:#3b82f6; } .file-icon.js { background:#22c55e; } .file-icon.ai { background:#f97316; } .file-icon.php { background:#8b5cf6; }
.tab-content { display:none; } .tab-content.active { display:block; }
.settings-popup { position:absolute; top:calc(100% + 15px); right:-10px; width:260px; background:#fff; border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,0.1); border:1px solid #f1f1f4; display:none; z-index:10000; padding:12px 0; }
.settings-popup.active { display:block; animation:fadeIn 0.15s ease; }
.settings-header { font-size:12px; font-weight:600; color:#111; padding:4px 20px 8px; }
/* SETTINGS ITEM */
.settings-item { display:flex; align-items:center; gap:14px; padding:14px 18px; cursor:pointer; border-radius:10px; transition:0.2s; }
.settings-item:hover { background:#f5f7ff; }
.settings-left { display:flex; align-items:center; gap:14px; }
.settings-left i { position:static !important; width:18px; min-width:18px; text-align:center; font-size:15px; color:#777; }
.settings-item i { width:20px; min-width:20px; font-size:16px; color:#777; display:flex; align-items:center; justify-content:center; line-height:0; }
.settings-item span { font-size:15px; font-weight:500; color:#222; line-height:1; }


/* --- Custom Action Menu (Overrides Settings Popup) --- */
.custom-action-menu {
  width: 160px !important;
  padding: 8px 0 !important;
}
.action-menu-item {
  display: flex;
  align-items: center;
  margin: 0 8px; /* Padding on sides to allow rounded corners */
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  font-weight: 600;
  transition: 0.2s;
  position: relative;
  gap: 12px;
  margin-bottom: 2px;
}
.action-menu-item:hover {
  background: #f3f4f6;
}
/* Blue hover for has-submenu or specific active states */
.has-submenu:hover {
  background: #eff6ff;
  color: #3b82f6;
}
.has-submenu:hover i {
  color: #3b82f6 !important;
}

.action-menu-item i:first-child {
  font-size: 16px;
  color: #6b7280;
  width: 18px;
  text-align: center;
}
.action-menu-right {
  margin-left: auto;
  font-size: 11px;
  color: #9ca3af;
}
.has-submenu .action-submenu {
  display: none;
  position: absolute;
  top: -8px;
  right: calc(100% + 4px); /* Opens to the left */
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border: 1px solid #f1f1f4;
  width: 150px;
  padding: 8px 0;
  z-index: 10001;
}
.has-submenu:hover .action-submenu {
  display: block;
  animation: fadeIn 0.15s ease;
}


/* --- Notifications Popup --- */
.notif-popup {
  position: absolute;
  top: calc(100% + 20px);
  right: -80px;
  width: 440px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  border: 1px solid #f1f1f4;
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
  scrollbar-width: none;
}
.notif-popup.active {
  display: flex;
  animation: fadeIn 0.18s ease;
}
.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
}
.notif-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  margin: 0;
}
.notif-header i {
  color: #6b7280;
  cursor: pointer;
  font-size: 16px;
}
.notif-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  border-bottom: 1px solid #f1f1f4;
}
.notif-tab {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  padding: 12px 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  position: relative;
}
.notif-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}
.notif-tab .dot {
  position: absolute;
  top: 10px;
  right: -8px;
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
}
.notif-settings {
  margin-left: auto;
  color: #9ca3af;
  cursor: pointer;
  padding-bottom: 2px;
}
.notif-body {
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: none;
}
.notif-item {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #f9fafb;
}
.notif-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.notif-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.notif-avatar .dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #10b981;
  border: 2px solid #fff;
  border-radius: 50%;
}
.notif-content {
  flex: 1;
}
.notif-text {
  font-size: 14px;
  color: #111;
  line-height: 1.4;
  margin-bottom: 4px;
}
.notif-text span {
  font-weight: 600;
}
.notif-text a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}
.notif-meta {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
}
.notif-box {
  background: #f9fafb;
  border: 1px solid #f1f1f4;
  border-radius: 8px;
  padding: 14px;
  margin-top: 8px;
}
.notif-box-text {
  font-size: 13px;
  color: #111;
  font-weight: 500;
  margin: 0 0 12px 0;
  line-height: 1.5;
}
.notif-reply {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px 12px;
}
.notif-reply input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
}
.notif-reply i {
  color: #9ca3af;
  cursor: pointer;
}
.notif-tags {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.notif-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
}
.notif-tag.purple { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.notif-tag.yellow { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.notif-tag.gray { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }

.notif-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.notif-btn {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}
.notif-btn-outline {
  background: #fff;
  border: 1px solid #d1d5db;
  color: #374151;
}
.notif-btn-outline:hover {
  background: #f9fafb;
}
.notif-btn-solid {
  background: #111;
  border: 1px solid #111;
  color: #fff;
}
.notif-btn-solid:hover {
  background: #000;
}
.notif-footer {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-top: 1px solid #f1f1f4;
}
.notif-footer button {
  flex: 1;
  padding: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #111;
  cursor: pointer;
  transition: 0.2s;
}
.notif-footer button:hover {
  background: #f9fafb;
}

@media (max-width: 500px) {
  .notif-popup {
    position: fixed;
    top: 60px !important;
    left: 10px;
    right: 10px;
    width: auto;
  }
}


/* --- Chat Popup --- */
.cp-popup {
  position: absolute;
  top: calc(100% + 20px);
  right: -50px;
  width: 440px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  border: 1px solid #f1f1f4;
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
}
.cp-popup.active {
  display: flex;
  animation: fadeIn 0.18s ease;
}
.cp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f1f4;
}
.cp-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  margin: 0;
}
.cp-header i {
  color: #6b7280;
  cursor: pointer;
  font-size: 16px;
}
.cp-group-header {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #f1f1f4;
  gap: 12px;
}
.cp-group-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff4ee;
  border: 1px solid #ffd9c5;
}
.cp-group-logo i {
  color: #fc6d26;
  font-size: 22px;
}
.cp-group-info {
  flex: 1;
}
.cp-group-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  margin: 0 0 2px 0;
}
.cp-group-info p {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
  font-style: italic;
}
.cp-group-avatars {
  display: flex;
  align-items: center;
}
.cp-group-avatars img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -8px;
  object-fit: cover;
}
.cp-group-avatars img:first-child {
  margin-left: 0;
}
.cp-group-more {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -8px;
  border: 2px solid #fff;
}
.cp-group-dots {
  color: #9ca3af;
  margin-left: 8px;
  cursor: pointer;
}

.cp-body {
  max-height: 400px;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cp-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.cp-msg.right {
  flex-direction: row-reverse;
}
.cp-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.cp-msg-avatar-wrap {
  position: relative;
}
.cp-msg-avatar-wrap .dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #10b981;
  border: 2px solid #fff;
  border-radius: 50%;
}
.cp-bubble {
  background: #f9fafb;
  border: 1px solid #f1f1f4;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  color: #111;
  line-height: 1.5;
  max-width: 280px;
}
.cp-msg.right .cp-bubble {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.cp-msg:not(.right) .cp-bubble {
  border-top-left-radius: 4px;
}
.cp-meta {
  font-size: 11px;
  color: #6b7280;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cp-msg.right .cp-meta {
  justify-content: flex-end;
}
.cp-meta i {
  color: #10b981;
  font-size: 12px;
}

.cp-system {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  background: #f9fafb;
  border-top: 1px solid #f1f1f4;
  border-bottom: 1px solid #f1f1f4;
  align-items: center;
  margin: 0 -20px;
}
.cp-system .notif-content {
  flex: 1;
}

.cp-footer {
  padding: 16px 20px;
  border-top: 1px solid #f1f1f4;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cp-footer-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.cp-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 12px;
  gap: 8px;
}
.cp-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
}
.cp-input-wrap i {
  color: #9ca3af;
  cursor: pointer;
  font-size: 16px;
}
.cp-send {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
.cp-send:hover {
  background: #000;
}
@media (max-width: 500px) {
  .cp-popup {
    position: fixed;
    top: 60px !important;
    left: 10px;
    right: 10px;
    width: auto;
  }
}


/* ===== GLOBALLY INJECTED CHAT PANEL ===== */

.chat-panel{
    position:fixed;

    top:80px;
    right:20px;

    width:500px;

    max-width:calc(100vw - 40px);

    height:88vh;
    max-height:calc(100vh - 100px);

    background:#fff;

    border-radius:18px;
    border:1px solid #eee;

    box-shadow:0 20px 50px rgba(0,0,0,0.08);

    display:none;
    flex-direction:column;

    overflow:hidden;

    z-index:9999;
}

.chat-panel.active{
    display:flex;
}

.chat-body{
    flex:1;

    overflow-y:auto;

    min-height:0;

    padding:24px;
}

/* ===== HEADER ===== */

.chat-header{
    padding:22px;

    border-bottom:1px solid #eee;

    display:flex;
    align-items:center;
    justify-content:space-between;
}

.chat-header h3{
    font-size:18px;
}

.chat-close{
    border:none;
    background:none;

    cursor:pointer;

    color:#999;
}

/* ===== TEAM HEADER ===== */

.chat-team-header{
    padding:20px 22px;

    border-bottom:1px solid #eee;

    display:flex;
    align-items:center;
    justify-content:space-between;

    gap:20px;
}

.team-left{
    display:flex;
    align-items:center;
    gap:14px;
}

.team-logo{
    width:48px;
    height:48px;

    border-radius:50%;
}

.team-left h4{
    font-size:18px;
    color:#222;
}

.team-left p{
    margin-top:4px;

    color:#888;
    font-size:14px;
    font-style:italic;
}

/* ===== USERS ===== */

.team-right{
    display:flex;
    align-items:center;
    gap:16px;
}

.team-users{
    display:flex;
    align-items:center;
}

.team-users img{
    width:36px;
    height:36px;

    border-radius:50%;

    border:2px solid #fff;

    margin-left:-10px;
}

.team-users img:first-child{
    margin-left:0;
}

.team-users span{
    width:36px;
    height:36px;

    border-radius:50%;

    background:#16c172;
    color:#fff;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:13px;
    font-weight:700;

    border:2px solid #fff;

    margin-left:-10px;
}

.menu-btn{
    border:none;
    background:none;

    cursor:pointer;

    color:#777;
}

/* ===== CHAT BODY ===== */

.chat-body{
    flex:1;

    overflow-y:auto;

    padding:24px;
}

/* ===== MESSAGE ===== */

.message-row{
    display:flex;
    gap:14px;

    margin-bottom:26px;
}

.right-message{
    justify-content:flex-end;
}

.message-avatar{
    width:46px;
    height:46px;

    border-radius:50%;
    object-fit:cover;
}

.message-box{
    max-width:min(340px, 65vw);

    word-wrap:break-word;
}

.left-box{
    background:#f5f5f5;
    color:#333;
}

.right-box{
    background:#3b5cff;
    color:#fff;

    font-weight:600;
}

.message-time{
    display:block;

    margin-top:8px;

    font-size:14px;
    color:#888;
}

.right-time{
    text-align:right;
}

/* ===== REQUEST ===== */

.join-request{
    padding:18px 22px;

    border-top:1px solid #eee;

    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap: wrap;
    gap:20px;
}

.join-left{
    display:flex;
    align-items:center;
    gap:14px;
}

.join-avatar{
    width:48px;
    height:48px;

    border-radius:50%;
}

.join-left h4{
    font-size:16px;
    color:#222;
}

.join-left p{
    margin-top:4px;

    font-size:14px;
    color:#888;
}

/* ===== ACTIONS ===== */

.join-actions{
    display:flex;
    gap:12px;
}

.decline-btn,
.accept-btn{
    height:42px;

    padding:0 18px;

    border-radius:10px;

    font-size:15px;
    font-weight:600;

    cursor:pointer;
}

.decline-btn{
    background:#fff;
    border:1px solid #ddd;
}

.accept-btn{
    background:#111;
    color:#fff;
    border:none;
}

/* ===== FOOTER ===== */

.chat-footer{
    padding:20px;

    border-top:1px solid #eee;

    display:flex;
    align-items:center;
    gap:14px;
}

.chat-input-wrap{
    flex:1;

    height:62px;

    border:1px solid #ddd;
    border-radius:14px;

    padding:0 16px;

    display:flex;
    align-items:center;
    gap:14px;
}

.footer-avatar{
    width:40px;
    height:40px;

    border-radius:50%;
}

.chat-input-wrap input{
    flex:1;

    border:none;
    outline:none;

    font-size:16px;
}

.upload-btn{
    border:none;
    background:none;

    cursor:pointer;

    color:#777;
}

.send-btn{
    height:52px;

    padding:0 24px;

    border:none;
    border-radius:12px;

    background:#111;
    color:#fff;

    font-size:16px;
    font-weight:600;

    cursor:pointer;
}

/* ===== TABLET ===== */

@media(max-width:900px){

    .chat-panel{

        width:95vw;

        right:50%;
        transform:translateX(50%);

        top:75px;

        height:85vh;
        max-height:85vh;
    }

}

/* ===== MOBILE ===== */

@media(max-width:700px){

    .chat-panel{
        width:100%;
        height:100vh;

        top:0;
        right:0;

        border-radius:0;
    }

    .chat-body{
        padding:18px;
    }

    .message-box{
        max-width:240px;
        font-size:15px;
    }

    .join-request{
        flex-direction:column;
        align-items:flex-start;
    }

    .chat-footer{
        flex-direction:column;
    }

    .send-btn{
        width:100%;
    }

}



/* ===== GLOBALLY INJECTED TOPBAR ICON ===== */
.topbar-icon{
    position:relative;
    width:42px;
    height:42px;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:.2s;
}
.topbar-icon:hover{
    background:#f5f7ff;
}

/* ===== GLOBALLY INJECTED APPS PANEL ===== */

.apps-panel{
    position:fixed;

    top:80px;
    right:20px;

    width:420px;

    max-width:calc(100vw - 40px);

    background:#fff;

    border-radius:18px;

    border:1px solid #eee;

    box-shadow:0 20px 50px rgba(0,0,0,0.08);

    display:none;   /* IMPORTANT */

    z-index:99999;

    overflow:hidden;
}

.apps-panel.active{
    display:block;
}

.apps-header{
    padding:22px 24px;

    border-bottom:1px solid #eee;

    display:flex;
    align-items:center;
    justify-content:space-between;
}

.apps-header h3{
    font-size:22px;
    color:#222;
}

.apps-header span{
    font-size:16px;
    color:#666;
    font-weight:500;
}

/* ===== APP ITEM ===== */

.app-item{
    padding:22px 24px;

    border-bottom:1px solid #f1f1f1;

    display:flex;
    align-items:center;
    justify-content:space-between;

    gap:20px;
}

/* ===== LEFT ===== */

.app-left{
    display:flex;
    align-items:center;
    gap:18px;
}

/* ===== ICON ===== */

.app-icon{
    width:58px;
    height:58px;

    border-radius:50%;

    background:#f7f7f7;

    border:1px solid #ececec;

    display:flex;
    align-items:center;
    justify-content:center;
}

.app-icon img{
    width:28px;
    height:28px;

    object-fit:contain;
}

/* ===== TEXT ===== */

.app-left h4{
    font-size:18px;
    color:#222;
}

.app-left p{
    margin-top:4px;

    font-size:15px;
    color:#666;
}

/* ===== SWITCH ===== */

.switch{
    position:relative;

    width:48px;
    height:28px;

    display:inline-block;
}

.switch input{
    opacity:0;
    width:0;
    height:0;
}

/* ===== SLIDER ===== */

.slider{
    position:absolute;

    inset:0;

    background:#ddd;

    border-radius:999px;

    cursor:pointer;

    transition:.3s;
}

.slider::before{
    content:'';

    position:absolute;

    width:20px;
    height:20px;

    left:4px;
    top:4px;

    border-radius:50%;

    background:#fff;

    transition:.3s;
}

/* ACTIVE */

.switch input:checked + .slider{
    background:#3b5cff;
}

.switch input:checked + .slider::before{
    transform:translateX(20px);
}

/* ===== FOOTER ===== */

.apps-footer{
    padding:26px 24px;
}

.apps-footer button{
    width:100%;
    height:58px;

    border:1px solid #ddd;
    border-radius:14px;

    background:#fff;

    font-size:18px;
    font-weight:600;

    cursor:pointer;

    transition:.2s;
}

.apps-footer button:hover{
    background:#f8f9ff;
}

/* ===== MOBILE ===== */

@media(max-width:600px){

    .apps-header{
        padding:18px;
    }

    .app-item{
        padding:18px;
    }

    .app-left{
        gap:14px;
    }

    .app-icon{
        width:50px;
        height:50px;
    }

    .app-left h4{
        font-size:16px;
    }

    .app-left p{
        font-size:13px;
    }

}





.sidebar-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #555;
    z-index: 10000;
}

/* Mobile view me hi show hoga */
@media (max-width: 768px) {
    .sidebar-close {
        display: block;
    }
}
.account-menu {
  position: relative;
}

/* LEFT SIDE OPEN */
.account-submenu {
  position: absolute;
  top: 0;
  right: 100%;
  left: auto;
  width: 220px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #eee;
  
  display: none;
  flex-direction: column;   /* 🔥 IMPORTANT */
  
  padding: 10px;
  z-index: 999;
}

/* HOVER */
.account-menu:hover .account-submenu {
  display: flex;   /* 🔥 block → flex */
}

/* 🔥 LINKS FIX */
.account-submenu a {
  display: block;        /* ek ke niche ek */
  padding: 6px 10px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
}

/* spacing */
.account-submenu a + a {
  margin-top: 4px;
}

/* hover effect */
.account-submenu a:hover {
  background: #f5f5f5;
  border-radius: 5px;
}
.profile-popup-item.has-submenu {
  position: relative;
}

.lang-menu {
  position: absolute;
  top: 0;
  right: 100%;  /* 🔥 LEFT side (same as account) */
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  display: none;
  width: 180px;
  padding: 8px;
}

/* HOVER se open */
.profile-popup-item.has-submenu:hover .lang-menu {
  display: block;
}    
/* MAIN POPUP */
body.dark-mode .profile-popup{
  background:#1e293b;
  color:#fff;
  border:1px solid #334155;
}

/* HEADER */
body.dark-mode .profile-popup-header h5,
body.dark-mode .profile-popup-header p{
  color:#fff;
}

/* MENU ITEMS */
body.dark-mode .profile-popup-item,
body.dark-mode .profile-popup-item a,
body.dark-mode .profile-submenu a{
  color:#e2e8f0;
}

/* HOVER */
body.dark-mode .profile-popup-item:hover,
body.dark-mode .profile-submenu a:hover,
body.dark-mode .lang-item:hover{
  background:#334155;
}

/* SUBMENUS */
body.dark-mode .account-submenu,
body.dark-mode .lang-menu{
  background:#1e293b;
  border:1px solid #334155;
}

/* LANGUAGE ITEMS */
body.dark-mode .lang-item{
  color:#e2e8f0;
}

/* DIVIDER */
body.dark-mode .profile-popup-divider,
body.dark-mode hr{
  border-color:#334155;
}

/* BUTTON */
body.dark-mode .profile-popup-btn{
  background:#334155;
  color:#fff;
  border:none;
}

body.dark-mode .profile-popup-btn:hover{
  background:#475569;
}

/* TOGGLE TEXT */
body.dark-mode .submenu-item-toggle span{
  color:#e2e8f0;
}

/* === DARK SIDEBAR ADDITIONS === */
.sidebar.dark {
    background: #1e1e2d !important;
    border-right: 1px solid #1e1e2d !important;
}
.sidebar.dark .logo {
    color: #ffffff !important;
}
.sidebar.dark .menu-title {
    color: #4b4b5e !important;
}
.sidebar.dark .menu-item {
    color: #a2a3b7 !important;
}
.sidebar.dark .menu-left i, 
.sidebar.dark .menu-item .fa-plus, 
.sidebar.dark .menu-item .fa-minus {
    color: #494b74 !important;
}
.sidebar.dark .menu-item:hover {
    background: #1b1b28 !important;
    color: #ffffff !important;
}
.sidebar.dark .menu-item:hover i {
    color: #3b5cff !important;
}
.sidebar.dark .submenu a {
    color: #a2a3b7 !important;
}
.sidebar.dark .submenu a:hover, 
.sidebar.dark .submenu a.active {
    background: #1b1b28 !important;
    color: #3b5cff !important;
}
.sidebar.dark .badge-soon {
    background: #212e48 !important;
    color: #3699ff !important;
}

/* =========================
   GLOBAL DARK MODE FOR LAYOUT-1
========================= */
body.dark-mode {
    background: #151521 !important; 
}

body.dark-mode .main {
    background: #151521;
}

body.dark-mode .topbar {
    background: #1e1e2d;
    border-bottom: 1px solid #1e1e2d;
}

body.dark-mode .nav-links {
    color: #a2a3b7 !important;
}

body.dark-mode .topbar i {
    color: #494b74 !important;
}

body.dark-mode .header h2 {
    color: #ffffff;
}

body.dark-mode .header p {
    color: #a2a3b7;
}

body.dark-mode .btn {
    background: #3b5cff;
    color: #fff;
    border: none;
}

body.dark-mode .stats-card,
body.dark-mode .highlight-card,
body.dark-mode .earnings-card,
body.dark-mode .meeting-card,
body.dark-mode .teams-card,
body.dark-mode .profile-cover-wrap,
body.dark-mode .profile-info-card,
body.dark-mode .card,
body.dark-mode .overview-card,
body.dark-mode .activity-card {
    background: #1e1e2d;
    border: 1px solid #1e1e2d;
    box-shadow: none;
}

body.dark-mode .stats-value,
body.dark-mode .highlight-val,
body.dark-mode .earnings-title,
body.dark-mode .meeting-time,
body.dark-mode .team-info h5,
body.dark-mode .profile-name,
body.dark-mode .card-title,
body.dark-mode .overview-title {
    color: #ffffff !important;
}

body.dark-mode .stats-label,
body.dark-mode .highlight-title,
body.dark-mode .store-list,
body.dark-mode .meeting-title,
body.dark-mode .meeting-desc,
body.dark-mode .team-info p,
body.dark-mode .profile-desc,
body.dark-mode .card-desc {
    color: #a2a3b7 !important;
}

body.dark-mode .teams-table th {
    background: #1b1b28;
    color: #a2a3b7;
    border-bottom: 1px solid #151521;
}

body.dark-mode .teams-table td,
body.dark-mode table td {
    border-bottom: 1px solid #151521;
    color: #a2a3b7;
}

body.dark-mode .footer {
    background: #1e1e2d !important;
    border-top: 1px solid #1e1e2d !important;
    color: #a2a3b7 !important;
}

body.dark-mode .footer-brand span {
    color: #ffffff !important;
}

body.dark-mode .footer-links a {
    color: #a2a3b7 !important;
}

body.dark-mode .footer-links a:hover {
    color: #3b5cff !important;
}

body.dark-mode .search-popup,
body.dark-mode .search-box,
body.dark-mode .settings-popup,
body.dark-mode .notif-popup,
body.dark-mode .chat-panel {
    background: #1e1e2d;
    border: 1px solid #333346;
}

body.dark-mode .search-box-header,
body.dark-mode .search-tabs-container,
body.dark-mode .notif-header,
body.dark-mode .chat-header {
    border-bottom: 1px solid #333346;
}

body.dark-mode .search-box-header input,
body.dark-mode .chat-input-wrap input {
    background: transparent;
    color: #fff;
}

body.dark-mode .tab-content .search-item,
body.dark-mode .settings-item,
body.dark-mode .notif-item {
    border-bottom: 1px solid #333346;
}

body.dark-mode .tab-content .search-item:hover,
body.dark-mode .settings-item:hover,
body.dark-mode .notif-item:hover {
    background: #1b1b28 !important;
}

body.dark-mode .item-title,
body.dark-mode .notif-text {
    color: #ffffff;
}

body.dark-mode .item-subtitle,
body.dark-mode .notif-meta {
    color: #a2a3b7;
}

/* =========================
   GLOBAL DARK MODE FOR CUSTOM PAGES (Profiles, Settings, etc.)
========================= */
body.dark-mode .ppc-card,
body.dark-mode .ppc-stats,
body.dark-mode .ppc-loc-card,
body.dark-mode .ppc-proj-card,
body.dark-mode .ph-nav,
body.dark-mode .ph-info,
body.dark-mode .profile-header,
body.dark-mode .inner-card,
body.dark-mode .sidebar-card,
body.dark-mode .faq-card,
body.dark-mode .support-card,
body.dark-mode .pricing-card,
body.dark-mode .upload-box {
    background: #1e1e2d !important;
    border: 1px solid #333346 !important;
    color: #ffffff;
}

body.dark-mode .ppc-stat {
    border-right: 1px solid #333346;
}
body.dark-mode .ppc-stat:last-child {
    border-right: none;
}

body.dark-mode .ppc-card-header,
body.dark-mode .card-header,
body.dark-mode .card-header-flex,
body.dark-mode .faq-header,
body.dark-mode .page-header,
body.dark-mode .sidebar-transparent-row,
body.dark-mode .branding-row {
    border-bottom: 1px solid #333346 !important;
}

body.dark-mode .ppc-stat-val,
body.dark-mode .ppc-card-title,
body.dark-mode .ppc-hl-val,
body.dark-mode .ppc-job-title,
body.dark-mode .ppc-loc-title,
body.dark-mode .ppc-proj-title,
body.dark-mode .ppc-section-title,
body.dark-mode .ph-info h3,
body.dark-mode .card-title,
body.dark-mode .inner-title,
body.dark-mode .support-title,
body.dark-mode .b-label,
body.dark-mode .card-header-title {
    color: #ffffff !important;
}

body.dark-mode .ppc-stat-label,
body.dark-mode .ppc-hl-label,
body.dark-mode .ppc-job-dept,
body.dark-mode .ppc-job-meta,
body.dark-mode .ppc-about-text,
body.dark-mode .ppc-loc-addr,
body.dark-mode .ppc-proj-desc,
body.dark-mode .ppc-net-row,
body.dark-mode .ph-meta span,
body.dark-mode .inner-desc,
body.dark-mode .support-desc,
body.dark-mode .b-desc,
body.dark-mode .card-header-right {
    color: #a2a3b7 !important;
}

body.dark-mode .ppc-tag,
body.dark-mode .ppc-job-icon {
    background: #1b1b28 !important;
    color: #a2a3b7 !important;
    border: 1px solid #333346 !important;
}

body.dark-mode .ppc-tag:hover {
    background: #3b5cff !important;
    color: #ffffff !important;
}

body.dark-mode .ph-tab-btn,
body.dark-mode .ph-nav a,
body.dark-mode .account-nav a {
    color: #a2a3b7 !important;
}

body.dark-mode .ph-nav a.active,
body.dark-mode .ph-nav a:hover,
body.dark-mode .ph-tab-btn.active,
body.dark-mode .ph-tab-btn:hover,
body.dark-mode .account-nav a.active {
    color: #3b5cff !important;
}

body.dark-mode .ph-tab-menu {
    background: #1e1e2d !important;
    border: 1px solid #333346 !important;
}

body.dark-mode .ph-tab-menu a {
    color: #a2a3b7 !important;
}

body.dark-mode .ph-tab-menu a:hover {
    background: #1b1b28 !important;
    color: #3b5cff !important;
}

body.dark-mode .ppc-loc-img img,
body.dark-mode .ppc-proj-img img {
    border-bottom: 1px solid #333346;
}

body.dark-mode #dynamic-breadcrumb span {
    color: #e2e8f0 !important;
}

body.dark-mode #dynamic-breadcrumb i {
    color: #a2a3b7 !important;
}

/* Share Profile Modal */
.share-profile-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center; justify-content: center;
  z-index: 10000;
}
.share-profile-modal {
  background: white;
  width: 90%; max-width: 500px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  display: flex; flex-direction: column;
  font-family: inherit;
}
.sp-modal-header {
  padding: 20px;
  border-bottom: 1px solid #f1f1f4;
  display: flex; justify-content: space-between; align-items: center;
}
.sp-modal-header h3 {
  margin: 0; font-size: 18px; font-weight: 600; color: #181c32;
}
.sp-modal-close {
  cursor: pointer; color: #a1a5b7; font-size: 16px;
}
.sp-modal-body {
  padding: 20px;
  display: flex; flex-direction: column; gap: 20px;
}
.sp-label {
  font-size: 14px; font-weight: 600; color: #181c32; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.sp-label i { color: #a1a5b7; font-size: 13px; }
.sp-input-group {
  display: flex; align-items: center;
  border: 1px solid #e4e6ef; border-radius: 6px; overflow: hidden;
}
.sp-input-group input {
  flex: 1; border: none; padding: 12px 14px; outline: none; color: #3f4254; font-size: 14px;
}
.sp-input-group .sp-copy {
  padding: 12px 14px; cursor: pointer; color: #a1a5b7; font-size: 16px;
  background: #f9f9f9; border-left: 1px solid #e4e6ef;
}
.sp-input-group .sp-share-btn {
  background: #3e97ff; color: white; border: none; padding: 0 20px;
  font-weight: 600; font-size: 13px; cursor: pointer; height: 100%; align-self: stretch;
}
.sp-users {
  display: flex; flex-direction: column; gap: 15px; margin-top: 10px;
}
.sp-user-item {
  display: flex; align-items: center; gap: 12px;
}
.sp-user-item img {
  width: 40px; height: 40px; border-radius: 50%;
}
.sp-user-info { flex: 1; }
.sp-user-info h4 { margin: 0; font-size: 14px; font-weight: 600; color: #181c32; }
.sp-user-info p { margin: 0; font-size: 13px; color: #a1a5b7; }
.sp-role-select {
  border: 1px solid #e4e6ef; border-radius: 6px; padding: 6px 10px;
  font-size: 13px; color: #3f4254; outline: none; background: white; cursor: pointer;
}
.sp-settings-section {
  border-top: 1px solid #f1f1f4; padding-top: 20px;
}
.sp-setting-item {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.sp-setting-left {
  display: flex; align-items: center; gap: 10px; font-size: 13px; color: #181c32; font-weight: 500;
}
.sp-setting-left i { color: #a1a5b7; font-size: 16px; }
.sp-setting-right {
  color: #3e97ff; font-size: 13px; font-weight: 500; text-decoration: none;
}
.sp-modal-footer {
  padding: 20px;
  display: flex;
}
.sp-done-btn {
  width: 100%; padding: 12px; background: #3e97ff; color: white;
  border: none; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer;
}

body.dark-mode .share-profile-modal { background: #1e1e2d; }
body.dark-mode .sp-modal-header, body.dark-mode .sp-settings-section { border-color: #323248; }
body.dark-mode .sp-modal-header h3, body.dark-mode .sp-label, body.dark-mode .sp-user-info h4, body.dark-mode .sp-setting-left, body.dark-mode .sp-settings-title { color: #ffffff !important; }
body.dark-mode .sp-input-group { border-color: #323248; background: #151521; }
body.dark-mode .sp-input-group input { background: transparent; color: #ffffff; }
body.dark-mode .sp-input-group .sp-copy { background: #1e1e2d; border-color: #323248; }
body.dark-mode .sp-role-select { background: #151521; border-color: #323248; color: #ffffff; }

/* Give Award Modal Extras */
.award-option:hover { background: #f9fafb; border-color: #3e97ff !important; }
body.dark-mode .award-option { border-color: #323248 !important; }
body.dark-mode .award-option:hover { background: #1b1b28; border-color: #3e97ff !important; }
body.dark-mode .award-option div { color: #ffffff !important; }
body.dark-mode .sp-input-group textarea { background: transparent; color: #ffffff; }

/* Report User Modal Styles */
.report-reason-item { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.report-reason-text { flex: 1; }
.rr-title { font-weight: 600; font-size: 14px; color: #181c32; margin-bottom: 2px; }
.rr-desc { font-size: 13px; color: #7e8299; }
.custom-radio { appearance: none; width: 20px; height: 20px; border: 2px solid #e4e6ef; border-radius: 50%; margin-top: 2px; cursor: pointer; position: relative; outline: none; transition: 0.2s; }
.custom-radio:checked { border-color: #3e97ff; border-width: 6px; }
body.dark-mode .rr-title { color: #ffffff !important; }
body.dark-mode .custom-radio { border-color: #323248; }
body.dark-mode #reportUserModal .sp-modal-header + div { border-color: #323248; }
body.dark-mode #reportUserModal .sp-modal-header + div div { color: #ffffff !important; }
body.dark-mode #reportUserModal .sp-modal-body > div { color: #ffffff !important; }
body.dark-mode #reportUserModal > div > div:nth-child(4) { background: #151521 !important; color: #a1a5b7 !important; border-top: 1px solid #323248; border-bottom: 1px solid #323248; }
body.dark-mode .btn-cancel { background: #151521 !important; border-color: #323248 !important; color: #ffffff !important; }

/* Fix Mobile Responsiveness for All Topbar Popups */
@media (max-width: 900px) {
  .search-popup,
  .notif-popup,
  .profile-popup,
  .cp-popup,
  .settings-popup,
  .chat-popup,
  .chat-panel {
    position: fixed !important;
    top: 75px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
    z-index: 10000 !important;
    max-height: calc(100vh - 90px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    transform: none !important;
  }

  /* Make nested submenus act as accordions on mobile */
  .profile-popup-item.has-submenu {
    flex-wrap: wrap !important;
  }
  .account-submenu,
  .lang-menu,
  .has-submenu .action-submenu {
    position: static !important;
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    padding-left: 25px !important;
    padding-top: 10px !important;
    padding-bottom: 0 !important;
    background: transparent !important;
    margin-top: 8px !important;
    border-top: 1px solid #f1f1f4 !important;
    flex-basis: 100% !important;
  }
  body.dark-mode .account-submenu,
  body.dark-mode .lang-menu,
  body.dark-mode .has-submenu .action-submenu {
    border-top: 1px solid #334155 !important;
  }
  .account-submenu a,
  .lang-menu .lang-item {
    padding: 10px 0 !important;
  }
}

/* ===== STORE-CLIENT TOPBAR OVERRIDE ===== */
header.topbar {
  width: 100%;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 70px !important;
    padding: 1rem 0 !important;
    position: relative !important;
    border-bottom: 1px solid #e5e7eb !important;
    margin-bottom: 1.5rem !important;
    background: transparent !important;
    flex-direction: row !important; /* Force row layout to override global column layout */
}

header.topbar .right-icons {
    display: flex !important;
    align-items: center !important;
    gap: 1.25rem !important;
}

@media(max-width: 900px) {
    header.topbar {
        padding: 1rem 0 !important;
        flex-direction: row !important;
        height: 70px !important;
    }
    
    header.topbar .topbar-search {
        display: none !important; /* Hide search bar on mobile to fit the other icons perfectly */
    }
}

/* Fix for profile-popup being forced into flex-row by .right-icons > div rule */
header.topbar .right-icons .profile-popup {
    flex-direction: column !important;
    align-items: stretch !important;
}

}

/* --- Store-Client specific header styles injected from store-client-home --- */
header.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding-top: 1rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

header.topbar .breadcrumb {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}
header.topbar .breadcrumb span { margin: 0 5px; }
header.topbar .breadcrumb b { color: var(--text-main); font-weight: 600; }

header.topbar .right-icons {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

header.topbar .topbar-search {
    position: relative;
    width: 250px;
    display: flex;
    align-items: center;
}
header.topbar .topbar-search input {
    width: 100%;
    padding: 0.5rem 2.5rem;
    background: #F9F9F9;
    border: 1px solid var(--border-color);
    border-radius: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-main);
    outline: none;
}
header.topbar .topbar-search .fa-magnifying-glass {
    position: absolute;
    left: 0.8rem;
    color: var(--text-muted);
}
header.topbar .topbar-search .shortcut {
    position: absolute;
    right: 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
}

header.topbar .icon-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
    color: var(--text-muted);
}
header.topbar .icon-trigger:hover { color: var(--primary-blue); }

header.topbar .icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F1FAFF;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

header.topbar .cart-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}
header.topbar .cart-icon-box {
    position: relative;
    color: var(--text-muted);
    font-size: 1.2rem;
}
header.topbar .cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--success-green);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid white;
}
header.topbar .cart-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
header.topbar .cart-info .label { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }
header.topbar .cart-info .val { font-size: 0.85rem; font-weight: 700; color: var(--text-main); }

/* Profile Popup — anchors below the avatar trigger */
header.topbar .profile-popup {
    position: absolute; top: calc(100% + 10px); right: 0;
    width: 280px; background: white; border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); border: 1px solid var(--border-color);
    z-index: 1200; padding: 1.5rem;
    display: none;
}
header.topbar .profile-popup.show { display: block; }
header.topbar .profile-pop-header { display: flex; gap: 1rem; align-items: center; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border-color); margin-bottom: 1rem; }
header.topbar .pop-avatar { width: 50px; height: 50px; border-radius: 0.5rem; object-fit: cover; }
header.topbar .pop-user-info h4 { font-size: 1rem; font-weight: 700; margin: 0; }
header.topbar .pop-user-info p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
header.topbar .pop-badge { background: #F1FAFF; color: var(--primary-blue); font-size: 0.7rem; padding: 0.15rem 0.45rem; border-radius: 4px; font-weight: 700; margin-left: 5px; }
header.topbar .pop-menu-item {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0;
    color: #3F4254; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
header.topbar .pop-menu-item:hover { color: var(--primary-blue); }
header.topbar .pop-menu-item i { color: var(--text-muted); width: 20px; text-align: center; }
header.topbar .pop-footer { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
header.topbar .logout-btn { width: 100%; padding: 0.65rem; border: 1px solid var(--border-color); background: white; border-radius: 0.5rem; font-weight: 600; cursor: pointer; }

/* --- MODALS & DRAWERS injected from store-client-home --- */
.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 998;
    display: none;
    backdrop-filter: blur(2px);
}

.drawer {
    position: fixed;
    top: 0; right: -450px;
    width: 420px; height: 100vh;
    background: white;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
}
.drawer.open { right: 0; }

.drawer-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
}
.drawer-header h2 { font-size: 1.25rem; font-weight: 700; margin: 0; }
.drawer-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-muted); }

.drawer-content { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.drawer-footer { padding: 1.5rem; border-top: 1px solid var(--border-color); display: flex; gap: 1rem; flex-direction: column; }

/* Item styling inside drawer */
.drawer-item {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}
.drawer-item-img {
    width: 65px; height: 65px;
    background: #f9f9f9; border-radius: 0.5rem;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.drawer-item-img img { width: 100%; height: 100%; object-fit: cover; }
.drawer-item-info { flex: 1; }
.drawer-item-title { font-size: 0.85rem; font-weight: 600; color: var(--text-main); margin-bottom: 0.25rem; line-height: 1.3; }
.drawer-item-meta { font-size: 0.75rem; color: var(--text-muted); display:flex; gap:10px; align-items:center; }
.drawer-item-meta b { color: var(--text-main); }
.drawer-item-price { font-weight: 700; font-size: 0.95rem; color: var(--text-main); }
.drawer-item-actions { display: flex; align-items: center; gap: 0.5rem; }

.btn-icon-sm {
    width: 32px; height: 32px;
    border-radius: 0.375rem; border: 1px solid var(--border-color);
    background: white; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #3F4254;
}
.btn-icon-sm:hover { background: #F1FAFF; color: var(--primary-blue); border-color: var(--primary-blue); }

.btn-full { flex: 1; padding: 0.75rem; border-radius: 0.5rem; font-weight: 600; cursor: pointer; text-align: center; }
.btn-outline { background: white; border: 1px solid var(--border-color); color: #3F4254; }
.btn-primary { background: var(--primary-blue); border: 1px solid var(--primary-blue); color: white; }
.btn-primary:hover { background: var(--primary-hover); }

@media (max-width: 500px) {
    .drawer { width: 100%; right: -100%; }
}

/* Sidebar menu toggle for mobile */
.menu-toggle { display: none; }
@media (max-width: 992px) {
    .menu-toggle { display: block; font-size: 1.35rem; color: var(--text-main); cursor: pointer; }
}

/* Store Topbar Manual Overrides */
#wishlist-trigger i { color: grey !important; }
.cart-badge { background-color: #50CD89 !important; }
.cart-info .label { width: auto !important; }

