:root {
  /* Define brand colors as CSS variables */
  --primary-color: #0062A6;  /* Blue */
  --secondary-color: #F5D117;  /* Yellow */
  --text-light: #ffffff;
  --text-dark: #333333;
  --border-radius: 8px;
  --shadow: 0 2px 5px rgba(0,0,0,0.1);
}

body {
  background: var(--secondary-color);
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout containers */
.container {
  max-width: 600px;
  margin: 20px auto;
  background: var(--primary-color);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--shadow);
  color: var(--secondary-color);
}

.container-wide {
  max-width: 900px;
}

/* Text utilities */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

/* Heading styles */
h1, h2, h3 {
  margin-bottom: 20px;
}

h1 {
  font-size: 1.8rem;
}

/* Responsive navbar styles */
.navbar {
  background: var(--primary-color);
  padding: 10px 20px;
  position: relative;
  z-index: 1000;
}

.navbar-brand {
  font-size: 0;
}

.navbar-brand img {
  max-height: 40px;
}

.navbar-links {
  display: flex;
  align-items: center;
}

.navbar-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--secondary-color);
  border-radius: 4px;
  padding: 8px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
}

.navbar-toggle-icon,
.navbar-toggle-icon:before,
.navbar-toggle-icon:after {
  width: 24px;
  height: 3px;
  background-color: var(--secondary-color);
  position: absolute;
  transition: all 0.3s ease;
  border-radius: 2px;
  left: 50%;
  transform: translateX(-50%);
}

.navbar-toggle-icon {
  top: 50%;
  transform: translate(-50%, -50%);
}

.navbar-toggle-icon:before {
  content: '';
  top: -8px;
}

.navbar-toggle-icon:after {
  content: '';
  top: 8px;
}

.navbar-toggle.active .navbar-toggle-icon {
  background-color: transparent;
}

.navbar-toggle.active .navbar-toggle-icon:before {
  transform: translate(-50%, 8px) rotate(45deg);
}

.navbar-toggle.active .navbar-toggle-icon:after {
  transform: translate(-50%, -8px) rotate(-45deg);
}

.logout-form {
  margin: 0;
}

.content-wrapper {
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Desktop nav buttons */
.desktop-nav-btn {
  display: inline-block;
  text-decoration: none;
  padding: 8px 16px;
  margin-right: 10px;
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
  border-radius: 4px;
  transition: background-color 0.2s;
}

.desktop-nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--secondary-color);
  text-decoration: none;
}

.desktop-nav-btn.logout-btn {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: none;
  cursor: pointer;
}

.desktop-nav-btn.logout-btn:hover {
  opacity: 0.9;
}

/* Mobile menu items */
.mobile-menu-item {
  display: none;
}

/* Side-by-side fields for mobile */
.row-fields {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.row-fields .form-group {
  flex: 1;
  margin-bottom: 0;
}

/* Mobile responsiveness */
@media (max-width: 767px) {
  .navbar-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--primary-color);
    flex-direction: column;
    align-items: stretch;
    padding: 15px;
    display: none;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .navbar-links.active {
    display: flex;
  }

  .navbar-links a,
  .navbar-links form {
    margin: 5px 0;
    width: 100%;
  }

  .navbar-links button {
    width: 100%;
  }

  .navbar-toggle {
    display: block;
  }

  .container-fluid {
    justify-content: space-between;
    display: flex;
    align-items: center;
  }

  .container {
    margin: 10px auto;
    padding: 15px 10px; /* Smaller padding on mobile */
  }

  h1, h2, h3 {
    margin-bottom: 10px; /* Smaller margins on mobile */
    font-size: 1.5em; /* Smaller headings on mobile */
  }

  .content-wrapper {
    padding: 5px;
  }

  /* Hide desktop nav buttons on mobile */
  .desktop-nav-btn {
    display: none;
  }

  /* Show mobile menu items on mobile */
  .mobile-menu-item {
    display: block;
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 15px;
    margin: 5px 0;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    border: 1px solid var(--secondary-color);
    transition: background 0.3s;
  }

  .mobile-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
    text-decoration: none;
  }

  .mobile-menu-item.logout-btn {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
  }

  .mobile-menu-item.logout-btn:hover {
    opacity: 0.9;
  }

  /* Row fields for mobile */
  .row-fields {
    gap: 8px;
    margin-bottom: 8px;
  }

  .row-fields .form-label {
    font-size: 0.9em;
  }

  /* Optimize form spacing for small screens */
  .compact-mobile-form .form-group {
    margin-bottom: 8px;
  }

  .compact-mobile-form .form-label {
    margin-bottom: 3px;
  }

  .compact-mobile-form h1 {
    margin-bottom: 12px;
  }

  /* Ultra-compact for small heights */
  @media (max-height: 700px) {
    .container {
      padding-top: 8px;
      padding-bottom: 8px;
    }

    h1 {
      font-size: 1.3em;
      margin-bottom: 8px;
    }

    .form-group {
      margin-bottom: 5px;
    }
  }
}