/* =================================================================
   Cancer Insurance Calculator (caic-) - ToolZipper Finance
   ================================================================= */

/* =====================================================================
   LAYOUT - 2-column sticky grid (Rule 38: no tool-layout-split)
   ===================================================================== */
.caic-main-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    align-items: start;
    min-width: 0;
}

.caic-input-col {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.caic-result-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* =====================================================================
   SECTION CONTAINERS (Rule 49: border-radius:12px)
   ===================================================================== */
.caic-section {
    background: #ffffff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    max-width: 100%;
    box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    transition: box-shadow 0.2s ease;
}

.caic-section:hover {
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.1);
}

.caic-section-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: #2d2a26;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.caic-section-title i {
    color: #d4af37;
    font-size: 14px;
}

/* =====================================================================
   TABS (3 tabs → 2x2 grid, Rule 25)
   ===================================================================== */
.caic-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: #f5f3f0;
    border-radius: 10px;
    padding: 5px;
}

.caic-tab {
    padding: 9px 8px;
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
    text-align: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.caic-tab:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #2d2a26;
}

.caic-tab.active {
    background: #ffffff;
    color: #2d2a26;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.12);
}

/* =====================================================================
   TAB CONTENT (show/hide)
   ===================================================================== */
.caic-tab-content {
    display: none;
}

.caic-tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* =====================================================================
   INPUT GROUPS (Rule 44: tab content internal spacing)
   ===================================================================== */
.caic-input-group {
    margin-bottom: 10px;
    max-width: 100%;
    box-sizing: border-box;
}

.caic-input-group:last-child {
    margin-bottom: 0;
}

.caic-input-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    color: #5f5a56;
    margin-bottom: 6px;
}

/* =====================================================================
   FORM INPUTS (Rule 49: focus glow)
   ===================================================================== */
.caic-amount-input,
.caic-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    height: 42px;
    padding: 0 12px;
    font-size: 13px;
    color: #2d2a26;
    background: #fbfaf8;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.caic-amount-input {
    text-align: right;
    font-weight: 600;
    padding-right: 10px;
}

.caic-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%235f5a56' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.caic-amount-input:hover,
.caic-select:hover {
    border-color: #d4c67a;
}

.caic-amount-input:focus,
.caic-select:focus {
    outline: none;
    border-color: #d4af37;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.caic-amount-input::placeholder {
    color: #c4c0bc;
    font-weight: 400;
}

/* =====================================================================
   AMOUNT UNIT + KOREAN DISPLAY (Rule 20, Rule 49)
   ===================================================================== */
.caic-input-group {
    position: relative;
}

/* Input + unit flow layout (absolute overlay 금지) */
.caic-input-with-unit,
.caic-amount-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    background: #fbfaf8;
    box-sizing: border-box;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.caic-input-with-unit:hover,
.caic-amount-row:hover {
    border-color: #d4c67a;
}

