:root {
  --sidebar-width: 250px;
  --toggle-bg: #ddd;
  --transition-speed: 0.2s;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  overflow-x: hidden;
  color: darkblue
}

/* 1. Toggle Button Styling */
.sidebar-toggle-container {
  position: fixed;
  top: 20px;
  z-index: 1001;
  cursor: pointer;
  transition: left var(--transition-speed) ease;
}

.sidebar-toggle {
  background: var(--toggle-bg);
  padding: 8px 12px;
  border-radius: 8px;
  color: darkblue;
  display: inline-block;
}

/* 2. Main Content Area */
.main-content {
  transition: margin-left var(--transition-speed) ease;
  padding: 20px;
  padding-top: 60px;
}

/* 3. Sidebar Styling */
aside {
  width: var(--sidebar-width);
  height: 100vh;
  background: lightblue;
  position: fixed;
  top: 0;
  left: 0;
  transition: transform var(--transition-speed) ease;
  color: #fcbcbc;
  display: flex;
  flex-direction: column;
  /* justify-content: space-around; */
  justify-content: flex-start;
  box-shadow: 3px 1px 5px 0px rgba(0, 0, 0, 0.75);
  z-index: 1000;
  border-radius: 15px;
}

.aside-wrapper {
  padding: 0 20px;
  box-sizing: border-box;
}

aside ul {
  padding-inline-start: 0;
}

aside ul li {
  list-style: none;
  font-size: 18px;
  padding: 10px 0;
  cursor: pointer;
  color: darkblue;
  margin: 4px 10px;
  display: flex;
  align-items: center;
  border-radius: 8px;
}

aside ul li:hover {
  background: rgba(0, 0, 139, 0.1); /* Subtle darkblue tint */
  color: #5b50f8;
}

aside ul li i {
  margin-right: 15px; /* Space between icon and text */
  width: 20px;        /* Fixed width so text aligns vertically */
  text-align: center;
}

aside ul li .fas {
  width: 50px;
  color: black;
}

.logo-text {
  font-size: 20px;
  color: darkblue;
  padding: 0px;
  margin: 0px;
  text-align: center;;
}

input {
  display: none;
}

h1 {
  color: darkblue;
}

hr {
  width: 90%;
  height: 2px;
  color: darkblue;
  margin-left: 0px;
  background-color:darkblue;
}

.username {
  color: rgb(91, 80, 248);
  font-size: 15px;
}


/* Container for the boxes */
.dashboard-grid {
    display: flex;
    flex-wrap: wrap; /* Allows items to wrap to the next line on mobile */
    gap: 20px;       /* Spacing between boxes */
    /* margin-top: 20px; */
}

/* Individual Box Styling */
.data-card {
    background: #f4f4f4;
    border-radius: 10px;
    padding: 20px;
    /* Default to 100% if no variable is provided */
    flex: 1 1 calc(var(--box-width, 100%) - 20px);
    box-sizing: border-box;
    /* flex: 1 1 100%; Default: Take up 100% width (Vertical stack) */
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    border-left: 5px solid darkblue; /* Accent color matching your theme */
} 

.data-card .value {
  font-size: 2rem;
  font-weight: bold;
  display: block;
  margin-top: 10px;
  color: #5b50f8;
}

.data-card h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}


/* Tables styles */
table {
  border-collapse: collapse; /* fara spatiu intre randuri */
  margin: 15px 0;
}
/* Style even rows */
tbody tr:nth-child(even) {
  background-color: lightgray;
}

/* Style odd rows */
tbody tr:nth-child(odd) {
  background-color: rgb(228, 227, 227);
}

/* Style first row */
tbody tr:first-child {
  background-color: lightblue;
  border-top: 1px dotted darkblue;
  border-bottom: 1px dotted darkblue;
}

/* Style last row */
tbody tr:last-child {
  background-color: lightblue;
  border-top: 1px dotted darkblue;
  border-bottom: 1px dotted darkblue;
}

/* Only highlight on hover */
tbody tr:hover {
  background-color: #ffd7bd;
}

th, td {
  border-bottom: 1px solid light;
}


/* ==========================================
   DESKTOP VIEW (Width > 600px)
   Default: Expanded
   ========================================== */
@media (min-width: 601px) {
  aside {
    transform: translateX(0); /* Shown */
  }
  .main-content {
    margin-left: var(--sidebar-width); /* Pushed */
  }
  .sidebar-toggle-container {
    left: calc(var(--sidebar-width) - 45px); /* Attached to edge */
  }

  /* When checked on Desktop: Hide it */
  #toggler:checked ~ aside {
    transform: translateX(-100%);
  }
  #toggler:checked ~ .main-content {
    margin-left: 0;
  }
  #toggler:checked ~ .sidebar-toggle-container {
    left: 20px;
  }
}




/* ==========================================
   MOBILE VIEW (Width <= 600px)
   Default: Collapsed
   ========================================== */
@media (max-width: 600px) {
  aside {
    transform: translateX(-100%); /* Hidden */
  }
  .main-content {
    margin-left: 0; /* Full width */
    padding-top: 25px;
  }
  .sidebar-toggle-container {
    left: 20px; /* Top left corner */
  }

  /* When checked on Mobile: Show it */
  #toggler:checked ~ aside {
    transform: translateX(0);
  }
  /* Optional: Push content on mobile or let it overlap */
  #toggler:checked ~ .main-content {
    margin-left: var(--sidebar-width);
  }
  #toggler:checked ~ .sidebar-toggle-container {
    left: calc(var(--sidebar-width) - 45px);
  }

  .data-card {
        flex: 1 1 100%; /* Default: Take up 100% width (Vertical stack) */
        min-width: 200px; /* Prevents them from getting too skinny */
    }

}