/* ========== Reset & Base ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}
html,
body {
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ========== Navbar / Logo ========== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: linear-gradient(120deg, #0033e7, #86eaa7);
  padding: 0 40px;
  height: 60px;
  overflow: visible; /* allow dropdowns to escape */
  border-bottom: 3px solid transparent; /* default hidden */
  transition: border-color 0.3s ease;
}

/* Role-specific colors */
.navbar.Administrator {
  border-bottom-color: gold;
}

.navbar.SuperUser {
  border-bottom-color: #32cd32; /* bright green */
}

.navbar.Developer {
  border-bottom-color: #000000; /* black */
}

.navbar.Guest {
  border-bottom-color: #6c48fd; /* blue */
}

.logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}
.logo img {
  height: 40px;
  width: auto;
}
.logo span,
.logo strong {
  font-size: 30px;
  color: #fff;
}

/* ========== Nav Links ========== */
.nav-links {
  display: flex;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav-links li {
  margin-left: 20px;
  position: relative;
}
.nav-links a {
  text-decoration: none;
  color: white;
  font-size: 16px;
  transition: color 0.18s ease;
  display: inline-block;
  padding: 8px 6px; /* larger hit area so users don't miss */
}
.nav-links a:hover {
  color: #f0c040;
}

/* ========== Dropdown (Reports & others) ========== */
.dropdown {
  position: relative;
}

/* ensure toggle area for dropdown is comfortable (works even if markup uses anchor or button) */
.dropdown > a,
.dropdown > .dropdown-toggle,
.dropdown .dropdown-toggle {
  display: inline-block;
  padding: 8px 6px;
  cursor: pointer;
}

/* small caret */
.dropdown .arrow {
  display: inline-block;
  margin-left: 6px;
  width: 6px;
  height: 6px;
  border-left: 2px solid rgba(0, 0, 0, 0.6);
  border-bottom: 2px solid rgba(0, 0, 0, 0.6);
  transform: rotate(-45deg);
  vertical-align: middle;
}

/* Default dropdown (opens left→right) */
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  right: auto;
  background: #fff;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  min-width: 200px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  font-size: 15px;
  z-index: 3000;
  white-space: nowrap;
  overflow-x: hidden; /* prevents horizontal scrollbar */
}

/* If the parent is close to the right edge, flip it */
.dropdown-menu.align-right {
  left: auto;
  right: 0;
}

/* dropdown items */
.dropdown-menu li a {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: #333;
  transition: background 0.14s;
}
.dropdown-menu li a:hover {
  background: #f5f5f5;
  color: #000;
}
.dropdown.open > .dropdown-menu {
  display: block;
}

/* ========== User icon dropdown ========== */
.user-icon {
  position: relative;
  padding: 6px; /* larger hit area */
  z-index: 3500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

/* user menu */
.user-icon .user-menu {
  display: none;
  position: absolute;
  top: calc(100% - 6px); /* slight overlap to avoid gap */
  right: 0;
  left: auto;
  background: #fff;
  margin: 0;
  padding: 6px 0;
  min-width: 200px;
  max-width: calc(100vw - 16px);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  z-index: 3600;
  white-space: nowrap;
}

.user-icon.open > .user-menu {
  display: block;
}

.user-icon .user-menu li {
  border-bottom: 1px solid #eee;
}
.user-icon .user-menu li:last-child {
  border-bottom: none;
}

.user-icon .user-menu li a,
.user-icon .user-menu li span {
  display: block;
  padding: 10px 14px;
  color: #333;
  text-decoration: none;
}
.user-icon .user-menu li a:hover {
  background: #f5f5f5;
}

#user-info-name {
  padding: 6px 0; /* adds top and bottom spacing inside the div */
  /* or */
  margin: 6px 0; /* adds spacing outside the div */
}

/* ========== Hamburger / Mobile ========== */
.hamburger {
  display: none;
  font-size: 28px;
  color: white;
  cursor: pointer;
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  .nav-links {
    position: absolute;
    top: 60px;
    right: 0;
    background: #fff;
    color: #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);

    flex-direction: column;
    width: 220px;
    display: none;
    padding: 10px 0;
    z-index: 2400;
  }
  .nav-links li {
    margin: 12px 0;
    color: #333;
    text-align: center;
  }
  .nav-links a {
    color: #333;
  }
  .nav-links.active {
    display: flex;
  }

  /* inside mobile menu, present items as part of the flow */
  .nav-links .dropdown-menu {
    position: static;
    box-shadow: none;
    background: transparent;
    min-width: auto;
    padding: 0;
  }
  .nav-links .dropdown-menu li a {
    padding-left: 24px;
    color: #333;
    background: transparent;
  }
}

/* Narrow screens */
@media (max-width: 420px) {
  .user-icon .user-menu {
    min-width: 120px;
    white-space: normal;
  }
}

/* ========== Utility: keep large clickable areas on desktop too ========== */
.nav-links a,
.dropdown > a,
.dropdown-toggle,
.user-icon {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
}

/* ========== Page centering / construction placeholders ========== */
.center2page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100vh;
  margin-top: 100px;
}

.center2page ul li {
  margin-top: 10px;
  text-indent: 0.4em;
}

.center2page ul {
  text-align: left;
}

.center2page img {
  max-width: 600px;
  margin-bottom: 50px;
}

.construction-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: calc(100vh - 80px); /* Adjust for header height */
  padding-top: 80px; /* Space below fixed header */
}
.construction-container img {
  max-width: 600px;
  margin-bottom: 50px;
}

/* ========== footer style ========== */
.custom-footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background: #f8f9fa;
  border-top: 1px solid #ddd;
  padding: 12px 0;
  text-align: center;
  font-size: 14px;
  color: #666;
  z-index: 999;
}

.custom-footer a {
  color: #007bff; /* Professional blue link */
  text-decoration: none;
}

.custom-footer a:hover {
  text-decoration: underline;
}

.table-container {
  padding-left: 20px; /* Adjust as needed */
}

.attendance-legend span {
  font-size: 0.9rem;
}
table tr:hover {
  filter: brightness(0.95);
}

/* class stu list -> form and class - the class badge */
.badge-fixed {
  display: inline-block; /* ensures width applies */
  width: 100px; /* adjust to your liking */
  text-align: center; /* centers the text */
  white-space: nowrap; /* prevents wrapping */
}

/* The classstulist.html top part to show form and class
   This controls the total width of the layout  */
#yearformcontainer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1800px;
  margin: 0 auto;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f9f9f9;
}

/* Left side buttons */
#formButtons button {
  margin-right: 8px;
  padding: 6px 10px;
  border: 1px solid #888;
  background: white;
  border-radius: 4px;
  cursor: pointer;
}

/* Right side dropdowns */
#selectors select {
  margin-left: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #888;
  font-size: 14px;
  background: white;
}

/* Year Pill - classstulist.htm */
.year-pill {
  font-size: 1.05rem; /* slightly bigger text */
  padding: 0.5rem 1.2rem; /* bigger pill */
}

.year-pill.active {
  background-color: #022f71;
  color: #fff;
  border-color: #022f71;
}
