:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-radius: 18px;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 20px 30px -10px rgba(16, 185, 129, 0.15);
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", sans-serif;
}

/* ── Hero Banner ── */
.calc-hero {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #0f172a 100%);
    color: #ffffff;
    padding: 40px 0 35px;
    border-radius: 0 0 28px 28px;
    margin-bottom: 35px;
    box-shadow: 0 12px 30px rgba(6, 78, 59, 0.2);
    position: relative;
    overflow: hidden;
}
.calc-hero::before {
    content: '📈';
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 110px;
    opacity: 0.12;
    pointer-events: none;
}
.calc-hero h1 {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.calc-hero p {
    font-size: 1rem;
    color: #a7f3d0;
    margin-bottom: 0;
}

/* ── Quick Presets ── */
.preset-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.btn-preset {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-preset:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: #ffffff;
    color: #ffffff;
    transform: translateY(-1px);
}

/* ── Main Container & Cards ── */
.calc-card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    padding: 26px;
    margin-bottom: 24px;
    transition: box-shadow 0.2s;
}
.calc-card:hover {
    box-shadow: var(--shadow-hover);
}
.card-header-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}
.card-header-title i {
    color: var(--primary-color);
}

/* ── Form Controls & Quick Add Buttons ── */
.form-label {
    font-weight: 600;
    font-size: 0.92rem;
    color: #334155;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.korean-currency-hint {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-dark);
}
.input-group-text {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    font-weight: 600;
    color: #475569;
}
.form-control, .form-select {
    border-color: #cbd5e1;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.96rem;
    padding: 10px 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Quick Add Buttons Row */
.quick-add-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.btn-quick-add {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-quick-add:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
}
.btn-quick-clear {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}
.btn-quick-clear:hover {
    background: #fecaca;
    color: #991b1b;
}

/* Range Sliders */
.form-range {
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* ── Result Stat Cards ── */
.stat-highlight-card {
    background: linear-gradient(135deg, #065f46 0%, #047857 60%, #059669 100%);
    color: #ffffff;
    border-radius: 20px;
    padding: 26px 24px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.25);
    position: relative;
    overflow: hidden;
}
.stat-highlight-card .main-lbl {
    font-size: 0.95rem;
    font-weight: 600;
    color: #a7f3d0;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.stat-highlight-card .main-val {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.15;
}
.stat-highlight-card .main-sub {
    font-size: 0.95rem;
    color: #d1fae5;
    margin-top: 6px;
}
.sub-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
@media (min-width: 992px) {
    .sub-stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
.sub-stat-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: var(--shadow-soft);
}
.sub-stat-box .box-lbl {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.sub-stat-box .box-val {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}
.sub-stat-box .box-hint {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-top: 3px;
}

/* ── Chart Container ── */
.chart-container-box {
    position: relative;
    height: 340px;
    width: 100%;
}

/* ── Breakdown Table ── */
.table-responsive-box {
    max-height: 480px;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.table-compound {
    margin-bottom: 0;
    font-size: 0.81rem;
}
.table-compound thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
    border-bottom: 2px solid #cbd5e1;
    z-index: 2;
    padding: 9px 10px;
    font-size: 0.81rem;
}
.table-compound thead th:first-child {
    text-align: center;
}
.table-compound tbody td {
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
    padding: 7px 10px;
    border-color: #f1f5f9;
    font-size: 0.81rem;
}
.table-compound tbody td:first-child {
    text-align: center;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}
.table-compound tbody tr:hover {
    background-color: #f0fdf4;
}

/* ── FAQ & Tips Accordion ── */
.faq-box .accordion-button {
    font-weight: 700;
    color: #1e293b;
    background-color: #ffffff;
}
.faq-box .accordion-button:not(.collapsed) {
    background-color: #ecfdf5;
    color: #065f46;
}
.faq-box .accordion-body {
    font-size: 0.92rem;
    line-height: 1.7;
    color: #334155;
}
