/* Navbar Styles */
.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: #333;
  gap: 1rem;
}

.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
  color: #fff;
  text-decoration: none;
}

.navbar-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  flex: 1;
}

.navbar-item {
  position: relative;
}

.navbar-link {
  display: block;
  padding: 0.75rem 1rem;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.2s;
}

.navbar-link:hover {
  background-color: #444;
}

/* Navbar Dropdown */
.navbar-dropdown {
  position: relative;
}

.navbar-dropdown > .navbar-link {
  position: relative;
}

.navbar-dropdown-menu {
  display: none;
  position: absolute;
  background-color: #444;
  min-width: 180px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
  z-index: 100;
  top: 100%;
  left: 0;
  border-radius: 0 0 4px 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.navbar-dropdown-menu li a {
  display: block;
  padding: 12px 16px;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.2s;
}

.navbar-dropdown-menu li a:hover {
  background-color: #555;
}

.navbar-dropdown:hover .navbar-dropdown-menu,
.navbar-dropdown.active .navbar-dropdown-menu {
  display: block;
}

/* Navbar Right Menu */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.navbar-balance {
  color: #fff;
  font-weight: bold;
}

.navbar-user-menu {
  position: relative;
}

.navbar-user-button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s, transform 0.1s;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

.navbar-user-dropdown {
  display: none;
  position: absolute;
  background-color: #444;
  min-width: 150px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
  z-index: 100;
  top: 100%;
  right: 0;
  border-radius: 4px;
}

.navbar-user-dropdown a {
  display: block;
  padding: 12px 16px;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.2s;
}

.navbar-user-dropdown a:hover {
  background-color: #555;
}

.navbar-user-menu:hover .navbar-user-dropdown,
.navbar-user-menu.active .navbar-user-dropdown {
  display: block;
}

/* Hamburger Toggle (Mobile) */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  /* Disable hover on mobile - only .active controls visibility */
  .navbar-dropdown:hover .navbar-dropdown-menu {
    display: none !important;
  }
  
  .navbar-container {
    flex-direction: column;
  }
  
  .navbar-toggle {
    display: block;
    order: 2;
    margin-left: auto;
  }
  
  .navbar-brand {
    order: 1;
  }
  
  .navbar-menu {
    order: 3;
    width: 100%;
    flex-direction: column;
    display: none;
  }
  
  .navbar-menu.active {
    display: flex;
  }
  
  .navbar-item {
    width: 100%;
  }
  
  .navbar-link {
    padding: 0.75rem 1rem;
  }
  
  .navbar-dropdown-menu {
    position: static;
    display: none !important;
    background-color: #555;
    box-shadow: none;
  }
  
  .navbar-dropdown.active .navbar-dropdown-menu {
    display: block !important;
  }
  
  .navbar-right {
    order: 4;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #444;
  }

  .navbar-login-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .navbar-login-form input {
    padding: 0.5rem;
    border: 1px solid #666;
    border-radius: 4px;
    font-size: 1rem;
  }

  .navbar-login-form button {
    padding: 0.5rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
  }

  .navbar-login-form button:hover {
    background-color: #0056b3;
  }
}
main { padding: 1.5rem; max-width: 900px; margin: 0 auto; }
.flash { list-style: none; padding: 0; }
.flash li { background: #ffefc1; border: 1px solid #f0d98c; margin: 0.5rem 0; padding: 0.5rem; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  display: block;             /* make the anchor behave like a block card */
  background: #f9f9f9;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;      /* remove underline */
  color: inherit;             /* inherit text color */
  cursor: pointer;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

#bonus-bar {
  position: relative;
  width: 100%;
  height: 10px;
  border: 1px solid black;
}
#progress-completed {
  background-color: green;
  height: 8px;
  width: 25%; /* example: 1/4 of screen */
}
#progress-potential {
  background-color: blue;
  height: 8px;
  width: 75%; /* remaining potential */
  position: absolute;
  left: 25%;
  top: 1px;
}

/* Visually hidden but accessible label utility */
.sr-only {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}