.caic-input-with-unit:focus-within,
.caic-amount-row:focus-within {
    border-color: #d4af37;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.caic-input-with-unit .caic-amount-input,
.caic-amount-row .caic-amount-input,
.caic-input-with-unit .caic-select,
.caic-amount-row .caic-select {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    min-width: 0;
}

.caic-input-with-unit .caic-amount-input:hover,
.caic-input-with-unit .caic-amount-input:focus,
.caic-amount-row .caic-amount-input:hover,
.caic-amount-row .caic-amount-input:focus,
.caic-input-with-unit .caic-select:hover,
.caic-input-with-unit .caic-select:focus,
.caic-amount-row .caic-select:hover,
.caic-amount-row .caic-select:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.caic-unit,
.caic-unit-chip,
.caic-unit-label {
    min-width: 52px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #e4ddd0;
    background: linear-gradient(180deg, #fcfbf8 0%, #f3efe8 100%);
    color: #7b7467;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    user-select: none;
    box-sizing: border-box;
}

.caic-korean-amount {
    font-size: 11px;
    color: #d4af37;
    margin-top: 5px;
    text-align: right;
    min-height: 16px;
    line-height: 1.35;
}

/* =====================================================================
   RADIO GROUP (Pill-style, Rule 32: no width:100% on radio)
   ===================================================================== */
.caic-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.caic-radio-label {
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.caic-radio-label:hover {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.05);
}

.caic-radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0 6px 0 0;
    accent-color: #d4af37;
    cursor: pointer;
    flex-shrink: 0;
}

.caic-radio-label.active {
    border-color: #d4af37;
    background: #fdfbf5;
    color: #2d2a26;
}

/* =====================================================================
   BUTTON GROUP (Rule 49: flex, calc-left reset-right)
   ===================================================================== */
.caic-btn-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.caic-calculate-btn {
    flex: 1;
    height: 44px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #d4af37, #c9a030);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
}

.caic-calculate-btn:hover {
    background: linear-gradient(135deg, #c9a030, #b8922a);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.caic-calculate-btn:active {
    transform: translateY(0);
}

.caic-calculate-btn i {
    font-size: 16px;
}

.caic-reset-btn {
    min-height: 44px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
    background: #f5f3f0;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.caic-reset-btn:hover {
    background: #eeebe6;
    border-color: #d4c67a;
}

/* =====================================================================
   WAITING SECTION (Rule 52)
   ===================================================================== */
.caic-waiting {
    text-align: center;
    padding: 44px 24px;
    background: linear-gradient(180deg, #fcfaf4 0%, #f9f6ee 100%);
    border: 1px solid #ebe4d6;
}

.caic-waiting-icon {
    margin-bottom: 10px;
}

.caic-waiting-icon i {
    font-size: 40px;
    color: #d4af37;
    opacity: 0.4;
    display: inline-block;
}

.caic-waiting-title {
    font-size: 17px;
    font-weight: 600;
    color: #2d2a26;
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}

.caic-waiting-desc {
    font-size: 13px;
    color: #5f5a56;
    line-height: 1.6;
    margin: 0 0 18px 0;
}

.caic-waiting-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 320px;
    margin: 0 auto;
    text-align: left;
}

.caic-waiting-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #5f5a56;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid #ede8dc;
    border-radius: 8px;
    padding: 8px 10px;
}

.caic-waiting-feature i {
    font-size: 14px;
    color: #d4af37;
    flex-shrink: 0;
}

/* =====================================================================
   RESULT SUMMARY (Rule 49: gradient + gold shadow)
   ===================================================================== */
.caic-result-summary {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border: 1px solid #e5d09a;
    border-radius: 12px;
    padding: 24px;
    box-sizing: border-box;
    box-shadow: 0 3px 14px rgba(212, 175, 55, 0.14);
}

.caic-result-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: 0.35px;
}

.caic-result-total {
    font-size: 34px;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 6px;
    line-height: 1.18;
    letter-spacing: -0.02em;
}

.caic-result-sub {
    font-size: 14px;
    color: #6d665d;
    margin-bottom: 14px;
    line-height: 1.45;
}

.caic-result-sub span {
    font-weight: 600;
    color: #5f5a56;
}

/* --- Mini Breakdown --- */
.caic-result-breakdown-mini {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-top: 1px solid #e8e4dc;
    padding-top: 10px;
}

.caic-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    font-size: 12px;
    border-bottom: 1px dashed rgba(168, 150, 104, 0.24);
}

.caic-breakdown-item:last-child {
    border-bottom: 0;
}

.caic-breakdown-label {
    color: #7a756d;
}

.caic-breakdown-value {
    font-weight: 600;
    color: #2d2a26;
    text-align: right;
}

/* =====================================================================
   PAYOUT CARDS (암 종류별 진단금)
   ===================================================================== */
