body {
  background: #f6f6f6;
  margin: 0;
}
.batch-promotion-page {
  font-family: 'Segoe UI', Arial, sans-serif;
  width: 100%;
  padding: 0;
}

.filter-bar {
  margin-top: 24px;
  background: #fff;
  padding: 24px 32px 18px 32px;
  display: flex;
  flex-direction: column;
  border-radius: 6px 6px 0 0;
}
.filter-bar > span {
  font-size: 16px;
  color: #212121;
  margin-bottom: 16px;
  font-weight: 500;
  letter-spacing: 0.1px;
}
.filter-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 28px;
}
.filter-controls label {
  font-size: 15px;
  color: #3f3f3f;
  font-weight: 400;
}
.filter-controls select {
  font-size: 15px;
  min-width: 110px;
  margin-left: 7px;
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid #bbb;
  background: #fff;
}
.search-btn {
  margin-left: 18px;
  padding: 8px 32px;
  font-size: 15px;
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.13s;
  box-shadow: 0 2px 0 #d1d1d1;
}
.search-btn:hover { opacity: 0.85; }

.student-fee-section {
  background: #fff;
  border-radius: 0 0 6px 6px;
  padding: 0 32px 26px 32px;
  margin-bottom: 28px;
  box-shadow: 0 2px 16px #ececec70;
}
.student-fee-list-title {
  font-size: 16px;
  color: #232323;
  font-weight: 500;
  margin: 28px 0 12px 0;
}
.student-fee-table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 24px;
}
.student-fee-table th, .student-fee-table td {
  padding: 12px 8px;
  font-size: 15px;
  text-align: left;
}
.student-fee-table th {
  background: #ededed;
  font-weight: 600;
  color: #2d2d2d;
  letter-spacing: 0.14px;
  border-bottom: 1px solid #e2e2e2;
}
.student-fee-table tr {
  border-bottom: 1px solid #eaeaea;
}
.student-fee-table tr:last-child {
  border-bottom: none;
}
.student-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #d3d3d3;
  display: inline-block;
}
.student-fee-table input[type="checkbox"] {
  accent-color: #232323;
  width: 17px;
  height: 17px;
}
.fee-list-bottom {
  display: flex;
  justify-content: flex-end;
}
.promote-btn {
  padding: 12px 44px;
  background: #1d4ed8;
  color: #fff;
  font-size: 17px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  box-shadow: 0 2px 0 #bbb;
  cursor: pointer;
  transition: 0.15s;
}
.promote-btn:hover { opacity: 0.85; }

/* Overlay */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Popup Box */
.popup-content {
  background: #f5f5f5;
  padding: 20px;
  border-radius: 8px;
  width: 350px;
  position: relative;
}

/* Student Details Box */
.details-box {
  background: #d9d9d9;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 15px;
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 20px;
  cursor: pointer;
}

/* Form Styling */
form label {
  display: block;
  margin-top: 10px;
  font-weight: 500;
}

form select,
form input {
  width: 100%;
  padding: 6px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

form button {
  margin-top: 15px;
  width: auto;
  padding: 8px 20px;
  background: #333;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: block;
  margin-left: auto;
  margin-right: auto;
  
}

form button:hover {
  background: #000;
}

/*  Responsive Additions */
@media (max-width: 900px) {
  .filter-controls {
    flex-wrap: wrap;
    gap: 16px;
  }
  .search-btn {
    margin-left: 0;
  }
}

@media (max-width: 700px) {
  .student-fee-section {
    padding: 0 16px 20px 16px;
  }
  .student-fee-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .student-fee-table th, .student-fee-table td {
    font-size: 14px;
    padding: 10px 6px;
  }
  .fee-list-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .promote-btn {
    width: 100%;
  }
}

@media (max-width: 500px) {
  .filter-bar {
    padding: 20px;
  }
  .filter-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .search-btn {
    width: 100%;
  }
  .student-fee-table th, .student-fee-table td {
    font-size: 13px;
  }
}
/* ===== Student Fee Table Styling ===== */
.student-fee-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  font-size: 14px;
}

.student-fee-table thead {
  background: #0d6efd; /* primary blue */
  color: #fff;
  text-align: left;
}

.student-fee-table thead th {
  padding: 12px 16px;
  font-weight: 600;
}

.student-fee-table tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.student-fee-table tbody tr:hover {
  background: #f9f9ff;
}

.student-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-cell .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ddd;
}

/* ===== DataTables Defaults Override ===== */
.dataTables_wrapper {
  margin-top: 15px;
  font-family: "Segoe UI", sans-serif;
}

.dataTables_filter input {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 10px;
  outline: none;
}

.dataTables_length select {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 4px;
}

.dataTables_paginate .paginate_button {
  border: 1px solid #ddd;
  background: #fff;
  margin: 2px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.dataTables_paginate .paginate_button.current {
  background: #0d6efd;
  color: #fff !important;
  border: 1px solid #0d6efd;
}

.dataTables_info {
  margin-top: 8px;
  font-size: 13px;
  color: #666;
}

.dataTables_filter {
  margin-bottom: 16px; 
}


.fee-list-bottom {
  margin-top: 20px; 
}


/* Force horizontal scroll for DataTables wrapper */
.dataTables_wrapper {
  width: 100%;
  overflow-x: auto;
}

.student-fee-table {
  min-width: 600px; /* ensure all columns fit */
}
@media (max-width: 700px) {
  .dataTables_wrapper {
    width: 100%;
    overflow-x: auto;
  }
  .student-fee-table {
    min-width: 510px;
  }
}
/* Success Popup Styling */
.success-box {
  text-align: center;
  background: #f3f3f3;
  padding: 30px;
  border-radius: 10px;
  width: 380px;
}

.success-icon {
  font-size: 48px;
  color: #16a34a; /* green */
  margin-bottom: 15px;
}

.success-box h2 {
  margin: 10px 0;
  font-size: 22px;
  font-weight: 600;
}

.success-box p {
  font-size: 15px;
  color: #555;
  margin-bottom: 20px;
}

.back-btn {
  background: #333;
  color: #fff;
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 0 #bbb;
}

.back-btn:hover {
  background: #000;
}
/* Success Popup Button */
#successPopup .popup-content #backBtn {
  padding: 8px 18px;          /* smaller size */
  font-size: 14px;            /* smaller text */
  background: #333;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: block;
  margin: 15px auto 0 auto;   /* center horizontally */
  transition: background 0.2s ease;
  width: auto;                /* compact, not full width */
  min-width: 120px;           /* small but still tappable */
}

#successPopup .popup-content #backBtn:hover {
  background: #000;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  #successPopup .popup-content #backBtn {
    font-size: 13px;
    padding: 7px 16px;
    min-width: 100px;
  }
}
/* Scoped only for batchPromotionRoute */
.batch-promotion-page .filter-controls .search-btn {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

/* Mobile view */
@media (max-width: 600px) {
  .batch-promotion-page .filter-controls .search-btn {
    width: auto !important;   /* force shrink */
    padding: 6px 14px !important;
    font-size: 13px !important;
    display: inline-block !important;
  }
}
