/* Header */
header {
  background: #163153;
  color: #fff;
  box-shadow: 0 2px 10px rgba(50,60,80,0.05);
}

.header-content h1 {
  font-size: 2.2rem;
  letter-spacing: 1px;
}

.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.header-flex h1 {
  margin: 0;
  flex: 1 0 auto;
  font-size: 1.5rem;
  letter-spacing: 1px;
  text-align: left;
}

/* Hide mobile menu button and show login-status right by default */
.mobile-menu-btn {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: #fff;
  margin-right: 16px;
  cursor: pointer;
}

.desktop-login {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

/* Side menu (for mobile) */
.side-menu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 260px;
  max-width: 80vw;
  height: 100vh;
  background: #163153;
  color: #fff;
  z-index: 1200;
  box-shadow: 4px 0 20px rgba(50,60,80,0.15);
  transition: left 0.22s cubic-bezier(.85,.25,.36,1.1);
  display: flex;
  flex-direction: column;
  padding-top: 24px;
}

.side-menu.open {
  left: 0;
}

.side-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 18px;
}

.side-menu-title {
  font-size: 1.23rem;
  font-weight: bold;
}

.side-menu-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  margin-left: 16px;
  cursor: pointer;
}

.side-menu-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#side-login-btn {
  background: #295;
  color: #fff;
  font-size: 1rem;
  border: none;
  border-radius: 7px;
  padding: 9px 13px;
  cursor: pointer;
}

#side-login-btn:active, #side-login-btn:focus {
  background: #183154;
}

#side-timeout-info {
  color: #dfdfdf;
  font-size: 0.96rem;
}

.side-menu-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 1199;
  background: rgba(21,42,81,0.18);
  transition: background 0.24s;
}
.side-menu.open + .side-menu-backdrop,
.side-menu-backdrop.open {
  display: block;
}

/* Hide side menu & show mobile menu button on mobile devices */
@media (max-width: 900px) {
  .desktop-login {
    display: none !important;
  }
  .mobile-menu-btn {
    display: block;
  }

  header {
    padding: 18px 0 4px 0;
  }
}

/* Ensure header elements alignment and stacking for very small screens */
@media (max-width: 700px) {
  .header-flex {
    flex-direction: row;
    justify-content: flex-start;
  }
}
