:root {
  --primary-color: #e32251;
  --background-color: #2d4a8f;
  --text-color: #333333;
  --border-color: #d1d3e2;
}

body {
  background-color: var(--background-color);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.header {
  background: white;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-bottom: 3px solid var(--primary-color);
}

.header-logo {
  max-height: 45px;
  width: auto;
}

.form-title {
  color: var(--background-color);
  font-weight: 800;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-number {
  background-color: var(--primary-color);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
}

/* Progress Bar */
.progress-container {
  background: white;
  position: sticky;
  top: 80px;
  z-index: 1010;
  border-bottom: 1px solid var(--border-color);
}

.progress {
  height: 6px;
  background-color: #e9ecef;
  border-radius: 0;
}

.progress-bar {
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.step-label {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step-label.text-primary {
  color: var(--primary-color) !important;
}

/* loader  */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader-container {
  text-align: center;
  color: #003366; /* matches RPL theme */
}

.spinner {
  border: 4px solid #e0e0e0;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

/* modal  */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  align-items: center;
  z-index: 9998;
}

.modal {
  background: white;
  border-radius: 10px;
  padding: 35px 25px;
  max-width: 400px;
  width: 90%;
  height: 300px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.form-group select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 15px;
  color: black;
  outline: none;
}

.form-group select:focus {
  border-color: var(--background-color);
}

.modal-buttons {
  display: flex;
  justify-content: center;
  margin-top: 35px;
  gap: 10px;
}

.btn {
  padding: 10px 22px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn.cancel {
  background-color: #ccc;
  color: #333;
}

.btn.confirm {
  background-color: var(--primary-color);
  font-weight: 600;
  color: white;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.d-none {
  display: none !important;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
  background-color: var(--background-color);
  min-height: 85vh;
}

.form-container {
  background: white;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Card Styles */
.card {
  border: none;
  border-radius: 0;
}

.card-body {
  padding: 2.5rem;
}

.card-title {
  color: var(--background-color);
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 0.75rem;
}

.form-label {
  color: #222222;
  font-weight: 500 !important;
  margin-bottom: 10px;
  font-size: 16px;
  font-family: "Inter", sans-serif;
}

.form-control,
.form-select {
  border: 1px solid #b8bbd3;
  border-radius: 4px;
  min-height: 42px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background-color: #fff !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(227, 34, 81, 0.15);
}

.btn {
  border-radius: 8px;
  font-weight: 700;
  padding: 0.75rem 2rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #c11a43;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(227, 34, 81, 0.3);
}

.btn-success {
  background-color: var(--primary-color);
  color: white;
  border: none;
}

.btn-success:hover {
  background-color: #c11a43;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(227, 34, 81, 0.3);
}

.btn-outline-secondary {
  border: 2px solid #6c757d;
  color: #6c757d;
  background: transparent;
}

.btn-outline-secondary:hover {
  background-color: #6c757d;
  color: white;
  transform: translateY(-2px);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-1px);
  border-color: #e32251;
}

.btn-danger {
  background-color: #dc3545;
  border: none;
}

.btn-danger:hover {
  background-color: #c82333;
  transform: scale(1.05);
}

.table-responsive-sm {
  overflow-x: auto;
}

.table thead th {
  background-color: var(--background-color);
  color: white;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody td {
  border-color: #f1f3f4;
  padding: 1rem;
  vertical-align: bottom;
}
.delete {
  background-color: #fff;
  border: 1px solid #b8bbd3;
  padding: 0px;
  height: 42px;
  width: 42px;
  border-radius: 4px;
}
.delete:hover {
  background-color: #ffffff;
  transform: scale(1.05);
  border-color: #e32251;
}
.qualification-row label {
  line-height: 23.4px;
  font-size: 16px;
  font-family: "Inter";
  color: #222222;
  margin-bottom: 10px;
}

.table tbody tr:hover {
  background-color: rgba(45, 74, 143, 0.05);
}

.table tfoot td {
  background-color: #f8f9fa;
  font-weight: 700;
  color: var(--background-color);
  border-top: 2px solid var(--border-color);
}

.amount-field {
  background-color: #f8f9fa;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  border: none;
  font-size: 1rem;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

/* HR Styling */
hr {
  border: none;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--border-color),
    var(--primary-color)
  );
  margin: 2rem 0;
}

/* Toast Styles  */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 200px;
  max-width: 250px;
  background-color: #333;
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.4s ease;
  font-size: 14px;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.success {
  background-color: #28a745;
}
.toast.error {
  background-color: var(--primary-color);
}
.toast.info {
  background-color: #007bff;
}
.toast.warning {
  background-color: #ffc107;
  color: #000;
}

.error-border {
  border: 1.5px solid red !important;
}
@media (max-width: 768px) {
  .form-title {
    font-size: 1.2rem;
  }

  .form-number {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }

  .main-content {
    max-height: calc(100vh - 200px);
    padding: 15px 0;
  }

  .card-body {
    padding: 1.5rem;
  }

  .footer .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .progress-container {
    top: 78px;
  }
  .d-flex {
    display: flex !important;
    flex-direction: column;
  }
  .header .col-md-6 {
    width: 40%;
    padding: 0px;
  }
  .header h1 {
    font-size: 14px;
  }
  .header .col-md-3 {
    width: 30%;
    padding: 5px;
  }
}

@media (max-width: 576px) {
  .card-body {
    padding: 1rem;
  }

  .form-title {
    font-size: 1.1rem;
  }

  .card-title {
    font-size: 1.3rem;
  }

  .btn {
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
  }

  .table thead th {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  #addQualificationRow {
    font-size: 8px;
  }
}

@media (max-width: 430px) {
  .header-logo {
    margin-bottom: 0px;
    height: 60px;
    width: 60px;
  }
  .form-number {
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .form-number {
    display: block;
  }
}

main.main-content {
  background: #f1f5f8;
}
.progress-container {
  display: none;
}
.card {
  background: transparent;
  box-shadow: none !important;
}
.subheading {
  font-family: "montserrat";
  font-size: 20px;
  font-weight: 700;
  border-bottom: 1px solid rgb(0 0 0 / 20%);
  padding: 12px 0px 14px 0px;
  margin-bottom: 20px !important;
}
.form-check-input {
  width: 20px;
  height: 20px;
  border: 1px solid #b8bbd3;
  --bs-form-check-bg: #ffffff00;
}
.form-check-label {
  font-size: 16px;
  font-family: "Inter";
  font-weight: 500;
  line-height: 23.4px;
  padding-left: 10px;
}
.row > * {
  padding-right: calc(var(--bs-gutter-x) * 0.8);
  padding-left: calc(var(--bs-gutter-x) * 0.8);
}
.confirm {
  width: 200px;
  border-radius: 150px;
  font-size: 18px;
  font-weight: 400;
  font-family: "Inter";
  margin-top: 45px;
}
.row.g-3.mb-4 {
  display: flex;
  align-items: center;
}
button#addQualificationRow {
  font-size: 18px;
  line-height: 23px;
  font-weight: 500;
  font-family: "Inter";
  border: 1px solid #e32251;
  border-radius: 150px;
  height: 50px;
}
.qualification-row td {
  border-color: #f1f3f400 !important;
  background-color: transparent;
  width: 33%;
}
tr.qualification-row {
  border: none;
}
.table tfoot td {
  border-color: #f1f3f400 !important;
  background-color: transparent;
}
.main-total {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sub-total {
  width: 50%;
  text-align: left;
}
.payment-type {
  width: 50%;
}
.sub-total label {
  font-size: 16px;
  color: #222;
  font-family: "Inter";
  margin-bottom: 10px;
  font-weight: 500;
}
div#totalAmount {
  height: 42px;
  background: #fff;
  border: 1px solid #b8bbd3;
  border-radius: 4px;
  font-size: 16px;
  line-height: 23.4px;
  padding: 8px;
  font-family: "Inter";
  color: #222;
  font-weight: 600;
}
tfoot tr {
  border: 0px;
}
/* Mobile Responsive Table */
@media (max-width: 768px) {
  /* Make the table display as a flex container */
  .table,
  .table tbody,
  .table tr {
    display: block;
    width: 100%;
  }

  /* Make each td block-level to take full width */
  .table td {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 8px;
    border: none; /* Remove border for better spacing */
  }
  .dlt-button {
    display: flex;
    justify-content: end;
    align-items: end;
  }
  button#addQualificationRow {
    font-size: 12px;
  }
  .confirm {
    margin-top: 10px;
  }

  tfoot tr {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap;
  }
  .delete {
    padding: 0px;
  }
  .d-flex {
    flex-wrap: wrap;
    flex-direction: row;
  }
  .table tbody td {
    padding: 0.5rem 0;
  }
  tfoot tr td {
    padding: 8px 0px !important;
  }
}
