:root {
    --primary: #fbbd23;
    --primary-soft: rgba(251, 189, 35, 0.15);
    --bg: #f7f9fc;
    --card: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border: #e5e7eb;
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* =====================
   Base
===================== */
body {
    background: var(--bg);
    color: var(--text-dark);
    line-height: 1.6;
}

h1 {
    letter-spacing: -0.6px;
}

.text-muted {
    color: var(--text-muted) !important;
}
.calculator_wrap{
    margin-top: 80px;
}
/* =====================
   Tabs
===================== */
.nav-pills {
    background: var(--card);
    padding: 8px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.nav-pills .nav-link {
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 12px;
    padding: 10px 18px;
    transition: all 0.25s ease;
}

.nav-pills .nav-link i {
    margin-right: 6px;
}

.nav-pills .nav-link:hover {
    background: #f1f5f9;
}

.nav-pills .nav-link.active {
    background: var(--primary);
    color: #fff;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

/* =====================
   Main Card
===================== */
.loan-card {
    background: var(--card);
    border-radius: 28px;
    padding: 48px;
    box-shadow: var(--shadow-md);
}

/* =====================
   Inputs
===================== */
label {
    font-weight: 600;
    margin-bottom: 6px;
}

.input-group-text {
    background: #f1f5f9;
    border-color: var(--border);
    font-weight: 600;
}

.form-control {
    border-radius: 12px;
    border-color: var(--border);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(251, 189, 35, 0.25);
}

.value-text {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
}

/* =====================
   Sliders
===================== */
.form-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 6px;
    background: #e5e7eb;
    outline: none;
}

/* Thumb */
.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 2px solid #bfbfbf;
  box-shadow: 0 0 0 4px rgba(251, 189, 35, 0.25);
  cursor: pointer;
  margin-top: -6px;
}

.form-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 2px solid #bfbfbf;
}

.form-range::-webkit-slider-runnable-track {
    height: 6px;
    background: transparent;
    border-radius: 6px;
}

/* Firefox */
.form-range::-moz-range-track {
    height: 6px;
    background: transparent;
    border-radius: 6px;
}

/* =====================
   EMI Highlight
===================== */
.emi {
    font-size: 52px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1.2px;
    margin-bottom: 4px;
}

/* =====================
   Result Cards
===================== */
.result-box {
    background: #f9fafb;
    border-radius: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.result-box small {
    display: block;
    margin-bottom: 4px;
}

.result-box div {
    font-size: 18px;
    font-weight: 700;
}

/* =====================
   Total Payment
===================== */
.alert-warning {
    background: var(--primary-soft);
    border: 1px solid rgba(251, 189, 35, 0.4);
    color: #000;
    font-weight: 700;
    border-radius: 14px;
}

/* =====================
   Chart Section
===================== */
.chart-box {
    background: #f9fafb;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: inline-block;
}

.chart-box canvas {
    max-width: 240px;
    margin: auto;
}

/* Download Button */
#downloadChart {
    margin-top: 14px;
    font-weight: 600;
    border-radius: 10px;
}

/* =====================
   Breakdown Bar
===================== */
.progress {
    border-radius: 8px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.4s ease;
}

/* =====================
   Amortization Table
===================== */
table {
    background: #fff;
}

table th {
    font-weight: 700;
}

table td {
    font-size: 14px;
}

.tip_wrap{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}
.tip_wrap .tip_card{
    background: #f9fafb;
    border-radius: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.tip_card h3{
    font-size: 22px;
    margin: 10px 0;
}
.tip_card .icon-box{
    width: 50px;
    height: 50px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
/* =====================
   Responsive
===================== */
@media (max-width: 992px) {
    .loan-card {
        padding: 32px;
    }

    .emi {
        font-size: 44px;
    }
}

@media (max-width: 768px) {
    .loan-card {
        padding: 24px;
    }

    .emi {
        font-size: 36px;
    }

    .chart-box canvas {
        max-width: 200px;
    }
    .tip_wrap{
        display: block;
        margin-bottom: 15px;
    }
    .tip_wrap .tip_card{
        margin-top: 10px;
    }
    .chart-box{
        position: relative;
    right: 17px;
    }
}