#page-maximum-loan{
  overflow-x: hidden;
}
.tools-slider {
  padding: 20px 0 15px;
}

.slider-tools {
  .slider-tools__img {
    width: 100%;
    display: block;
    border-radius: 10px;
    position: relative;
    overflow: hidden;

    &::after {
      content: "";
      display: block;
      padding-top: calc((372 / 1232) * 100%);
    }

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      position: absolute;
      top: 0;
      left: 0;
    }
  }

  &.slick-dotted {
    margin-bottom: 0;
  }

  .slick-prev {
    left: 15px;
  }

  .slick-next {
    right: 15px;
  }

  .slick-dots {
    bottom: 20px;

    li {
      width: auto;
      height: auto;

      &.slick-active button {
        background: var(--color-1);
        opacity: 1;
      }
    }

    button {
      width: 8px;
      height: 8px;
      background: black;
      opacity: 0.2;
      border-radius: 50%;

      &::before {
        display: none;
      }
    }
  }
}

/* Tools tabs (3 nút như mẫu) */
.tools-tab-link {
  padding: 0 0 20px;
}

.tools-tabs {
  display: flex;
  gap: 16px;
  white-space: nowrap;
  overflow-x: auto;
}

.tools-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 20px 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-1);
  background: #fff;
  color: var(--color-1);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.05s ease;
}

.tools-tab:hover {
  box-shadow: 0 10px 22px rgba(47, 79, 230, 0.12);
}

.tools-tab:active {
  transform: translateY(1px);
}

.tools-tab__icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
}

.tools-tab__text {
  line-height: 1.2;
  font-size: 15px;
}

.tools-tab.is-active {
  background: linear-gradient(90deg, #FF9800 0%, #FFC107 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 24px rgba(246, 172, 44, 0.25);
}

/* Maximum loan tool */
.tools-section {
  padding: 0 0 40px;
}

.tools-block {
  gap: 22px;

  &:not(.is-family) {
    .family-row {
      display: none;
    }

    .family-field {
      display: none;
    }
  }
  .tool-field-group{
    .tool-field{
      @media (max-width: 576px) {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        &.family-field{
          display: none;
        }
        .input-control {
          flex: 1;
        }
        label{
          width: 75px;
          padding-top: 5px;
        }
      }
    }
  }
  &.is-family {
    .tool-field-group {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      @media (max-width: 576px) {
        grid-template-columns: 100%;
        .tool-field{
          &.family-field{
            display: flex;
          }
        }
      }
    }
  }
}

.tools-block__content {
  flex: 1 1 64%;
  min-width: 320px;
}

.tools-block__sidebar {
  flex: 0 0 360px;
  min-width: 320px;
}

.tool-card {
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
  padding: 18px 18px;
  overflow: hidden;
}

.tool-title {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
}

.tool-desc {
  color: #475569;
  font-size: 14px;
  margin: 0 0 14px;
}

.tool-segment {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: #f9bd0933;
}

.tool-segment__btn {
  flex: 1 1 50%;
  border: 0;
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  background: transparent;
  transition: all 0.15s ease;
}

.tool-segment__btn.is-active {
  background: linear-gradient(90deg, #FF9800 0%, #FFC107 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(47, 79, 230, 0.20);
}

.tool-group {
  margin-top: 14px;
  border: 1px solid #eef0f4;
  border-radius: 8px;
  overflow: hidden;

  .input-control {
    width: 100%;
    height: 33px;

    &.tool-label__select {
      padding-right: 30px;
    }
  }
}

.tool-group__header {
  padding: 14px 16px;
  font-weight: 800;
  color: #0f172a;
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
}

.tool-group__body {
  padding: 14px 16px;
  display: grid;
  gap: 14px;
}

.family-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;

  .tool-field-group {
    margin-left: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-align: center;
 
    .tool-field {
      gap: 0;
      padding-right: 30px;
    }
  }
}

.tool-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.tool-label {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  @media (max-width: 992px) {
    border-bottom: 1px solid #eef0f4;
    padding-bottom: 5px;
    margin-bottom: 10px;
  }
}

.tool-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px;

  &.s2 {
    grid-template-columns: 1fr 90px auto;
  }

}

.tool-suffix {
  height: 33px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  background: #fff;
  font-weight: 800;
}

.maxloan-summary {
  background: linear-gradient(0deg, #FF9800 0%, #FFC107 100%);
  color: #fff;
  border: 0;
}

.maxloan-summary__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}

.maxloan-summary__item {
  display: grid;
  gap: 6px;
}

.maxloan-summary__label {
  font-size: 12px;
  opacity: 0.92;
  font-weight: 700;
}

.maxloan-summary__value {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.maxloan-summary__footer {
  margin: 14px -18px -18px;
  padding: 12px 18px;
  background: linear-gradient(0deg, #FFC107 0%, #FFC107 100%);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: #0c0808;
  border-radius: 12px;
}

.maxloan-note {
  margin-top: 10px;
  font-size: 12px;
  color: #334155;
  font-weight: 600;
}

.maxloan-summary__action {
  margin-top: 14px;
}

.maxloan-summary__button {
  width: 100%;
  padding: 12px 20px;
  background: #fff;
  border: 1px solid #2563eb;
  border-radius: 8px;
  color: #2563eb;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  &:not(:last-child) {
    margin-bottom: 10px;
  }
  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  &.is-secondary {
    background: #fff;
    border: 1px solid var(--color-1);
    color: var(--color-1);
  }
}

.maxloan-summary__button:hover {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.maxloan-summary__button:active {
  transform: translateY(1px);
}
.tools-action{
  background: #f9bd0933;
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
 
}
.tools-action__button{
  background: linear-gradient(90deg, #FF9800 0%, #FFC107 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(47, 79, 230, 0.20);
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  .material-icons-outlined{
    font-size: 20px;
  }
  &#ml_reset{
    background: rgb(167, 167, 167);

  }
}
@media (max-width: 992px) {
  .tools-block__sidebar {
    flex: 1 1 100%;
  }

}