@charset "UTF-8";

.odic-main-layout,
.odic-input-col,
.odic-result-col,
.odic-section,
.odic-table-wrap,
.odic-fallback-table-wrap,
.odic-chart-wrap,
.odic-input-wrap,
.odic-input,
.odic-btn,
.odic-unit {
    box-sizing: border-box;
    max-width: 100%;
}

.odic-main-layout {
    display: grid;
    grid-template-columns: minmax(260px, min(48%, 540px)) minmax(0, 1fr);
    gap: 1.12rem;
    align-items: start;
}

.odic-input-col,
.odic-result-col {
    min-width: 0;
}

.odic-input-col {
    display: grid;
    gap: 0.9rem;
    width: 100%;
    max-width: 540px;
    justify-self: start;
}

.odic-result-col {
    display: grid;
    gap: 1rem;
}

.odic-section {
    border: 1px solid #e8e4dc;
    border-radius: 16px;
    background: #ffffff;
    padding: 1.2rem;
}

.odic-section-title {
    margin: 0;
    font-size: 1.03rem;
    font-weight: 700;
    color: #2f2820;
}

.odic-section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.52rem;
    margin-bottom: 0.52rem;
}

.odic-input-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
}

.odic-input-group {
    display: grid;
    gap: 0.36rem;
    min-width: 0;
}

.odic-input-group--full {
    grid-column: 1 / -1;
}

.odic-input-group input:not([type="radio"]):not([type="checkbox"]),
.odic-input-group select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.odic-label {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: #574b3f;
}

.odic-input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d8d1c6;
    border-radius: 12px;
    background: #fcfbf9;
    color: #1f1914;
    font-size: 0.96rem;
    line-height: 1.35;
    padding: 0.54rem 0.66rem;
}

.odic-input:focus {
    outline: none;
    border-color: #c8b79d;
    box-shadow: 0 0 0 2px rgba(200, 183, 157, 0.16);
}

.odic-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.46rem;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border: 1px solid #d8d1c6;
    border-radius: 12px;
    background: #fcfbf9;
    padding: 0.36rem 0.52rem;
}

.odic-input-wrap:focus-within {
    border-color: #c8b79d;
    box-shadow: 0 0 0 2px rgba(200, 183, 157, 0.16);
}

.odic-input-wrap .odic-input {
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.odic-input-wrap .odic-input:focus {
    box-shadow: none;
}

.odic-unit {
    flex: 0 0 auto;
    min-width: 40px;
    padding: 0.2rem 0.46rem;
    border: 1px solid #e3d8c9;
    border-radius: 999px;
    background: #f6f1e9;
    color: #655748;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

.odic-korean-amount {
    margin: 0;
    color: #776756;
    font-size: 0.81rem;
    line-height: 1.35;
}

.odic-rate-presets,
.odic-period-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.36rem;
}

.odic-rate-chip,
.odic-period-chip {
    min-height: 30px;
    padding: 0.22rem 0.62rem;
    border: 1px solid #d8cfbe;
    border-radius: 999px;
    background: #f8f4ec;
    color: #5a4b3a;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.08s ease;
}

.odic-rate-chip:hover,
.odic-period-chip:hover {
    border-color: #d4af37;
    color: #4d3f2f;
    transform: translateY(-1px);
}

.odic-rate-chip:focus-visible,
.odic-period-chip:focus-visible {
    outline: 2px solid rgba(212, 175, 55, 0.42);
    outline-offset: 2px;
}

.odic-rate-chip-active,
.odic-period-chip-active {
    border-color: #d4af37;
    background: #f3ead4;
    color: #59451d;
}

.odic-hint,
.odic-sub,
.odic-chart-sub,
.odic-summary-note,
.odic-summary-assumption {
    margin: 0.7rem 0 0;
    color: #685a4b;
    font-size: 0.84rem;
    line-height: 1.5;
}

.odic-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.62rem;
}

.odic-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    min-height: 42px;
    padding: 0.54rem 0.92rem;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.08s ease;
}

.odic-btn:hover {
    transform: translateY(-1px);
}

.odic-btn:focus-visible {
    outline: 2px solid #b78f5f;
    outline-offset: 2px;
}

.odic-btn-primary {
    background: #8d6b4a;
    border-color: #8d6b4a;
    color: #ffffff;
}

.odic-btn-primary:hover,
.odic-btn-primary:focus-visible {
    background: #7b5c3f;
    border-color: #7b5c3f;
    color: #ffffff;
}

.odic-btn-ghost {
    background: #f6f1e9;
    border-color: #ddd2c2;
    color: #4f4336;
}

.odic-btn-ghost:hover,
.odic-btn-ghost:focus-visible {
    background: #ece3d6;
    border-color: #cdbca6;
    color: #3f352b;
}

.odic-waiting {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    border-color: #ebe1d1;
    background: #faf7f1;
    color: #5f5142;
    font-size: 0.88rem;
    line-height: 1.45;
}