.caic-payout-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.caic-payout-card {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    padding: 12px 12px 13px;
    text-align: left;
    min-height: 112px;
}

.caic-payout-card.caic-payout-highlight {
    background: #fdfbf5;
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.09);
}

.caic-payout-type {
    font-size: 12px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 2px;
}

.caic-payout-desc {
    font-size: 11px;
    color: #9e9a96;
    margin-bottom: 8px;
    line-height: 1.4;
}

.caic-payout-rate {
    font-size: 11px;
    color: #7a756d;
    margin-bottom: 6px;
}

.caic-payout-amount {
    font-size: 18px;
    font-weight: 700;
    color: #d4af37;
    letter-spacing: -0.01em;
}

/* =====================================================================
   COMPARE RESULT (탭2 - 장기 비교 결과)
   ===================================================================== */
.caic-compare-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 12px 0 10px;
}

.caic-compare-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    padding: 14px 12px;
    text-align: center;
}

.caic-compare-label {
    font-size: 12px;
    color: #7a756d;
    margin-bottom: 7px;
}

.caic-compare-value {
    font-size: 20px;
    font-weight: 700;
    color: #2d2a26;
    line-height: 1.3;
}

.caic-compare-value.caic-renewal-value {
    color: #e67e22;
}

.caic-compare-diff {
    text-align: center;
    font-size: 13px;
    color: #5f5a56;
    padding-top: 12px;
    line-height: 1.5;
    border-top: 1px solid #e8e4dc;
}

.caic-compare-diff strong {
    color: #d4af37;
    font-weight: 700;
}

/* =====================================================================
   CHART (Rule 45: position:relative + width:100% + height)
   ===================================================================== */
.caic-chart-wrap {
    position: relative;
    width: 100%;
    height: 280px;
}

.caic-chart-wrap canvas {
    max-height: 280px;
}

/* Chart / compare table fallback basic style */
#caicChartFallback,
.caic-chart-fallback {
    width: 100%;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    box-sizing: border-box;
    border: 1px dashed #e8e4dc;
    border-radius: 10px;
    background: #faf9f7;
    color: #7a756d;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
}

#caicCompareTableFallback,
.caic-compare-table-fallback {
    margin-top: 10px;
    padding: 10px 12px;
    box-sizing: border-box;
    border: 1px dashed #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #7a756d;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
}

/* =====================================================================
   GUIDE CARDS (탭3 - 진단금 추천)
   ===================================================================== */
.caic-guide-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.caic-guide-card {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    padding: 15px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.caic-guide-card.caic-guide-recommended {
    background: #fdfbf5;
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.1);
}

.caic-guide-card-info {
    flex: 1;
}

.caic-guide-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.caic-guide-card-title .caic-guide-badge {
    font-size: 10px;
    font-weight: 600;
    color: #d4af37;
    background: rgba(212, 175, 55, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
}

.caic-guide-card-desc {
    font-size: 12px;
    color: #7a756d;
    line-height: 1.5;
}

.caic-guide-card-amount {
    text-align: right;
    flex-shrink: 0;
}

.caic-guide-card-diagnosis {
    font-size: 20px;
    font-weight: 700;
    color: #d4af37;
    line-height: 1.28;
}

.caic-guide-card-premium {
    font-size: 11px;
    color: #9e9a96;
    margin-top: 2px;
}

/* =====================================================================
   TABLE STYLES
   ===================================================================== */
.caic-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #eee7da;
    border-radius: 10px;
    background: #ffffff;
    -webkit-overflow-scrolling: touch;
}

.caic-table-wrap table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 13px;
}

.caic-table-wrap thead th {
    padding: 11px 10px;
    background: #faf9f7;
    border-bottom: 2px solid #e8e4dc;
    font-weight: 600;
    color: #5f5a56;
    text-align: center;
    font-size: 12px;
    white-space: nowrap;
}

.caic-table-wrap thead th:first-child {
    text-align: left;
}

