/* Navigation buttons */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  margin-bottom: 20px;
  padding: 0 15px;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: var(--primary-color) !important;
  color: white !important;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-nav:hover {
  background-color: var(--primary-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.2);
}

.btn-nav:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-nav.btn-prev {
  background-color: var(--secondary-color) !important;
}

.btn-nav.btn-prev:hover {
  background-color: #898989 !important;
}

.btn-nav i {
  font-size: 1.1em;
}
/* Add new styles for SVG illustrations */
.illustration-top-right {
  position: absolute;
  top: 20px;
  right: -80px;
  width: 350px;
  height: auto;
  z-index: 100;
  pointer-events: none;
}

.illustration-bottom-left {
  position: absolute;
  top: 80px;
  left: 100px;
  width: 150px;
  height: auto;
  z-index: 100;
  pointer-events: none;
}

.illustration-top-right img,
.illustration-bottom-left img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 868px) {
  .illustration-top-right {
    position: absolute;
    top: 20px;
    right: -120px;
    width: 350px;
  }
  .illustration-bottom-left {
    position: absolute;
    left: 60px;
    width: 150px;
  }
}

@media (max-width: 768px) {
  .illustration-top-right {
    top: 20px;
    right: -90px;
    width: 250px;
  }
  .illustration-bottom-left {
    top: 60px;
    left: 60px;
    width: 110px;
  }
}

@media (max-width: 480px) {
  .illustration-top-right,
  .illustration-bottom-left {
    display: none;
  }
}

:root {
  --primary-color: #6c63ff;
  --primary-light: #8b84ff;
  --primary-dark: #5a52d5;
  --secondary-color: #a8a8a8;
  --accent-color: #f8f9fa;
  --text-dark: #333333;
  --border-color: #e0e0e0;
}

* {
  /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif; */
  font-family: "Quicksand", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

body {
  background: linear-gradient(135deg, #4a42da 0%, #8b84ff 50%, #7575e5 100%);
  min-height: 100vh;
  padding: 40px 20px;
  position: relative;
  overflow-x: hidden;
}

/* Added decorative circular gradient elements */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  opacity: 0.1;
  pointer-events: none;
}

body::before {
  width: 400px;
  height: 400px;
  background: white;
  top: -100px;
  right: -100px;
}

body::after {
  width: 300px;
  height: 300px;
  background: white;
  bottom: -50px;
  left: -50px;
}

.form-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
}

/* Added illustration container for left side */
.illustration-left {
  flex: 0 0 auto;
  display: none;
  width: 300px;
  height: 400px;
}

.illustration-left img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1));
}

.form-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  max-width: 900px;
  width: 100%;
  overflow: hidden;
  flex: 1;
}

/* Updated header with logo and new color scheme */
.form-header {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 40px 30px;
  text-align: center;
  position: relative;
}

.header-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: rgb(255, 255, 255);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.header-logo img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.form-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.5px;
}

.form-header p {
  margin: 10px 0 0 0;
  opacity: 0.95;
  font-size: 0.95rem;
}

.nav-tabs {
  border-bottom: 2px solid var(--border-color);
  padding: 0 30px;
  background: var(--accent-color);
  display: flex;
  gap: 10px;
}

.nav-tabs .nav-link {
  color: var(--text-dark);
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  padding: 12px 20px;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
}

.nav-tabs .nav-link:hover {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.nav-tabs .nav-link.active {
  color: white;
  background: var(--primary-color);
  border-bottom-color: var(--primary-color);
  border-radius: 8px 8px 0 0;
}

.tab-content {
  padding: 40px 30px;
}

.tab-pane {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 30px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #6b63ff42;
}

.form-section-title:first-child {
  margin-top: 0;
}

.form-group label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  font-size: 0.84rem;
}

.form-group label .required {
  color: var(--primary-color);
  margin-left: 2px;
}

.form-control,
.form-select {
  border: 1px solid #6b63ff72;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(108, 99, 255, 0.15);
}

.form-control::placeholder {
  color: #999;
}

.row-spacing {
  margin-bottom: 25px;
}

.button-group {
  display: flex;
  gap: 15px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid var(--border-color);
}

span.plus-sign,
span.minus-sign {
  width: 20px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  position: absolute;
  top: 50%;
  right: -13px;
  cursor: pointer;
}
.minus-sign {
  background: #9b0707 !important;
}

.btn-submit {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  border: none;
  padding: 12px 40px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(108, 99, 255, 0.4);
  color: white;
}

