html{
    overflow-y: scroll;
    font-size: 16px;
}
body{
    background-color: #F9F3EC;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    padding-top: 4rem;;
}
.navbar{
    height: 3.5rem;
    background-color: #F9F3EC;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 3rem;
    position:fixed;
    top:0;
    left:0;
    right:0;
    display:flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
}
.navbar-logo{
    position:absolute;
    left:50%;
    transform:translateX(-50%);
    z-index:1;
}
.navbar-logo img{
    height: 2.5rem;
    width:auto;
}
.navbar-left{
    display:flex;
    margin:0;
    padding: 0;
    gap:3rem;
    list-style: none;
}
.nav-link{
    color:#000000;
    font-weight: bold;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block; 
    transition: color 0.3s ease, transform 0.2s ease;
}
.nav-link:hover{
    color:#C49AA0;
    transform: translateY(-2px);
}
.navbar-right img{
    width:2rem;
    height:auto;
}
.navbar-right{
    display:flex;
    gap:3rem;
    align-items: center;
    transition: transform 0.2s ease;
}
.nav-right:hover{
    transform:scale(1.5);
}
.profile-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width:4rem;
}

.profile-icon a {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.username-label {
  font-size: 0.7rem;
  margin-top: 0.2rem;
  line-height: 1;
  text-align: center;
  max-width: 100%;       /* prevent overflow */
  white-space: nowrap;    /* keep on one line */
  overflow: hidden;       /* hide excess text */
  text-overflow: ellipsis; /* add "..." if too long */
}
.username-label:hover {
  cursor: default;
}

.profile-icon .username-label[title] {
  position: relative;
}
.profile-dropdown {
  position: relative;
  cursor: pointer;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  min-width: 180px;
  z-index: 1000;
  margin-top: 5px;
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.dropdown-menu a:hover {
  background-color: #f5f5f5;
}
.error-message {
    color: #D93025; 
    font-size: 0.85rem; 
    margin-top: -1rem;  
    margin-bottom: 1rem; 
    min-height: 1.2em;   
    transition: opacity 0.3s ease;
}

input.invalid {
    border-color: #D93025;
    box-shadow: 0 0 5px #D93025;       
}

/* Mobile Menu Styles */
.navbar-toggler {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
}

footer {
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    background-color: #F9F3EC;
    border-top: 1px solid #ddd;
    font-size: 0.8rem;
    color: #000000;
    font-style: italic;
}


@media (max-width: 768px) {
  /* Stack navbar items */
  .navbar {
    padding: 0.8rem 1.5rem;
  }

  /* Hide the normal left menu by default */
  .navbar-left {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    z-index: 999;
    animation: slideDown 0.3s ease;
  }

  /* When toggled open */
  .navbar-left.show {
    display: flex;
  }

  /* Logo smaller */
  .navbar-logo img {
    height: 1.5rem;
  }

  /* Right side smaller spacing */
  .navbar-right {
    gap: 0.5rem;
    margin-left: auto;
  }

  .navbar-right img {
    width: 1.2rem;
    height: auto;
  }

  /* Hamburger icon */
  .navbar-toggler {
    display: block;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #333;
    cursor: pointer;
    z-index: 1001;
  }

  /* Make nav links bigger for touch */
  .nav-link {
    display: block;
    width: 100%;
    padding: 0.6rem 0;
    font-size: 1rem;
  }

  /* Optional animation for slide-down */
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
