body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #f9f9f9;
}
.topbar {
    background: #007BFF;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 22px;
    font-weight: bold;
    position: relative;
}
.user-info {
    display: flex;
    align-items: center;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    position: relative;
    padding: 5px 10px;
    border-radius: 5px;
}
.user-info:hover {
    background: rgba(255, 255, 255, 0.2);
}
.user-icon {
    background: white;
    color: #007BFF;
    border-radius: 50%;
    padding: 8px;
    font-size: 16px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
}
.submenu {
    position: absolute;
    top: 55px;
    right: 15px;
    background: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 100;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.submenu a {
    padding: 10px 15px;
    text-decoration: none;
    color: #007BFF;
    font-size: 14px;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
}
.submenu a i {
    margin-right: 8px;
}
.submenu a:hover {
    background: #e6f0ff;
    color: #0056b3;
}
.user-info:hover .submenu {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    display: flex;
}
.content {
    display: flex;
    flex: 1;
}
.sidebar {
    width: 260px;
    background: linear-gradient(135deg, #007BFF, #0056b3);
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    color: white;
}
.sidebar h2 {
    font-size: 20px;
    margin-bottom: 15px;
}
.sidebar ul {
    list-style: none;
    padding: 0;
}
.sidebar li {
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}
.sidebar li:hover {
    background: rgba(255, 255, 255, 0.2);
}
.sidebar button {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-bottom: 10px;
}
.sidebar button.delete {
    background: #dc3545;
}
.sidebar button:hover {
    background: #218838;
    transform: translateY(-2px);
}
.sidebar button.delete:hover {
    background: #c82333;
    transform: translateY(-2px);
}
.main-content {
    flex: 1;
    padding: 30px;
    background: white;
    border-radius: 10px;
    margin: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.main-content h1 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
}
.main-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.main-content table, .main-content th, .main-content td {
    border: 1px solid #ddd;
}
.main-content th, .main-content td {
    padding: 15px;
    text-align: left;
    font-size: 16px;
}
.main-content th {
    background: #007BFF;
    color: white;
    font-size: 17px;
}
.main-content button {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}
.main-content button.delete {
    background: #dc3545;
}
.main-content button:hover {
    background: #218838;
    transform: translateY(-2px);
}
.main-content button.delete:hover {
    background: #c82333;
    transform: translateY(-2px);
}
.form-section {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.form-section input, .form-section select {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    flex: 1;
}
.form-section input::placeholder {
    color: #999;
}


body.dark-mode {
    background: #222;
    color: #f1f1f1;
}

body.dark-mode .topbar {
    background: #333;
    color: #f1f1f1;
}

body.dark-mode .sidebar {
    background: linear-gradient(135deg, #444, #333);
    color: #f1f1f1;
}

body.dark-mode .sidebar button {
    background: #555;
    color: white;
}

body.dark-mode .sidebar button.delete {
    background: #bb2d3b;
}

body.dark-mode .main-content {
    background: #333;
    color: #f1f1f1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .main-content th {
    background: #444;
}

body.dark-mode .main-content button {
    background: #444;
    color: #fff;
}

body.dark-mode .main-content button.delete {
    background: #bb2d3b;
}

body.dark-mode .submenu {
    background: #333;
    border-color: #444;
}

body.dark-mode .submenu a {
    color: #f1f1f1;
}

body.dark-mode .submenu a:hover {
    background: #555;
    color: #fff;
}

.timeline {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
  }

  .timeline button {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .timeline button:hover {
    background-color: #218838;
  }

  .timeline button:focus {
    outline: none;
  }

  #currentMonth {
    font-weight: bold;
    font-size: 16px;
    padding: 8px 12px;
    color: #000000;
  }

  .report-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .chart-container {
    flex: 1;
    padding: 10px;
  }

  canvas {
    display: block;
    margin: 0 auto;
  }

  /* Modal Styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4); /* Black background with opacity */
  }

  .modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 30%;
    border-radius: 5px;
    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.2);
  }

  .modal-content h2 {
    margin-top: 0;
  }

  .modal-content input, .modal-content button {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
  }

  .modal-content button {
    background-color: #28a745;
    color: white;
    border: none;
    cursor: pointer;
  }

  .modal-content button:hover {
    background-color: #218838;
  }

  .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
  }

  .close:hover, .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
  }