.btn-cancel {
  background: var(--secondary-color);
  color: white;
  border: none;
  padding: 12px 40px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-cancel:hover {
  background: #8a8a8a;
  transform: translateY(-2px);
}

.add-row-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-row-btn:hover {
  background: var(--primary-dark);
}

.nav-tabs .nav-link::after {
  content: attr(data-full); /* always show full label */
}

/* Added responsive design for illustrations */
@media (max-width: 1200px) {
  .form-wrapper {
    flex-direction: column;
    gap: 20px;
  }

  .illustration-left {
    display: none;
  }
}

@media (max-width: 768px) {
  .form-header {
    padding: 30px 20px;
  }

  .form-header h1 {
    font-size: 1.5rem;
  }

  .header-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
  }

  .header-logo img {
    width: 60px;
    height: 60px;
  }

  .tab-content {
    padding: 25px 20px;
  }

  /* .nav-tabs {
    padding: 0 15px;
    overflow-x: auto;
  } */

  .nav-tabs {
    display: flex;
    justify-content: space-between;
    gap: 5px;
    border-bottom: none;
    padding: 0 20px;
  }

  .nav-tabs .nav-item {
    flex: 1;
    transition: flex 0.3s ease;
  }

  .nav-tabs .nav-link {
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid #ccc;
    border-radius: 5px 5px 0 0;
    background-color: #f5f5f5;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.9rem;
    padding: 12px 8px;
  }

  /* Inactive tabs show short text */
  .nav-tabs .nav-link::after {
    content: attr(data-full);
    font-weight: bold;
    white-space: normal;
    text-overflow: clip;
  }

  /* Active tab shows full text */
  .nav-tabs .nav-link.active::after {
    content: attr(data-full);
    font-weight: bold;
    white-space: normal;
    text-overflow: clip;
  }

  /* Active tab expands */
  .nav-tabs .nav-link.active {
    flex: 2;
    background-color: var(--primary-color);
    color: #fff;
  }

  /* Smaller inactive tabs */
  .nav-tabs .nav-link:not(.active) {
    opacity: 0.85;
  }

  .nav-tabs {
    flex-wrap: nowrap;
  }
  .nav-tabs .nav-link {
    font-size: 0.85rem;
  }

  .button-group {
    flex-direction: column;
  }

  .btn-submit,
  .btn-cancel {
    width: 100%;
  }

  .form-group {
    padding-bottom: 8px;
  }
}

.select2-container--default
  .select2-selection--single
  .select2-selection__rendered,
.select2-container .select2-selection--single .select2-selection__clear {
  padding-top: 5px !important;
}

#sibling_name,
#sibling_age,
#sibling_grade,
#sibling_year {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #6b63ff72;
  border-radius: 6px; /* rounded corners */
  outline: none;
  font-size: 14px;
  transition: border-color 0.2s ease;
  margin-top: 10px;
}

.sib_info {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.84rem;
}

.add_sibling {
  font-size: 20px !important;
}

#Siblings-table td i.fa-trash-o {
  color: #d9534f;
  cursor: pointer;
  font-size: 1.2rem;
}

/* ===== Mobile view ===== */
@media (max-width: 768px) {
  .table > :not(caption) > * > * {
    border-bottom: none !important;
  }

  .add_sibling {
    margin-left: 50% !important;
    height: 20px;
    width: 20px;
    font-size: 25px !important;
  }

  #Siblings-table,
  #Siblings-table thead,
  #Siblings-table tbody,
  #Siblings-table th,
  #Siblings-table td,
  #Siblings-table tr {
    display: block;
  }

  #Siblings-table tr {
    margin-bottom: 15px;
    border-radius: 8px;
    background: #fff;
  }

  #Siblings-table tr .mobile_view {
    margin-bottom: 15px;
    border: 1px solid #7d76ff81;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
  }

  #Siblings-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border: none;
    font-size: 0.9rem;
  }

  #Siblings-table td:last-child {
    border-bottom: none;
  }

  #Siblings-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #444;
  }

  #Siblings-table td i.fa-trash-o {
    color: #ffff;
    cursor: pointer;
    font-size: 1.2rem;
  }

  .sib_info {
    width: 100% !important;
  }

  .mobile_view {
    width: 100% !important;
  }
  .mobile_remove {
    width: 100% !important;
  }

  .remove_sibling {
    padding: 10px 30px !important;
    background-color: #d9534f;
    margin-left: auto;
    margin-right: auto;
    border-radius: 10px;
  }
}
