/* ════════════════════════════════════════════════════════════════════════════
   RECATOOLS — Retirement Calculator — style.css
   Tool-specific overrides only.
   Base styles live in /assets/css/tool-page.css.
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Input grid ──────────────────────────────────────────────────────────────── */
.input-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap:                   1.125rem 1.5rem;
}

.input-field-group {
    display:        flex;
    flex-direction: column;
    gap:            0.375rem;
}

.input-field-group label {
    font-size:   0.875rem;
    font-weight: 600;
    color:       var(--text);
}

.input-note {
    font-size: 0.75rem;
    color:     var(--muted);
    margin:    0;
}

/* ── Range sliders ───────────────────────────────────────────────────────────── */
.slider-input-row {
    display:     flex;
    align-items: center;
    gap:         0.75rem;
}

.slider-input-row input[type="range"] {
    flex:        1;
    accent-color: var(--accent);
    height:      4px;
    cursor:      pointer;
}

.slider-number {
    width:        64px;
    flex-shrink:  0;
    text-align:   center;
    padding:      0.375rem 0.5rem;
    border:       1.5px solid var(--border);
    border-radius: 8px;
    font-size:    0.9375rem;
    font-weight:  600;
    color:        var(--text);
    background:   #fff;
    -moz-appearance: textfield;
}
.slider-number::-webkit-outer-spin-button,
.slider-number::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.slider-number:focus {
    outline:      none;
    border-color: var(--accent);
}

/* ── SGD prefix inputs ───────────────────────────────────────────────────────── */
.sgd-input-wrap {
    position: relative;
    display:  flex;
}
.sgd-prefix {
    position:     absolute;
    left:         12px;
    top:          50%;
    transform:    translateY(-50%);
    font-size:    0.9375rem;
    font-weight:  600;
    color:        var(--muted);
    pointer-events: none;
    user-select:  none;
}
.sgd-input-wrap input {
    width:        100%;
    padding-left: 2.25rem;
    border:       1.5px solid var(--border);
    border-radius: 8px;
    font-size:    0.9375rem;
    padding-top:  0.4375rem;
    padding-bottom: 0.4375rem;
    color:        var(--text);
    background:   #fff;
    transition:   border-color 0.15s;
}
.sgd-input-wrap input:focus {
    outline:      none;
    border-color: var(--accent);
}

/* ── Standard number/percent inputs ─────────────────────────────────────────── */
.pct-input-wrap {
    position: relative;
    display:  flex;
}
.pct-suffix {
    position:     absolute;
    right:        12px;
    top:          50%;
    transform:    translateY(-50%);
    font-size:    0.875rem;
    font-weight:  600;
    color:        var(--muted);
    pointer-events: none;
}
.pct-input-wrap input {
    width:         100%;
    padding-right: 2rem;
    border:        1.5px solid var(--border);
    border-radius: 8px;
    font-size:     0.9375rem;
    padding-top:   0.4375rem;
    padding-bottom: 0.4375rem;
    padding-left:  0.75rem;
    color:         var(--text);
    background:    #fff;
    transition:    border-color 0.15s;
}
.pct-input-wrap input:focus {
    outline:      none;
    border-color: var(--accent);
}

/* ── Calculate button ────────────────────────────────────────────────────────── */
#calculate-btn {
    width:         100%;
    margin-top:    1.5rem;
    padding:       0.875rem 2rem;
    background:    var(--accent);
    color:         #fff;
    border:        none;
    border-radius: 10px;
    font-size:     1.0625rem;
    font-weight:   700;
    cursor:        pointer;
    transition:    background 0.15s, transform 0.1s;
}
#calculate-btn:hover  { background: #cf561e; }
#calculate-btn:active { transform: scale(0.98); }

/* ── Finance disclaimer ──────────────────────────────────────────────────────── */
.finance-disclaimer {
    margin-top:  1rem;
    padding:     0.75rem 1rem;
    background:  #fef9c3;
    border:      1.5px solid #fde047;
    border-radius: 8px;
    font-size:   0.8125rem;
    color:       #713f12;
    line-height: 1.5;
}

/* ── CPF collapsible input panel ─────────────────────────────────────────────── */
.cpf-section {
    margin-top: 1.5rem;
    border:     1.5px solid var(--border);
    border-radius: 10px;
    overflow:   hidden;
}

#cpf-toggle {
    width:           100%;
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         0.875rem 1rem;
    background:      var(--bg);
    border:          none;
    cursor:          pointer;
    font-size:       0.9375rem;
    font-weight:     600;
    color:           var(--text);
    transition:      background 0.15s;
}
#cpf-toggle:hover { background: #f0efec; }
#cpf-toggle .cpf-toggle-label { display: flex; align-items: center; gap: 0.5rem; }
#cpf-toggle .cpf-toggle-arrow { font-size: 0.75rem; color: var(--muted); }

