.payment-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem;
    background-color: var(--card-primary);
    box-shadow: var(--box-shadow);
    border-radius: 8px;
}

h1 {
    text-align: center;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.payment-table {
    width: 100%;
    border-collapse: collapse;
}

.payment-table th,
.payment-table td {
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    text-align: left;
    font-size: 0.95rem;
}

.payment-table th {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
}

.payment-table tr:nth-child(even) {
    background-color: var(--bg-secondary);
}

.payment-table tr:hover {
    background-color: var(--hover-bg);
}

.edit-icon {
    color: var(--accent-primary);
    cursor: pointer;
    margin-right: 8px;
}

.badge {
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--white);
}

.badge-success {
    background-color: var(--green-500);
}

.badge-danger {
    background-color: var(--gray-500);
}

/* Buttons */
.action-buttons {
    margin-top: 1.5rem;
    text-align: right;
}


/* Responsive */
@media (max-width: 768px) {

    .payment-table th,
    .payment-table td {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }
}

/* Action Buttons */
.menu-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.8rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    color: var(--white);
    cursor: pointer;
    font-size: 0.9rem;
    margin-right: 0.3rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: var(--box-shadow);
}

.menu-icon-btn:hover {
    transform: scale(1.05);
}

/* View Button */
.menu-icon-btn-view {
    background-color: var(--blue-500);
}

.menu-icon-btn-view:hover {
    background-color: var(--blue-600);
}

/* Edit Button */
.menu-icon-btn-edit {
    background-color: var(--green-500);
}

.menu-icon-btn-edit:hover {
    background-color: var(--green-600);
}

/* Delete Button */
.menu-icon-btn-delete {
    background-color: var(--gray-500);
}

.menu-icon-btn-delete:hover {
    background-color: #e11d48;
    /* Vivid red on hover */
}

/* Button Group */
.menu-icon-btn-group {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    /* Allow wrap only on very small screens */
    justify-content: flex-start;
}




/* ------------------------
   Candidate Detail Page
------------------------ */
.candidate-detail-page {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background-color: var(--bg-primary);
}

.candidate-detail-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: var(--box-shadow);
  border-radius: 12px;
  padding: 20px;
  max-width: 600px;
  width: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.candidate-detail-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}


.candidate-info-container {
  text-align: center;
  
}

.candidate-name {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.candidate-position {
  font-size: 1rem;
  color: var(--accent-primary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.candidate-description-detail {
  padding: 1rem;
  border-radius: 8px;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}




.back-btn-container {
  text-align: center;
}

.back-btn {
  display: inline-block;
  background-color: var(--accent-primary);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.back-btn:hover {
  background-color: var(--blue-600);
  transform: translateY(-2px);
}

.candidate-photo-show {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--accent-primary);
  background-color: var(--gray-100);
  box-shadow: var(--box-shadow);
}

/* ------------------------
   Candidate List Page
------------------------ */


/* General Page Layout */
.candidate-page {
  width: 100%;
  background-color: var(--bg-primary);
  box-sizing: border-box;
  overflow: hidden; /* Prevents sidebar being pushed down */
}

/* DESKTOP VIEW */
.candidate-desktop {
  display: flex;
  width: 100%;
  align-items: flex-start; /* Ensure sidebar and main align at the top */
}

/* Sidebar */
.candidate-sidebar {
  flex: 0 0 33.33%; /* Sidebar fixed to 1/3 width */
  max-width: 33.33%;
  padding: 1rem;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  box-sizing: border-box;
  overflow-y: auto; /* Allow scrolling if content is tall */
}

/* Main Content */
.candidate-main {
  flex: 1; /* Take up remaining space */
  max-width: 66.66%;
  padding: 1rem;
  box-sizing: border-box;
  overflow-wrap: break-word; /* Prevent overflow */
}

/* Tabs */
.candidate-tabs {
  list-style: none;
  padding: 0;
  margin: 0;
}

.candidate-tab {
  cursor: pointer;
  padding: 10px;
  margin-bottom: 5px;
  background-color: var(--bg-primary);
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.candidate-tab.active {
  background-color: var(--accent-primary);
  color: var(--white);
}

/* Grid Layout */
.candidate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns desktop */
  gap: 1rem;
}

/* Candidate Card */
.candidate-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.candidate-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Candidate Photo */
.candidate-photo-list {
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
}

.candidate-photo-list img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
  background-color: var(--gray-100);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.candidate-photo-list img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Candidate Info */
.candidate-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.candidate-description {
  overflow-wrap: break-word;
  word-wrap: break-word;
  max-width: 100%;
  margin-top: 10px;
  line-height: 1.5;
}

/* Limit extremely long descriptions */
.candidate-description {
  max-height: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.candidate-description::after {
  content: "...";
  position: absolute;
  bottom: 0;
  right: 0;
  padding-left: 5px;
  background: var(--bg-secondary);
}

/* Mobile View */
.candidate-mobile {
  display: none;
}

@media (max-width: 768px) {
  .candidate-desktop {
    display: none;
  }

  .candidate-mobile {
    display: block;
    padding: 1rem;
  }

  .candidate-position-dropdown {
    margin-bottom: 1rem;
  }

  #positionDropdown {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
  }

  .candidate-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}
