/* Reset & Layout */
    html, body { margin: 0; padding: 0; height: 100%; font-family: 'Poppins', sans-serif; }
    body { display: flex; min-height: 100vh; }

    /* Sidebar */
    .sidebar {
      width: 250px;
      background: #0D1321;
      color: #f9fafb;
      transition: width 0.3s;
      box-shadow: 2px 0 8px rgba(0,0,0,0.1);
      position: relative;
    }
    .sidebar.collapsed { width: 80px; }

    /* ------------------------
       Logo area
       ------------------------ */
    .logo-container {
      padding: 1.5rem;
      text-align: center;
    }
    .logo-container img {
      display: none;
      width: 100%;
      object-fit: contain;
    }
    /* When sidebar is expanded, show the full‐width logo */
    .sidebar:not(.collapsed) .logo-container .logo-full {
      display: inline-block;
    }
    /* When sidebar is collapsed, show the smaller logo */
    .sidebar.collapsed .logo-container .logo-half {
      display: inline-block;
      max-width: 40px;
    }

    /* Toggle button */
    .toggle-btn {
      position: absolute; top: 1rem; right: -15px;
      width: 30px; height: 30px;
      background: #0D1321;
      border: 1px solid #374151;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      color: #f9fafb;
      cursor: pointer;
      box-shadow: 0 2px 6px rgba(0,0,0,0.2);
      transition: transform 0.3s;
    }
    .sidebar.collapsed .toggle-btn { transform: rotate(180deg); }

    /* Menu */
    .menu { list-style: none; margin: 0; padding: 0; }
    .menu-item { position: relative; }
    .menu-item > a,
    .submenu-toggle {
      display: flex; align-items: center;
      padding: 0.75rem 1rem;
      color: #f9fafb;
      text-decoration: none;
      cursor: pointer;
      transition: background 0.2s;
    }
    .menu-item > a:hover,
    .submenu-toggle:hover { background: #374151; }
    .menu-item > a i,
    .submenu-toggle i {
      width: 1.25rem; font-size: 1.2rem; margin-right: 1rem;
    }
    .link-text { flex: 1; }
    .arrow { transition: transform 0.3s; }

    /* Submenu collapse/expand */
    .submenu {
      list-style: none; margin: 0; padding: 0;
      overflow: hidden; transition: max-height 0.3s ease;
    }
    .has-submenu .submenu { max-height: 0; }
    .has-submenu.open .submenu { max-height: 500px; }
    .has-submenu.open .arrow { transform: rotate(180deg); }
    .submenu .submenu-header {
      padding: 0.5rem 1rem;
      font-size: 0.85rem;
      font-weight: 600;
      color: #cbd5e1;
      border-bottom: 1px solid #374151;
    }
    .submenu li a {
      display: flex; align-items: center;
      padding: 0.5rem 1rem 0.5rem 2.5rem;
      background: #0D1321;
      margin: 2px 0;
      border-radius: 4px;
      color: #f9fafb;
      transition: background 0.2s;
    }
    .submenu li a:hover { background: #374151; }
    .submenu li a i { margin-right: 1rem; }

    /* Collapsed state */
    .sidebar.collapsed .link-text,
    .sidebar.collapsed .arrow { display: none; }
    .sidebar.collapsed .menu-item > a,
    .sidebar.collapsed .submenu-toggle { justify-content: center; }

    /* Pop-out submenu on hover when collapsed */
    .sidebar.collapsed .has-submenu:hover .submenu {
      display: block;
      position: absolute;
      left: 100%; top: 0;
      width: 200px;
      background: #0D1321;
      border: 1px solid #4b5563;
      border-radius: 6px;
      box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
      z-index: 100;
      max-height: none;
      padding: 0.5rem 0;
    }
    .sidebar.collapsed .has-submenu:hover .submenu .submenu-header { display: block; }
    .sidebar.collapsed .has-submenu:hover .submenu li a {
      background: transparent; margin: 0.25rem 0;
    }
    .sidebar.collapsed .has-submenu:hover .submenu li a:hover {
      background: #4b5563;
    }

    /* Tooltip for items without submenu */
    .sidebar.collapsed .menu-item:not(.has-submenu) > a:hover::after {
      content: attr(data-text);
      position: absolute;
      left: 100%; top: 50%; transform: translateY(-50%);
      background: #374151; color: #f9fafb;
      padding: 5px 10px; border-radius: 4px;
      white-space: nowrap; margin-left: 8px;
      opacity: 0; animation: fadeIn 0.3s forwards;
      font-size: 0.85rem; z-index: 100;
    }
    @keyframes fadeIn { to { opacity: 1; } }

    /* Main Content */
    .content-container { flex: 1; display: flex; flex-direction: column; }
    .topbar {
      background: #fff;
      padding: 1rem 1.5rem;
      border-bottom: 1px solid #e5e7eb;
      display: flex; justify-content: space-between; align-items: center;
    }
    .logout-btn {
      background: #dc2626;
      color: #fff;
      padding: 0.5rem 1rem;
      border-radius: 5px;
      border: none;
      cursor: pointer;
    }
    .logout-btn:hover { background: #b91c1c; }
    .content-area { flex: 1; padding: 2rem; background: #f9fafb; overflow-y: auto; }

    /* Notification badge */
    .notif-badge {
      position: absolute;
      top: -4px; right: -4px;
      background: #dc2626;
      color: #fff;
      font-size: 0.65rem;
      font-weight: bold;
      line-height: 1;
      padding: 2px 5px;
      border-radius: 9999px;
    }