#cpf-panel {
    display:  none;
    padding:  1rem;
    border-top: 1.5px solid var(--border);
    background: #fff;
}
#cpf-panel.open { display: block; }

/* ── Results section ─────────────────────────────────────────────────────────── */
#results-section[hidden] { display: none; }

.results-dashboard {
    margin-top: 1.5rem;
}

/* ── Results grid ────────────────────────────────────────────────────────────── */
.results-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap:                   1rem;
    margin-bottom:         1.25rem;
}

.result-card {
    padding:       1rem;
    background:    var(--bg);
    border:        1.5px solid var(--border);
    border-radius: 10px;
    display:       flex;
    flex-direction: column;
    gap:           0.25rem;
}
.result-card--accent {
    border-color: var(--accent);
    background:   #E8472F0c;
}
.result-card--delta { border-width: 2px; }

.result-label {
    font-size:   0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color:       var(--muted);
}
.result-value {
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-size:   clamp(1.375rem, 4vw, 1.75rem);
    font-weight: 700;
    color:       var(--text);
    line-height: 1.1;
}
.result-unit {
    font-size:   0.875rem;
    font-weight: 400;
    color:       var(--muted);
}
.result-sub {
    font-size:  0.8rem;
    color:      var(--muted);
}

.result-positive .result-value { color: #16a34a; }
.result-negative .result-value { color: #dc2626; }

/* ── Timeline bar ────────────────────────────────────────────────────────────── */
.timeline-section {
    margin:       1rem 0;
}
.timeline-title {
    font-size:   0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color:       var(--muted);
    margin-bottom: 0.5rem;
}
.timeline-bar {
    display:       flex;
    height:        36px;
    border-radius: 8px;
    overflow:      hidden;
    border:        1.5px solid var(--border);
}
.timeline-seg {
    display:     flex;
    align-items: center;
    justify-content: center;
    min-width:   0;
    transition:  width 0.4s ease;
    overflow:    hidden;
}
.timeline-label {
    font-size:   0.7rem;
    font-weight: 700;
    color:       #fff;
    white-space: nowrap;
    overflow:    hidden;
    text-overflow: ellipsis;
    padding:     0 0.35rem;
}
.timeline-work   { background: #16a34a; }
.timeline-retire { background: #2563eb; }
.timeline-short  { background: #dc2626; }

.timeline-legend {
    display:     flex;
    gap:         1.25rem;
    flex-wrap:   wrap;
    margin-top:  0.5rem;
    font-size:   0.8rem;
    color:       var(--muted);
    align-items: center;
}
.tl-dot {
    display:       inline-block;
    width:         10px;
    height:        10px;
    border-radius: 2px;
    margin-right:  0.25rem;
}
.tl-work   { background: #16a34a; }
.tl-retire { background: #2563eb; }
.tl-short  { background: #dc2626; }

/* ── Shortfall / surplus note ────────────────────────────────────────────────── */
.results-note {
    padding:       0.75rem 1rem;
    border-radius: 8px;
    font-size:     0.9375rem;
    font-weight:   500;
    margin-top:    0.75rem;
}
.note-warn {
    color:      #92400e;
    background: #fef9c3;
    padding:    0.5rem 0.75rem;
    border-radius: 6px;
    display:    block;
}
.note-ok {
    color:      #14532d;
    background: #dcfce7;
    padding:    0.5rem 0.75rem;
    border-radius: 6px;
    display:    block;
}

/* ── CPF results panel ───────────────────────────────────────────────────────── */
.cpf-results-panel {
    margin-top:    1.25rem;
    padding:       1.125rem;
    background:    #f0f9ff;
    border:        1.5px solid #bae6fd;
    border-radius: 10px;
}
.cpf-results-title {
    font-size:   0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color:       #0369a1;
    margin-bottom: 0.875rem;
}
.cpf-results-grid {
    display:        flex;
    flex-direction: column;
    gap:            0.5rem;
}
.cpf-result-row {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    padding:         0.5rem 0;
    border-bottom:   1px solid #bae6fd;
    font-size:       0.9rem;
}
.cpf-result-row:last-child { border-bottom: none; }
.cpf-result-row--highlight .cpf-result-label,
.cpf-result-row--highlight .cpf-result-value {
    font-weight: 700;
    color:       #0369a1;
}
.cpf-result-label { color: var(--text); }
.cpf-result-value { font-weight: 600; color: var(--text); }
.cpf-disclaimer {
    font-size:  0.75rem;
    color:      #0369a1;
    margin-top: 0.75rem;
    opacity:    0.8;
}

/* cache-buster: 2026-05-24T05:06:05Z */
