
.fee-setting-wrapper {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.fee-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 30px;
}

/* Form Rows */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  align-items: flex-end;
}

.first-field-with-btn {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex: 1;
}

.input-group {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.input-group label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 5px;
}

.input-group select,
.input-group input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: white;
}

.input-group select:focus,
.input-group input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.due-date-input {
  min-width: 200px;
}

.icon-btn {
  background: #28a745;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.icon-btn:hover {
  background: #218838;
}

/* Form Row for Concession and Months */
.form-row-concession-months {
  display: flex;
  gap: 40px;
  margin-bottom: 30px;
}

/* Months Selection */
.months-select {
  flex: 1;
}

.months-select label:first-child {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
  display: block;
}

.months-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px 20px;
}

.months-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  font-weight: normal;
}

.months-grid input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #007bff;
}

/* Concession Section */
.concession-section {
  flex: 0 0 300px;
}

.concession-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 20px;
  transition: background-color 0.2s;
}

.concession-btn:hover {
  background: #218838;
}

/* Concession Card */
.concession-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e9ecef;
}

.card-content {
  margin-bottom: 15px;
}

.concession-type {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.concession-amount {
  font-size: 24px;
  font-weight: 600;
  color: #333;
}

.card-discount {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.discount-percent {
  background: #d4edda;
  color: #155724;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.icon-circle {
  width: 24px;
  height: 24px;
  background: #dee2e6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #666;
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.cancel-btn,
.save-btn {
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.cancel-btn {
  background: white;
  color: #666;
  border-color: #ddd;
}

.cancel-btn:hover {
  background: #f8f9fa;
}

.save-btn {
  background: #007bff;
  color: white;
}

.save-btn:hover {
  background: #0056b3;
}

/* Fee List Table */
.fee-list {
  margin-top: 40px;
}

.fee-list h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #dee2e6;
}

.fee-table th {
  background: #f8f9fa;
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #dee2e6;
  font-size: 14px;
}

.fee-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #dee2e6;
  font-size: 14px;
  color: #333;
}

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

.fee-table tbody tr:last-child td {
  border-bottom: none;
}

.apply-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.apply-btn:hover {
  background: #5a6268;
}

.edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 4px;
  color: #666;
  font-size: 14px;
  transition: background-color 0.2s;
}

.edit-btn:hover {
  background: #f0f0f0;
}

/* Popup Styles */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.popup-content {
  background: white;
  border-radius: 8px;
  padding: 0;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.popup-header {
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.popup-header strong {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.close-popup {
  font-size: 24px;
  cursor: pointer;
  color: #666;
  line-height: 1;
}

.close-popup:hover {
  color: #333;
}

.popup-form {
  padding: 20px;
}

.popup-form .form-row {
  display: flex;
  /* flex-direction: column; */
  align-items: center;
  margin-bottom: 15px;
  gap:10px;
}

.popup-form label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.popup-form select,
.popup-form input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: white;
}

.popup-form select:focus,
.popup-form input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.popup-actions {
  display: flex;
  justify-content:center;
  gap: 12px;
  margin-top: 20px;
}
/* Force Save button center in Late Fine popup */
#lateFinePopup .popup-actions {
  display: flex !important;
  justify-content: center !important;
  margin-top: 20px;
}

.popup-actions .save-btn {
  background: #28a745;
  color: #fff;
  padding: 8px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  
}

.popup-actions .save-btn:hover {
  background: #218838;
}
/* Tag Container */
.tag-container {
  padding: 15px 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  background: #e9ecef;
  color: #495057;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tag-close {
  cursor: pointer;
  font-weight: bold;
  color: #666;
}

.tag-close:hover {
  color: #333;
}

.popup-form p {
  color: #666;
  margin-bottom: 15px;
  font-size: 14px;
}

.popup-form hr {
  border: none;
  border-top: 1px solid #e9ecef;
  margin: 15px -20px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .form-row-concession-months {
    flex-direction: column;
    gap: 30px;
  }
  
  .concession-section {
    flex: none;
  }
  
  .months-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .fee-table {
    font-size: 12px;
  }
  
  .fee-table th,
  .fee-table td {
    padding: 8px 10px;
  }
  
  .popup-content {
    width: 95%;
    margin: 10px;
  }
}
/* Popup Overlay */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

/* Popup Box */
.concession-popup {
  background: #fff;
  width: 420px;   
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  overflow: hidden;
  font-family: Arial, sans-serif;
}

/* Header */
.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
}

.popup-header .close-popup {
  cursor: pointer;
  font-size: 18px;
}

/* Tag section */
.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid #ddd;
}

.tag {
  background: #f0f2f5;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 13px;
}

.tag .remove-tag {
  margin-left: 6px;
  cursor: pointer;
}

/* Body */
.popup-body {
  padding: 16px;
}

.form-title {
  font-weight: 500;
  margin-bottom: 14px;
}

