:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #4338ca;
    --secondary: #10b981;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #94a3b8;
    --gray-light: #e2e8f0;
    --danger: #ef4444;
    --success: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 0.25rem;
    --radius: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
  }
  
  /** {*/
  /*  box-sizing: border-box;*/
  /*  margin: 0;*/
  /*  padding: 0;*/
  /*}*/
  
  body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #f1f5f9;
    padding: 0;
  }
  
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
  }
  
  .calculator-container {
    background-color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: 20px;
  }
  
  .header {
    /* padding-top: 2rem; */
    /* background: linear-gradient(135deg, var(--primary), var(--primary-light)); */
    color: white;
  }
  
  h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
  }
  
  .subtitle {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 100%;
    color: #555 !important;
  }
  
  .tabs {
    display: flex;
    background-color: white;
    border: 1px solid black;
  }
  
  .tab {
    flex: 1;
    padding: 1rem 1.5rem;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    color: black;
    transition: all 0.2s ease;
    border-right: 1px solid black;
  }

  .tab:last-child {
    border-right: none;
  }
  
  /* .tab:hover {
    color: var(--primary);
  } */
  
  .tab.active {
    color: #FFFF;
    /* border-bottom: 3px solid var(--primary); */
    font-weight: 600;
    background-color: black;
  }
  
  .tab-content {
    display: none;
    padding-top: 30px;
  }
  
  .tab-content.active {
    display: block;
  }

  .tab-content .borrowing-right {
    padding: 10px 20px;
    background-color: #f4f4f4;
  }

  .tab-content .borrowing-left {
    padding: 10px 20px;
    /* background-color: black; */
  }
  
  .section-title-calculator {
    font-size: 20px !important;
    font-weight: 400;
    /* margin-bottom: 1.5rem; */
    color: var(--dark);
    text-align: left !important;
    /* position: relative; */
    /* padding-left: 1rem; */
    margin: 0 !important;
  }
  
  .section-title-calculator::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    /* background-color: var(--primary); */
    border-radius: var(--radius-sm);
  }
  
  .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .form-group {
    margin-bottom: 0;
  }

  .form-inline {
    align-items: flex-start;
  }
  
  label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark);
  }
  
  .input-wrapper {
    position: relative;
  }
  
  input, select {
    width: 100%;
    padding: 0.75rem 1rem;
    /* border: 1px solid var(--gray-light); */
    /* border-radius: var(--radius-sm); */
    font-family: inherit;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background-color: white;
    height: 50px;
  }
  
  input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    /* box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); */
  }
  
  .input-addon {
    display: flex;
    align-items: center;
    background-color: white;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }
  
  .input-addon input {
    flex: 1;
    border: none;
    padding: 0.75rem 1rem;
  }
  
  .input-addon .addon {
    padding: 0.75rem 1rem;
    background-color: var(--light);
    color: var(--dark);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
  }
  
  .input-note {
    font-size: 0.75rem;
    color: var(--gray);
    margin: 0 !important;
  }

    /* Loan Calculator Styles */
  .loan-calculator {
    background-color: black;
    padding: 2rem;
    border-radius: var(--radius-md);
  }

  .loan-calculator .results-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
  }

  .loan-calculator .result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin: 1rem 0;
  }

  .loan-calculator .slider-container {
    margin-bottom: 2rem;
  }

  .loan-calculator .slider {
    width: 100%;
    height: 8px;
    /* -webkit-appearance: none; */
    background: var(--gray-light);
    border-radius: 4px;
    margin-bottom: 0.5rem;
  }

  .loan-calculator .slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--gray);
  }

  .loan-calculator .repayment-header {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
  }

  .loan-calculator .repayment-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    /* flex-wrap: wrap; */
  }

  .loan-calculator .repayment-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
  }

  .loan-calculator .loan-select {
    font-size: 1rem;
    color: white;
    padding: 0.25rem 0.5rem;
    background-color: black;
    border: black;
    /* border-radius: var(--radius-sm); */
    width: 135px;
  }

  .loan-calculator .loan-term-label {
    font-size: 1rem;
    color: white;
    margin-left: 20px;
  }

  .loan-calculator .loan-detail-box {
    background-color: black;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    /* border: 1px solid var(--gray); */
  }

  .loan-calculator .detail-title {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: white;
  }

  .loan-calculator .detail-content {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
    flex-wrap: wrap;
  }

  .loan-calculator .loan-option-select {
    font-size: 1rem;
    /* font-weight: 600; */
    color: black;
    background-color: white;
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    width: 330px;
  }

  .loan-calculator .equals-sign {
    font-size: 1rem;
    color: white;
  }

  .loan-calculator .custom-rate-text {
    font-size: 1rem;
    color: white;
  }

  .loan-calculator .custom-rate-btn {
    font-size: 1rem;
    color: white;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
  }

  .loan-calculator .comparison-rate {
    color: white;
    margin-top: 0;
    font-size: 0.875rem;
  }

  .loan-calculator .disclaimer {
    font-size: 0.75rem;
    color: white;
  }

  .loan-calculator .custom-input {
    font-size: 1rem;
    font-weight: 600;
    color: black;
    background-color: white;
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    width: 120px;
  }

  .why-apply {
    border: 1px solid var(--gray);
    border-radius: 8px;
  }

  .why-apply .why-box {
    padding: 25px;
  }

  .home-loan-btn {
    font-size: 1rem;
    color: green;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
  }
  
  .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .radio-option {
    position: relative;
  }
  
  .radio-option input {
    position: absolute;
    opacity: 0;
  }
  
  .radio-option label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--light);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .radio-option input:checked + label {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
  }
  
  .results-container {
    background-color: white;
    border-radius: var(--radius-md);
    padding: 2rem;
    /* margin-top: 2rem; */
  }
  
  .results-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white !important;
  }
  
  .results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .result-card {
    background-color: white;
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
  }
  
  .result-label {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
  }
  
  .result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color:black;
  }
  
  .result-subvalue {
    font-size: 0.875rem;
    color: var(--gray);
  }
  
  .slider-container {
    margin: 2rem 0;
  }
  
  .slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--gray-light);
    outline: none;
    border-radius: 4px;
    margin: 1rem 0;
  }
  
  .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
  }
  
  .slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--gray);
  }
  
  .circle-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 2rem 0;
  }
  
  .circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 2px solid var(--gray-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background-color: white;
    box-shadow: var(--shadow-sm);
  }
  
  .circle-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
  }
  
  .circle-label {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.5rem;
  }
  
  .operation-symbol {
    font-size: 1.5rem;
    color: var(--gray);
    font-weight: 700;
  }
  
  .toggle-container {
    display: flex;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--gray-light);
    margin-bottom: 1rem;
  }
  
  .toggle-option {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
  }
  
  .toggle-option.selected {
    background-color: var(--dark);
    color: white;
  }
  
  .accordion {
    margin-top: 1rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }
  
  .accordion-header {
    padding: 1rem 1.5rem;
    background-color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
  }
  
  .accordion-header:hover {
    background-color: var(--light);
  }
  
  .accordion-content {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-light);
    display: none;
    background-color: var(--light);
    font-size: 0.875rem;
  }
  
  .accordion-arrow {
    transition: transform 0.2s ease;
  }
  
  .accordion.active .accordion-arrow {
    transform: rotate(180deg);
  }
  
  .breakdown-container {
    background-color: white;
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 1rem;
  }
  
  .breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-light);
  }
  
  .breakdown-row:last-child {
    border-bottom: none;
    font-weight: 600;
  }
  
  .savings-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
  }
  
  .savings-card {
    background-color: white;
    border-radius: var(--radius-sm);
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
  }
  
  .savings-value {
    font-size: 1.25rem;
    font-weight: 700;
    /* color: var(--primary); */
    margin-bottom: 0.25rem;
  }
  
  .savings-label {
    font-size: 0.75rem;
    color: var(--gray);
  }
  
  .cta-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #fc0;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    margin-top: 1rem;
    border-radius: 22px;
  }
  
  .cta-button:hover {
    background-color: #fc0;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    border-radius: 22px;
  }
  
  .link {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
  }
  
  .link:hover {
    text-decoration: underline;
  }
  
  .comparison-rate {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.25rem;
  }
  
  @media (max-width: 768px) {
    .tabs {
      flex-direction: column;
    }
    
    .tab {
      border-bottom: 1px solid var(--gray-light);
      border-left: 3px solid transparent;
    }
    
    .tab.active {
      border-bottom: 1px solid var(--gray-light);
      border-left: 3px solid var(--primary);
    }
    
    .circle-container {
      flex-direction: column;
      gap: 1rem;
    }
    
    .operation-symbol {
      transform: rotate(90deg);
    }
  }



  /* added css */
