* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f4f6f9;
  color: #2e2e42;
}

.contain {
  display: flex;
  flex-wrap: wrap;
}

/* Sidebar */
.sidebar {
  width: 300px;
  background-color: #1e2a78;
  color: #fff;
  min-height: 100vh;
  padding: 20px 0;
}

.menu-item {
  padding: 15px 20px;
  cursor: pointer;
  transition: background 0.3s;
}

.menu-item:hover {
  background-color: #2f3b8f;
}

.sub-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #2f3b8f;
}

input[type="checkbox"] {
  display: none;
}

input[type="checkbox"]:checked ~ .sub-menu {
  max-height: 500px;
}

.sub-menu a {
  display: block;
  text-decoration: none;
  color: #dcdcdc;
  padding: 10px 40px;
}

.sub-menu a:hover {
  color: #ffffff;
}

/* Main */
.main {
  flex: 1;
  padding: 20px;
}

.main h2 {
  margin-bottom: 20px;
  font-size: 24px;
}

.dashboard {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.card {
  background-color: #ffffff;
  border-radius: 8px;
  width: 220px;
  height: 120px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 15px;
  transition: background 0.3s;
}

.card:hover {
  background-color: #e6ecf5;
  cursor: pointer;
}
/*TABLE STYLINGS*/
.table{
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    justify-content: center;
}
.table h3{
    color: #f4f6f9;
    width: 100%;
    padding: 5px;
    background-color:#2f3b8f;
    border-bottom: 1px solid;
    text-align: center;
}
table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background-color: #2f3b8f;
  color: white;
  padding: 12px;
  text-align: left;
}

tbody td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  }

tbody tr:hover {
  background-color: #fceae9;
  transition: 0.6s;
}

/*table stylings*/

/* Alerts */
.alerts {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alerts h2 {
  text-align: center;
  margin-bottom: 10px;
}

.errorcard {
  background-color: #ffffff;
  padding: 10px 15px;
  border-left: 5px solid #1e2a78;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-radius: 5px;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: #555;
}

/* Mobile *//* Enhanced Mobile Styling *//* Enhanced Mobile Styling */
@media screen and (max-width: 768px) {
  .contain {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .menu-item {
    padding: 12px 15px;
    font-size: 1rem;
  }

  .sub-menu a {
    padding: 8px 25px;
    font-size: 0.95rem;
  }

  .main {
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .main h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .dashboard {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .card {
    width: 100%;
    height: auto;
    padding: 10px;
    font-size: 0.95rem;
  }

  .table {
    width: 80%;
    margin-top: 20px;
    padding: 0;

  }

  .table h3 {
    font-size: 18px;
    margin-top: 30px;
    padding: 10px;
    text-align: center;
  }

  table{
    padding: 0;
    width: 100%;
    border-collapse: collapse;
  }
  .table h3{
    width: 100%;
  }
  table thead th{
    padding: 3px;
  }

  .alerts {
    margin: 20px 0;
    padding: 0 10px;
  }

  .errorcard {
    padding: 10px;
    font-size: 0.9rem;
  }

  footer {
    padding: 15px;
    font-size: 13px;
  }
}

/* Responsive tweaks for very small screens */
@media screen and (max-width: 480px) {
table th{
    padding: 2px;
}

  .table h3 {
    font-size: 1rem;
    padding: 10px;
  }

  .table {
    margin: 0;
  }
}
@media screen and (max-width: 344px) {
    .table h3{
        background-color: transparent;
        color: #1e2a78;
    }
}