/* Form rows */
.form-row {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.form-row label {
  width: 160px;
  font-size: 14px;
  color: #333;
}

.form-row select,
.form-row input {
  flex: 1;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Save button */
.form-actions {
  text-align: center;
  margin-top: 18px;
}

.btn-save {
  background: #666;
  color: #fff;
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn-save:hover {
  background: #444;
}
.custom-multiselect {
  position: relative;
  width: 100%;
  font-family: Arial, sans-serif;
}

.select-box {
  border: 1px solid #ccc;
  padding: 6px 10px;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 38px;
}

.select-box span#selected-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.select-box .arrow {
  margin-left: auto;
  font-size: 12px;
  color: #666;
}

.options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  border: 1px solid #ccc;
  background: #fff;
  max-height: 160px;
  overflow-y: auto;
  border-radius: 6px;
  display: none;
  margin-top: 4px;
  z-index: 999;
}

.options label {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}

.options label:hover {
  background: #f5f5f5;
}

.options input[type="checkbox"] {
  margin-right: 6px;
}

/* Pill (tag) style for selected items */
.tag {
  display: inline-flex;
  align-items: center;
  background: #f1f1f1;
  border-radius: 16px;
  padding: 3px 8px;
  font-size: 13px;
  color: #333;
}

.tag .remove {
  margin-left: 6px;
  font-size: 14px;
  cursor: pointer;
  color: #777;
}

.tag .remove:hover {
  color: #000;
}
.form-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.form-row label {
  width: 140px;   
  font-size: 14px;
  color: #333;
}

.form-row .form-control,
.form-row .custom-multiselect {
  flex: 1;
}
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 400px;
  max-height: 90vh;
  overflow-y: auto;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.popup-actions {
  margin-top: 15px;
  text-align: center;
}
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-box, .popup-content {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  min-width: 400px;
  z-index: 1001;
}
/* ===== Popup Overlay ===== */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: auto; 
}

/* ===== Popup Box ===== */
.popup-box,
.popup-content,
.concession-popup {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  width: 100%;
  max-width: 500px;   
  max-height: 90vh;   
  overflow-y: auto;  
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
}

/* ===== Popup Header ===== */
.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
}
.popup-header h3,
.popup-header strong {
  font-size: 18px;
  margin: 0;
}
.close-popup {
  font-size: 22px;
  cursor: pointer;
  color: #666;
}
.close-popup:hover {
  color: #000;
}

/* ===== Popup Body ===== */
.popup-body,
.popup-form {
  flex: 1;
  overflow-y: auto;   /* scroll inner content if long */
  padding: 15px 0;
}

/* ===== Actions ===== */
.popup-actions,
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 15px;
  flex-shrink: 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .popup-box,
  .popup-content,
  .concession-popup {
    max-width: 95%;
    padding: 15px;
  }
  .popup-actions,
  .form-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
}
@media (max-width: 480px) {
  .popup-box,
  .popup-content,
  .concession-popup {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;   /* fullscreen modal */
  }
}
.popup-box,
.popup-content,
.concession-popup {
  width: 100% !important;
  max-width: 500px !important;
  min-width: auto !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
}
/* Center Save button only for Add New Fee Item popup */
#feeItemPopup .popup-actions {
  display: flex;
  justify-content: center;
}
/* ===== Mobile Responsive Popup ===== */
@media (max-width: 768px) {
  #feeItemPopup .popup-content {
    width: 95% !important;   /* reduce width */
    padding: 15px;           /* tighter padding */
    max-height: 90vh;
    border-radius: 6px;
  }

  #feeItemPopup .form-row {
    flex-direction: column;  /* stack label + input */
    align-items: flex-start; 
    gap: 10px;
  }

  #feeItemPopup label {
    width: 100%;             /* labels full width */
    font-size: 14px;
  }

  #feeItemPopup input {
    width: 100%;             /* inputs full width */
  }

  #feeItemPopup .popup-actions {
    flex-direction: column;  /* stack actions */
    justify-content: center;
    align-items: center;
    gap: 12px;
  }

  #feeItemPopup .save-btn {
    width: 100%;            
    max-width: 300px;
  }
}
.form-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.form-actions .cancel-btn,
.form-actions .save-btn {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

/* Mobile view - buttons only cover text */
@media (max-width: 600px) {
  .form-actions .cancel-btn,
  .form-actions .save-btn {
    width: auto;        /* shrink to fit text */
    padding: 6px 14px;  /* smaller padding */
    font-size: 13px;    /* smaller text */
  }
}


/* Concession Type Button */
.concession-type-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;                   /* space between + and text */
  background-color: #28a745;  /* green theme */
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.concession-type-btn:hover {
  background-color: #218838;  /* darker on hover */
  transform: translateY(-1px);
}

/* optional: to align both +Concession buttons evenly */
.concession-buttons {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