.caic-table-wrap tbody td {
    padding: 10px;
    border-bottom: 1px solid #f0ede8;
    text-align: center;
    color: #2d2a26;
    font-size: 13px;
}

.caic-table-wrap tbody td:first-child {
    text-align: left;
    font-weight: 500;
    color: #5f5a56;
}

.caic-table-wrap tbody td.caic-amount {
    text-align: right;
    font-weight: 700;
    color: #d4af37;
}

.caic-table-wrap tbody tr:last-child td {
    border-bottom: none;
}

.caic-table-wrap tbody tr:hover {
    background: rgba(212, 175, 55, 0.03);
}

.caic-table-wrap tbody tr.caic-table-total {
    background: #fdfbf5;
}

.caic-table-wrap tbody tr.caic-table-total td {
    font-weight: 600;
    color: #2d2a26;
    border-top: 2px solid #e8e4dc;
}

.caic-table-wrap tbody tr.caic-table-total td.caic-amount {
    color: #d4af37;
}

/* =====================================================================
   SCHEDULE HEADER (for Excel download button)
   ===================================================================== */
.caic-schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.caic-schedule-header .caic-section-title {
    margin-bottom: 0;
}

/* =====================================================================
   DOWNLOAD BUTTON (Rule 43: tool-btn tool-btn-excel 기준)
   ===================================================================== */
.caic-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 34px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.caic-download-btn.tool-btn.tool-btn-excel {
    gap: 5px;
    min-height: 34px;
    padding: 7px 12px;
    font-size: 12px;
}

/* Excel button standard marker (tool-btn tool-btn-excel caic-download-btn) */
.tool-btn.tool-btn-excel.caic-download-btn,
.caic-download-btn.tool-btn.tool-btn-excel {
    background: #59ab79;
    border-color: #59ab79;
    color: #ffffff;
}

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

.caic-download-btn i {
    font-size: 13px;
}

/* =====================================================================
   DISCLAIMER (Rule 49)
   ===================================================================== */
.caic-disclaimer {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    padding: 11px 12px;
    box-sizing: border-box;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 12px;
    color: #8a847c;
    line-height: 1.5;
}

.caic-disclaimer i {
    color: #d4af37;
    flex-shrink: 0;
    margin-top: 2px;
}

/* =====================================================================
   UTILITY
   ===================================================================== */
.caic-hidden {
    display: none !important;
}

/* =====================================================================
   REDUCED MOTION (Rule 49)
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
    .caic-section,
    .caic-amount-input,
    .caic-select,
    .caic-input-with-unit,
    .caic-amount-row,
    .caic-calculate-btn,
    .caic-reset-btn,
    .caic-tab,
    .caic-radio-label,
    .caic-payout-card,
    .caic-guide-card {
        transition: none !important;
    }
    .caic-section:hover,
    .caic-calculate-btn:hover {
        transform: none !important;
    }
}

/* =====================================================================
   RESPONSIVE - Tablet (900px)
   ===================================================================== */
