body {
  background-color: #524e4e; /* Ebony */
  color: #d1d5da; /* Iron */
}

main {
  margin-top: 5rem; /* Prevent overlap with fixed header */
  position: relative;
  z-index: 1;
}

.card {
  background-color: #d1d5da; /* Iron */
  color: #0c0f0a; /* Ebony */
}

.btn-primary {
  background-color: #1a4d6b; /* Royal Blue */
  color: #d1d5da; /* Iron */
}

.btn-primary:hover {
  background-color: #1c3057; /* Torea Bay */
}

/* Header specific z-index */
header {
  z-index: 1000 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Header Navigation Styles */
.nav-link {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  color: #d1d5da;
  text-decoration: none;
  display: flex;
  align-items: center;
  font-weight: 500;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: #1a4d6b;
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-primary-nav {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background-color: #1a4d6b;
  color: #d1d5da;
  text-decoration: none;
  display: flex;
  align-items: center;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-primary-nav:hover {
  background-color: #1c3057;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 77, 107, 0.3);
}

.btn-logout {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background-color: #dc3545;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-logout:hover {
  background-color: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Mobile Menu Styles */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(15, 44, 103, 0.98);
  backdrop-filter: blur(10px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  transform: translateY(-100%);
}

.mobile-menu.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%);
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 2rem;
  gap: 0.5rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  color: #d1d5da;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 500;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 300px;
  text-align: left;
  border: 2px solid transparent;
}

.mobile-nav-link:hover {
  background-color: #1a4d6b;
  border-color: #d1d5da;
  transform: translateX(10px);
}

.mobile-nav-link.logout {
  background-color: #dc3545;
  margin-top: 1rem;
}

.mobile-nav-link.logout:hover {
  background-color: #c82333;
  border-color: #ffffff;
}

/* Input focus styles */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #3f51b5; /* Royal Blue */
  box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.2); /* Royal Blue with opacity */
}

/* Table styles */
table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  padding: 1rem;
  text-align: left;
}

thead tr {
  background-color: #0f2c67; /* Torea Bay */
  color: #d1d5da; /* Iron */
}

tbody tr:nth-child(even) {
  background-color: #f5f7fa; /* Light Iron variant */
}

tbody tr:hover {
  background-color: #e8ecef; /* Lighter Iron */
}

/* Font Awesome icon styles */
.fa-money-bill-wave,
.fa-wallet,
.fa-balance-scale,
.fa-file-excel,
.fa-filter,
.fa-edit,
.fa-trash {
  font-size: 2.5rem;
}

td .fas {
  font-size: 1.25rem;
}

/* Chart styles */
canvas#expenseChart {
  max-height: 400px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  main {
    margin-top: 4.5rem;
  }
  
  .mobile-nav-link {
    font-size: 1.1rem;
    padding: 0.875rem 1.5rem;
  }
  
  /* Hide desktop menu items on mobile */
  .hidden.md\\:flex {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .mobile-nav-link {
    font-size: 1rem;
    padding: 0.75rem 1rem;
    max-width: 250px;
  }
  
  .mobile-menu-content {
    padding: 1rem;
  }
}

/* Desktop menu wrapper */
@media (min-width: 769px) {
  .mobile-menu {
    display: none !important;
  }
  
  /* Ensure desktop nav items don't wrap */
  .hidden.md\\:flex {
    display: flex !important;
    flex-wrap: nowrap;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Logo hover effect */
header a[href="index.php"] {
  transition: all 0.3s ease;
}

header a[href="index.php"]:hover {
  text-shadow: 0 0 20px rgba(209, 213, 218, 0.5);
}