/* ============================================================================
   RESET & GLOBAL STYLES
============================================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Ensures padding/margin don’t break layout */
}
html, body {
  width: 100%;
  overflow-x: hidden;
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  color: #333;
}

/* ============================================================================
   HEADER STYLES
============================================================================ */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #34495e;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 4;
}

.menu-toggle {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 999;
}

.header-box {
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 8px 12px;
  display: flex;
  flex-direction: row;
  height: 90px;
  min-width: 220px;
}

.profile-col {
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-image {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  overflow: hidden;
}
.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-left: 10px;
}

.credit-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.9em;
  color: #000;
  line-height: 1.2;
}
.credit-info div {
  margin-bottom: 4px;
}

.nav-links {
  text-align: right;
}
.nav-links a {
  color: #2c3e50;
  text-decoration: none;
  font-size: 14px;
  margin-left: 10px;
}

/* ============================================================================
   SIDEBAR STYLES
============================================================================ */
.sidebar {
  position: fixed;
  top: 110px; /* Header height + margin */
  bottom: 0;
  left: 0;
  width: 0;
  background-color: #2c3e50;
  overflow-y: auto;
  padding-top: 40px;
  transition: width 0.5s;
  z-index: 2;
}

.sidebar a,
.sidebar .main-category {
  padding: 10px 15px;
  text-decoration: none;
  font-size: 14px;
  color: white;
  display: block;
  transition: background-color 0.3s;
}

.sidebar a:hover,
.sidebar .main-category:hover {
  background-color: #28a745;
}

.sidebar .main-category {
  cursor: pointer;
  font-weight: bold;
}

.sidebar .menu-item .sub-category {
  display: none;
  padding-left: 20px;
  color: #f8f8f8;
}

/* ============================================================================
   MAIN CONTENT AREA STYLES
============================================================================ */
.main {
  margin-top: 90px; /* Space for fixed header */
  padding: 20px;
  padding-top: 0;
  transition: margin-left 0.5s;
}

/* ============================================================================
   FORM COMPONENTS
============================================================================ */
.input-field {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}
.input-field label {
  margin-bottom: 5px;
  color: #007BFF;
  font-weight: bold;
}
.input-field input,
.input-field select,
.input-field textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  color: #333;
}

.button-group {
  text-align: center;
  margin-top: 20px;
}
.button-group button {
  width: 100%;
  padding: 12px 15px;
  border: none;
  border-radius: 4px;
  background-color: #28a745;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.button-group button:hover {
  background-color: #218838;
}

.avatar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ============================================================================
   TABLE & PAGINATION STYLES
============================================================================ */
.table-container {
  overflow-x: auto;
}
.table-container table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 40px;
}
.table-container th,
.table-container td {
  padding: 10px 15px;
  border: 1px solid #ccc;
  text-align: left;
  font-size: 16px;
}
.table-container th {
  background-color: #34495e;
  color: white;
}
.table-container td {
  color: #333;
}
.table-container tr:nth-child(even) {
  background-color: #f2f2f2;
}

.pagination {
  text-align: center;
  padding: 20px 0;
}
.pagination a,
.pagination b {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 4px;
  border-radius: 4px;
  border: 1px solid #ddd;
  text-decoration: none;
  color: #333;
  font-size: 16px;
}
.pagination b {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}
.pagination a:hover {
  background-color: #ddd;
}
.pagination a.prev,
.pagination a.next {
  background-color: #f8f9fa;
  color: #007bff;
}




/* ============================================================================
   RESPONSIVE STYLES
============================================================================ */
@media screen and (max-width: 768px) {
  .sidebar {
    width: 0;
    padding-top: 50px;
    overflow-x: hidden;
  }
  .main {
    margin-left: 0;
    padding: 20px 10px;
  }
  .form-container {
    margin-top: 20px;
  }

  .chart-container {
    height: 300px;
    padding: 15px;
    margin: 20px 10px;
  }
}
