* { font-family: 'Cairo', sans-serif; box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #f0f2f5; overflow-x: hidden; }
body { display: flex; flex-direction: column; min-height: 100vh; }

.main-navbar { background: #000000 !important; padding: 6px 16px;   position: sticky; top: 0; right: 0; left: 0; z-index: 1050; width: 100%; min-height: 56px; box-shadow: 0 2px 12px rgba(0,0,0,0.3); flex-shrink: 0; }
.main-navbar .container-fluid { display: flex; align-items: center; justify-content: space-between; padding: 0; }
.main-navbar .navbar-brand { color: #fff !important; font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.main-navbar .navbar-brand span { color: #fff; font-size: 0.95rem; }
.main-navbar .nav-link { color: rgba(255,255,255,0.85) !important; padding: 4px 8px !important; display: flex; align-items: center; gap: 4px; font-size: 0.85rem; border-radius: 8px; }
.main-navbar .nav-link:hover { color: #fff !important; background: rgba(255,255,255,0.1); }

.sidebar-toggle-btn { display: none; background: transparent; border: none; color: #fff; padding: 8px 10px; cursor: pointer; min-width: 44px; min-height: 44px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

.dashboard-layout { display: flex; min-height: 100vh; background: #f0f2f5; }

.dashboard-sidebar { width: 260px; flex-shrink: 0; min-height: calc(100vh - 56px); position: relative; }

.company-sidebar { background: #000000; color: #fff; width: 260px; min-height: calc(100vh - 56px); position: fixed; top: 56px; right: 0; z-index: 1040; overflow-y: auto; flex-shrink: 0; display: flex; flex-direction: column; box-shadow: 2px 0 12px rgba(0,0,0,0.2); }
.company-sidebar .sidebar-header { padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.1); flex-shrink: 0; }
.company-info { display: flex; align-items: center; gap: 10px; }
.company-info .company-avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.2); object-fit: cover; flex-shrink: 0; }
.company-info .company-details strong { display: block; font-size: 0.85rem; color: #fff; }
.company-info .company-details small { font-size: 0.7rem; color: rgba(255,255,255,0.5); }
.company-sidebar .sidebar-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.company-sidebar .sidebar-nav .nav-link { color: rgba(255,255,255,0.65); padding: 10px 16px; display: flex; align-items: center; gap: 10px; font-size: 0.85rem; border-right: 3px solid transparent; text-decoration: none; }
.company-sidebar .sidebar-nav .nav-link:hover { color: #fff; background: rgba(255,255,255,0.1); }
.company-sidebar .sidebar-nav .nav-link.active { color: #fff; background: rgba(102, 126, 234, 0.2); border-right: 3px solid #667eea; }
.company-sidebar .sidebar-nav .nav-link .nav-icon { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; }
.company-sidebar .sidebar-nav .nav-link .badge { font-size: 0.6rem; padding: 2px 8px; margin-right: auto; }
.company-sidebar .sidebar-nav .divider hr { margin: 8px 14px; border-color: rgba(255,255,255,0.1); }
.company-sidebar .sidebar-footer { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.1); flex-shrink: 0; }
.user-info { display: flex; align-items: center; gap: 10px; }
.user-info img { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.2); object-fit: cover; }
.user-details strong { display: block; font-size: 11px; color: #fff; }
.user-details small { font-size: 9px; color: rgba(255,255,255,0.4); }

.dashboard-content { flex: 1; padding: 20px 24px; min-height: calc(100vh - 56px); overflow-x: hidden; }

.sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1045; }
.sidebar-overlay.active { display: block; }

.notification-badge { transform: translate(15%, -30%); font-size: 9px; min-width: 18px; padding: 2px 6px; }
.notification-dropdown { border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,0.2); border: none; padding: 0; margin-top: 8px; }
.notification-item { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.notification-item:hover { background: #f8f9fa; }
.notification-item.unread { background: rgba(13, 110, 253, 0.04); }
.notification-item .notif-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(13, 110, 253, 0.1); }

.stats-card { display: flex; align-items: center; gap: 12px; background: #ffffff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid #e9ecef; height: 100%; }
.stats-card .stats-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stats-card .stats-info h3 { font-size: 1.3rem; margin: 0; }
.stats-card .stats-info p { font-size: 0.7rem; margin: 0; }

footer { background: #000000; color: rgba(255,255,255,0.8); padding: 16px 0; margin-top: auto; flex-shrink: 0; width: 100%; text-align: center; }
footer p { margin: 0; font-size: 0.85rem; }
footer small { color: rgba(255,255,255,0.5); font-size: 0.75rem; }

@media (min-width: 993px) {
    .company-sidebar { position: fixed; top: 56px; height: calc(100vh - 56px); max-height: calc(100vh - 56px); }
    .dashboard-sidebar { width: 260px; flex-shrink: 0; }
}

@media (max-width: 992px) {
    .sidebar-toggle-btn { display: flex; align-items: center; justify-content: center; order: -1; z-index: 9999; position: relative; }
    .main-navbar .container-fluid { display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
    .main-navbar .navbar-brand { order: 0; z-index: 1; }
    .main-navbar .navbar-nav { order: 2; margin-right: auto; }
    .dashboard-layout { display: flex; }
    .dashboard-sidebar { width: 0; flex-shrink: 0; position: relative; min-height: calc(100vh - 56px); overflow: visible; }
    .company-sidebar { position: fixed; top: 0; right: 0; height: 100vh; width: 280px; max-width: 80vw; z-index: 1050; transform: translateX(100%); transition: transform 0.3s ease; box-shadow: 2px 0 30px rgba(0,0,0,0.5); display: flex; visibility: visible; opacity: 1; }
    .company-sidebar.open { transform: translateX(0); }
    .dashboard-sidebar.open .company-sidebar { transform: translateX(0); }
    .dashboard-sidebar .company-sidebar { position: fixed; top: 0; right: 0; height: 100vh; width: 280px; max-width: 80vw; z-index: 1050; transform: translateX(100%); transition: transform 0.3s ease; box-shadow: 2px 0 30px rgba(0,0,0,0.5); display: flex; visibility: visible; opacity: 1; }
    .dashboard-sidebar .company-sidebar.open { transform: translateX(0); }
    .sidebar-close-btn { display: flex !important; align-items: center; justify-content: center; position: fixed; top: 12px; left: 12px; z-index: 9999; background: transparent; border: none; color: #fff; cursor: pointer; padding: 10px; min-width: 44px; min-height: 44px; touch-action: manipulation; }
    body.no-scroll { overflow: hidden; }
    .dashboard-content { padding: 16px 18px; flex: 1; width: 100%; }
}

@media (max-width: 576px) {
    .main-navbar { min-height: 44px; padding: 2px 8px; }
    .main-navbar .navbar-brand { font-size: 0.75rem; }
    .main-navbar .navbar-brand svg { width: 18px; height: 18px; }
    .company-sidebar { width: 100%; max-width: 85vw; }
    .dashboard-sidebar .company-sidebar { width: 100%; max-width: 85vw; }
    .dashboard-content { padding: 10px 12px; }
    .stats-card { padding: 12px 14px; }
    .stats-card .stats-icon { width: 36px; height: 36px; }
    .stats-card .stats-info h3 { font-size: 1rem; }
}

.main-wrapper { padding: 0 !important; margin: 0 !important; }
.main-wrapper > * { padding: 0 !important; margin: 0 !important; }
.container-fluid { padding: 0 !important; margin: 0 !important; }
.dashboard-layout { padding: 0 !important; margin: 0 !important; }
.company-sidebar { margin-top: 0 !important; padding-top: 0 !important; }
.dashboard-content { padding-top: 20px !important; }