.odic-waiting i {
    margin-top: 0.1rem;
    color: #9d7f5f;
}

.odic-waiting p {
    margin: 0;
}

.odic-result-summary {
    border: 1px solid #ebe3d6;
    border-radius: 16px;
    background: #fffdf9;
    padding: 1.1rem;
    box-shadow: 0 2px 10px rgba(45, 42, 38, 0.06);
}

.odic-summary-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.24rem 0.6rem;
    border-radius: 999px;
    background: #efe6d9;
    color: #5a4c3d;
    font-size: 0.76rem;
    font-weight: 700;
}

.odic-summary-title {
    margin: 0.58rem 0 0;
    color: #2e251d;
    font-size: 1.16rem;
    line-height: 1.35;
}

.odic-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.66rem;
    margin-top: 0.9rem;
}

.odic-hero-card {
    margin-top: 0.86rem;
    border: 1px solid #efe2c5;
    border-radius: 14px;
    background: linear-gradient(135deg, #fdf7eb 0%, #f8f0de 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.88rem;
    padding: 0.92rem 0.94rem;
}

.odic-hero-main,
.odic-hero-side {
    min-width: 0;
}

.odic-hero-label,
.odic-hero-side-label {
    display: block;
    margin: 0;
    color: #6b5841;
    font-size: 0.78rem;
    font-weight: 600;
}

.odic-hero-value {
    display: block;
    margin-top: 0.32rem;
    color: #312418;
    font-size: 1.74rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.odic-hero-caption {
    margin: 0.48rem 0 0;
    color: #5d503e;
    font-size: 0.82rem;
    line-height: 1.45;
}

.odic-hero-caption strong {
    color: #4b2f12;
    font-weight: 700;
}

.odic-hero-side {
    border: 1px solid #ebdfc9;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.72);
    padding: 0.62rem 0.68rem;
    align-self: center;
    min-width: 180px;
}

.odic-hero-side-value {
    display: block;
    margin-top: 0.27rem;
    color: #2d2319;
    font-size: 1.07rem;
    font-weight: 800;
    line-height: 1.32;
}

.odic-kpi-card {
    border: 1px solid #ede4d7;
    border-radius: 13px;
    background: #ffffff;
    padding: 0.78rem 0.82rem;
}

.odic-kpi-label {
    display: block;
    margin: 0;
    color: #665847;
    font-size: 0.77rem;
    font-weight: 600;
}

.odic-kpi-value {
    display: block;
    margin-top: 0.33rem;
    color: #18130f;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.25;
}

.odic-sub-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.58rem;
    margin-top: 0.74rem;
}

.odic-sub-card {
    border: 1px solid #eee7dd;
    border-radius: 11px;
    background: #fdfaf5;
    padding: 0.66rem 0.74rem;
}

.odic-sub-label {
    display: block;
    margin: 0;
    color: #716251;
    font-size: 0.74rem;
    font-weight: 600;
}

.odic-sub-value {
    display: block;
    margin-top: 0.28rem;
    color: #2c231b;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
}

.odic-sub-meta {
    display: block;
    margin-top: 0.26rem;
    color: #746354;
    font-size: 0.75rem;
    line-height: 1.35;
}

.odic-sub-card.is-positive {
    border-color: #f0dcc4;
    background: #fff8ef;
}

.odic-sub-card.is-negative {
    border-color: #dbeadf;
    background: #f4faf6;
}

.odic-chart-section {
    border: 1px solid #ece4d8;
    border-radius: 16px;
    background: #fffdf9;
    padding: 1.05rem;
}

.odic-chart-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.62rem;
}

.odic-chart-wrap {
    position: relative;
    min-height: 260px;
    margin-top: 0.72rem;
    border: 1px solid #ebe2d4;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.7rem;
}

.odic-chart-wrap canvas {
    width: 100% !important;
    min-height: 230px;
    max-height: 340px;
}

.odic-chart-fallback {
    margin-top: 0.7rem;
    border: 1px solid #eddfcf;
    border-radius: 10px;
    background: #f8f3ea;
    color: #655746;
    font-size: 0.84rem;
    line-height: 1.45;
    padding: 0.65rem 0.76rem;
}

