/* common.css */

/* General styling */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    height: 100vh;
    background-color: #f5f5f5;
}

/* Main grid layout for header, sidebar, and main content */
.dashboard-container {
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-columns: 200px 1fr;
    grid-template-areas:
        "header header"
        "sidebar main";
    height: 100vh;
}

/* Header styling */
.dashboard-header {
    grid-area: header;
    background-color: #007BFF;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dashboard-header h1 {
    margin: 0;
    font-size: 1.5rem;
}
.dashboard-header button {
    background-color: #FF6B6B;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}
.dashboard-header button:hover {
    background-color: #e05a5a;
}

/* Sidebar area (just the container) */
.sidebar {
    grid-area: sidebar;
    background-color: #343a40;
    color: white;
    padding: 20px;
}

/* Main content area */
.main-content {
    grid-area: main;
    background: white;
    padding: 20px;
    border-left: 1px solid #ddd;
}
.main-content h2 {
    margin-top: 0;
}


/* -----------------------------------
   Basic structure for any <ul> in the sidebar
----------------------------------- */
.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar nav ul li {
  margin: 10px 0;
}

.sidebar nav ul li a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
}

.sidebar nav ul li a:hover {
  text-decoration: underline;
}

/* -----------------------------------
   Collapsible submenus
----------------------------------- */
.submenu {
  margin-top: 5px;
  display: none; /* hidden by default */
}

.submenu.hidden {
  display: none;
}

.submenu:not(.hidden) {
  display: block;
}

/* -----------------------------------
   Visual differentiation by levels
   1) Top-level (direct child of .sidebar nav > ul)
   2) First submenu
   3) Deeper submenus
----------------------------------- */

/* 1) Top-level items: direct children of the main <ul> inside .sidebar nav */
.sidebar nav > ul > li > a {
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
}

/* 2) First submenu level: 
   .submenu that’s a direct child of a top-level <li> 
   We'll style its <li> to look a bit smaller, lighter color, indented, etc.
*/
.sidebar nav ul li .submenu > li > a {
  font-size: 0.95rem;
  color: #d3d3d3;
  padding-left: 1rem; /* indent */
  position: relative;
}

/* Custom bullet or marker if you want a dot or something:
   We'll use a pseudo-element as a custom bullet
*/
.sidebar nav ul li .submenu > li > a::before {
  content: "• ";  /* or use a unicode symbol */
  color: #007BFF; /* bullet color */
  position: absolute;
  left: 0;  /* bullet stays at the start */
  transform: translateX(-1rem);
}

/* 3) Second-level nested submenus 
   If you have deeper submenus: .submenu .submenu
   We'll style them even smaller or more indented
*/
.sidebar nav ul li .submenu .submenu > li > a {
  font-size: 0.9rem;
  color: #bfbfbf;
  padding-left: 2rem;
  position: relative;
}

.sidebar nav ul li .submenu .submenu > li > a::before {
  content: "◦ ";
  color: #00adff;
  position: absolute;
  left: 0;
  transform: translateX(-2rem);
}

/* etc. If you have a 3rd or 4th level, keep nesting .submenu .submenu .submenu...
   or use different classes like .submenu-level-2, etc.
*/

/* Example: We can also style a 'selected' state if you want */
.sidebar nav ul li a.active {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 3px 5px;
}