@media (max-width: 900px) {
    .caic-main-layout {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    .caic-input-col {
        position: static;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        gap: 12px;
    }

    .caic-result-col {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        gap: 14px;
    }

    .caic-tab-content,
    .caic-section,
    .caic-result-summary {
        max-width: 100%;
        min-width: 0;
    }

    /* Rule 32: Exclude radio/checkbox from width: 100% */
    .caic-input-group input:not([type="radio"]):not([type="checkbox"]),
    .caic-input-group select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .caic-input-with-unit,
    .caic-amount-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .caic-payout-cards {
        grid-template-columns: 1fr 1fr;
    }

    .caic-compare-result-grid {
        grid-template-columns: 1fr 1fr;
    }

    .caic-result-total {
        font-size: 30px;
    }
}

/* =====================================================================
   RESPONSIVE - Mid tablet (768px)
   ===================================================================== */
@media (max-width: 768px) {
    .caic-section {
        padding: 16px;
    }

    .caic-section-title {
        font-size: 13px;
    }

    .caic-tab {
        font-size: 12px;
        padding: 9px 6px;
    }

    .caic-result-summary {
        padding: 20px;
    }

    .caic-result-total {
        font-size: 28px;
    }

    .caic-compare-value {
        font-size: 18px;
    }

    .caic-waiting {
        padding: 38px 20px;
    }

    .caic-waiting-features {
        max-width: 100%;
    }

    .caic-table-wrap table {
        min-width: 500px;
    }

    .caic-schedule-header .caic-section-title {
        flex: 1 1 calc(100% - 120px);
        min-width: 0;
    }

    .caic-download-btn,
    .caic-download-btn.tool-btn.tool-btn-excel {
        min-height: 32px;
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* =====================================================================
   RESPONSIVE - Mobile (600px)
   ===================================================================== */
@media (max-width: 600px) {
    .caic-section {
        padding: 14px;
    }

    .caic-section-title {
        font-size: 12px;
    }

    .caic-tab {
        font-size: 12px;
        padding: 9px 6px;
    }

    .caic-input-label {
        font-size: 11px;
    }

    .caic-amount-input,
    .caic-select {
        height: 38px;
        font-size: 13px;
    }

    .caic-unit,
    .caic-unit-chip,
    .caic-unit-label {
        min-width: 48px;
        padding: 0 9px;
        font-size: 11px;
    }

    .caic-calculate-btn {
        height: 42px;
        font-size: 14px;
    }

    .caic-result-summary {
        padding: 16px;
    }

    .caic-result-total {
        font-size: 24px;
    }

    .caic-result-sub {
        font-size: 13px;
    }

    .caic-payout-cards {
        grid-template-columns: 1fr;
    }

    .caic-compare-result-grid {
        grid-template-columns: 1fr;
    }

    .caic-table-wrap table {
        min-width: 460px;
        font-size: 12px;
    }

    .caic-table-wrap thead th,
    .caic-table-wrap tbody td {
        padding: 8px 6px;
        font-size: 12px;
    }

    .caic-guide-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .caic-guide-card-amount {
        text-align: left;
        width: 100%;
    }

    .caic-compare-value {
        font-size: 17px;
    }

    .caic-schedule-header {
        align-items: flex-start;
    }

    .caic-schedule-header .caic-section-title {
        flex: 1 1 100%;
    }
}

/* =====================================================================
   RESPONSIVE - Small mobile (480px)
   ===================================================================== */
@media (max-width: 480px) {
    .caic-main-layout {
        max-width: 100%;
        overflow-x: hidden;
        gap: 14px;
    }

    .caic-input-col,
    .caic-result-col,
    .caic-tab-content,
    .caic-section {
        max-width: 100%;
        min-width: 0;
    }

    .caic-section {
        padding: 12px;
    }

    .caic-result-summary {
        padding: 14px;
    }

    .caic-result-total {
        font-size: 22px;
    }

    .caic-waiting {
        padding: 30px 14px;
    }

    .caic-waiting-icon i {
        font-size: 30px;
    }

    .caic-waiting-title {
        font-size: 14px;
    }

    .caic-waiting-desc {
        font-size: 12px;
    }

    .caic-radio-group {
        gap: 6px;
    }

    .caic-radio-label {
        padding: 7px 10px;
        font-size: 12px;
    }

    .caic-unit,
    .caic-unit-chip,
    .caic-unit-label {
        min-width: 44px;
        padding: 0 8px;
    }

    .caic-chart-wrap {
        height: 220px;
    }

    .caic-chart-wrap canvas {
        max-height: 220px;
    }

    .caic-table-wrap table {
        min-width: 420px;
    }

    .caic-schedule-header .caic-download-btn {
        width: 100%;
    }
}