.odic-fallback-table-wrap {
    margin-top: 0.66rem;
    border: 1px solid #ebddcc;
    border-radius: 12px;
    background: #fcf8f1;
    padding: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.odic-table-section {
    border: 1px solid #ece4d8;
    border-radius: 16px;
    background: #ffffff;
    padding: 1.05rem;
}

.odic-table-wrap {
    margin-top: 0.66rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.odic-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    line-height: 1.38;
}

.odic-fallback-table {
    width: 100%;
}

.odic-table th,
.odic-table td {
    border: 1px solid #e6dccd;
    padding: 0.54rem 0.58rem;
    text-align: right;
    vertical-align: middle;
    color: #2d251c;
}

.odic-table th {
    background: #f3ecdf;
    color: #4f4336;
    font-weight: 700;
}

.odic-table th:first-child,
.odic-table td:first-child {
    text-align: left;
}

.odic-empty-row td {
    text-align: center !important;
    color: #7c6d5b;
    background: #fcf9f4;
}

.odic-txn-row .odic-input,
.odic-table .odic-input {
    font-size: 0.88rem;
}

.odic-table .odic-input {
    min-height: 38px;
}

.odic-table .odic-input-wrap {
    min-height: 38px;
    padding: 0.34rem 0.46rem;
}

.odic-remove-txn-btn {
    display: inline-flex;
}

.odic-txn-amount,
.odic-txn-date,
.odic-txn-type {
    width: 100%;
}

.odic-warning-list {
    margin: 0.55rem 0 0;
    padding-left: 1.08rem;
    display: grid;
    gap: 0.35rem;
    color: #544739;
    font-size: 0.86rem;
    line-height: 1.47;
}

.odic-faq-item {
    display: block;
}

.tool-btn.tool-btn-excel,
.odic-download-btn.tool-btn.tool-btn-excel {
    border-color: #59ab79;
    background: #59ab79;
    color: #ffffff;
}

.tool-btn.tool-btn-excel:hover,
.tool-btn.tool-btn-excel:focus,
.tool-btn.tool-btn-excel:focus-visible,
.odic-download-btn.tool-btn.tool-btn-excel:hover,
.odic-download-btn.tool-btn.tool-btn-excel:focus,
.odic-download-btn.tool-btn.tool-btn-excel:focus-visible {
    border-color: #4f9f70;
    background: #4f9f70;
    color: #ffffff;
}

.odic-hidden,
.odic-waiting[hidden],
.odic-chart-fallback[hidden],
.odic-fallback-table-wrap[hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .odic-main-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .odic-input-col {
        max-width: 100%;
        justify-self: stretch;
    }

    .odic-result-col {
        gap: 0.9rem;
    }

    .odic-hero-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .odic-hero-side {
        min-width: 0;
    }

    .odic-kpi-grid,
    .odic-sub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .odic-section,
    .odic-result-summary,
    .odic-chart-section,
    .odic-table-section {
        padding: 0.95rem;
        border-radius: 14px;
    }

    .odic-input-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .odic-btn-group {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .odic-btn {
        width: 100%;
    }

    .odic-chart-head {
        align-items: stretch;
    }

    .odic-chart-head .tool-btn {
        width: 100%;
    }

    .odic-table--txn {
        table-layout: auto;
    }

    .odic-table--txn thead {
        display: none;
    }

    .odic-table--txn tbody {
        display: grid;
        gap: 0.56rem;
    }

    .odic-table--txn .odic-txn-row {
        display: grid;
        gap: 0.42rem;
        border: 1px solid #eadfce;
        border-radius: 12px;
        background: #fffcf8;
        padding: 0.58rem;
    }

    .odic-table--txn td {
        display: grid;
        grid-template-columns: 74px minmax(0, 1fr);
        align-items: center;
        gap: 0.5rem;
        border: 0;
        padding: 0;
        text-align: left;
    }

    .odic-table--txn td::before {
        content: attr(data-label);
        color: #6d5d4c;
        font-size: 0.76rem;
        font-weight: 700;
        line-height: 1.25;
    }

    .odic-table--txn td[data-label="삭제"] {
        grid-template-columns: minmax(0, 1fr);
    }

    .odic-table--txn td[data-label="삭제"]::before {
        display: none;
    }

    .odic-table--txn .odic-remove-txn-btn {
        width: 100%;
    }

    .odic-table {
        min-width: 100%;
        table-layout: fixed;
    }

    .odic-table--txn {
        table-layout: auto;
    }

    .odic-table-wrap,
    .odic-fallback-table-wrap {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .odic-section,
    .odic-result-summary,
    .odic-chart-section,
    .odic-table-section {
        padding: 0.82rem;
        border-radius: 12px;
    }

    .odic-section-title {
        font-size: 0.95rem;
    }

    .odic-kpi-grid,
    .odic-sub-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .odic-kpi-value {
        font-size: 1.08rem;
    }

    .odic-hero-value {
        font-size: 1.48rem;
    }

    .odic-hero-caption {
        font-size: 0.78rem;
    }

    .odic-sub-value {
        font-size: 0.89rem;
    }

    .odic-rate-presets {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .odic-period-presets {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .odic-rate-chip,
    .odic-period-chip {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .odic-input,
    .odic-input-wrap {
        min-height: 44px;
    }

    .odic-input-wrap {
        gap: 0.44rem;
        padding: 0.36rem 0.5rem;
    }

    .odic-unit {
        min-width: 40px;
        padding: 0.2rem 0.44rem;
    }

    .odic-btn {
        min-height: 40px;
        padding-left: 0.74rem;
        padding-right: 0.74rem;
    }

    .odic-chart-wrap {
        min-height: 220px;
        padding: 0.54rem;
    }

    .odic-chart-wrap canvas {
        min-height: 200px;
    }
}
