:root {
    --calprimary: #087DA6;
    --calprimary-dark: #0051cc;
    --calsecondary: #00D1D1;
    --caldark: #0A2540;
    --callight: #F8FAFF;
    --calsuccess: #00A650;
    --calborder: #E1E8F7;
    --calcard-bg: white;
}

/* STRUCTURE */
.savings-calculator-refined {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    /* max-width: 500px; */
    /* margin: 40px auto; */
    background: var(--calcard-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(10, 37, 64, 0.08);
    border: 1px solid var(--calborder);
}

.sc-header {
    padding: 28px 32px 20px;
    text-align: center;
    background: linear-gradient(135deg, #087DA6 0%, #b0d6f0 100%);
    border-bottom: 1px solid var(--calborder);
}

.sc-header h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--caldark);
    margin: 0 0 8px;
}

.sc-header p {
    font-size: 16px;
    color: #5A6D8A;
    margin: 0;
    font-weight: 500;
}

.subtext-calculator {
    color: white !important;
}

/* CONTROLS */
.sc-controls {
    padding: 20px 32px 10px;
    background: var(--calcard-bg);
}

.control-group {
    margin-bottom: 28px;
}

.control-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.control-header svg {
    margin-right: 12px;
}

.control-header label {
    font-weight: 600;
    color: var(--caldark);
    font-size: 16px;
}

/* CUSTOM SLIDER */
.slider-container {
    position: relative;
    height: 8px;
    background: #E1E8F7;
    border-radius: 4px;
    margin: 20px 0;
}

.slider-fill {
    position: absolute;
    height: 100%;
    background: var(--calprimary);
    border-radius: 4px;
    width: 10%;
    transition: width 0s;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: transparent;
    position: relative;
    z-index: 2;
    outline: none;
    margin: 0;
    vertical-align: top !important;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--calprimary);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 102, 255, 0.3);
}

.value-display {
    text-align: center;
    font-size: 18px;
    color: var(--caldark);
    font-weight: 600;
}

.value-display span {
    color: var(--calprimary);
    font-weight: 800;
    font-size: 24px;
}

/* SALARY INPUT */
.salary-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--calborder);
    border-radius: 12px;
    padding: 4px 16px;
    transition: all 0.3s;
}

.salary-input:focus-within {
    border-color: var(--calprimary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
}

.salary-input span {
    color: var(--caldark);
    font-weight: 500;
    font-size: 18px;
}

.salary-input input {
    border: none;
    padding: 4px 4px;
    font-size: 18px;
    font-weight: 700;
    color: var(--caldark);
    width: 100%;
    background: transparent;
}

.salary-input input:focus {
    outline: none;
}

/* RESULTS SECTION */
.sc-results {
    padding: 0 32px 32px;
}

.section-header {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: var(--caldark);
    margin-bottom: 16px;
    font-size: 18px;
}

.section-header svg {
    margin-right: 12px;
}

.result-card {
    background: #F8FAFF;
    border-radius: 16px;
    padding: 0px 24px;
    border: 1px solid var(--calborder);
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #E1E8F7;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.highlight, .result-item.annual {
    padding: 18px 0;
}

.result-item.annual {
    background: rgba(0, 102, 255, 0.05);
    margin: 0 -24px;
    padding: 18px 24px !important;
    border-radius: 0 0 16px 16px;
    border-top: 1px solid var(--calborder);
    border-bottom: none;
}

.ri-label {
    display: flex;
    align-items: center;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 12px;
}

.color-dot.current {
    background: var(--calprimary);
}

.color-dot.ph {
    background: var(--calsecondary);
}

.ri-label span {
    color: var(--caldark);
    font-weight: 500;
}

.ri-value {
    font-weight: 700;
    font-size: 18px;
    color: var(--caldark);
}

.ri-value.savings {
    color: var(--calsuccess);
    font-weight: 800;
    font-size: 20px;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .savings-calculator-refined {
        margin: 20px;
    }
    
    .sc-header, 
    .sc-controls,
    .sc-results {
        padding: 20px;
    }
    
    .result-card {
        padding: 20px;
    }
    
    .result-item.annual {
        margin: 0 -20px;
        padding: 18px 20px !important;
    }
}