/* ====================================================
   큐브 ROI 계산기
   ==================================================== */
.cube-roi-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}
.cube-roi-header { text-align: center; margin-bottom: 30px; }
.cube-roi-header h1 { font-size: 28px; color: #3C3744; margin: 0 0 8px; }
.cube-roi-sub { color: #666; font-size: 14px; margin: 0; }

/* ===== 공통 카드 ===== */
.boss-income-card, .cube-mode-card, .roi-result-card {
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 22px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.boss-income-header, .cube-mode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}
.boss-income-header h2, .cube-mode-header h2 {
    margin: 0;
    font-size: 18px;
    color: #3C3744;
}

/* ===== 모드 토글 (보스 수익 자동/수동, 큐브 옵션/등급업) ===== */
.income-mode-toggle, .cube-mode-toggle {
    display: inline-flex;
    border: 1px solid #ccd3e0;
    border-radius: 8px;
    overflow: hidden;
}
.income-mode-btn, .cube-mode-btn {
    padding: 7px 16px;
    background: #fff;
    border: 0;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.income-mode-btn + .income-mode-btn,
.cube-mode-btn + .cube-mode-btn { border-left: 1px solid #ccd3e0; }
.income-mode-btn:hover, .cube-mode-btn:hover { background: #f4f5f9; color: #3C3744; }
.income-mode-btn.active, .cube-mode-btn.active { background: #3C3744; color: #fff; }

/* ===== 보스 수익 영역 ===== */
.auto-income-status {
    padding: 18px;
    background: #fffbea;
    border: 1px dashed #f1c40f;
    border-radius: 8px;
    color: #7a5d00;
    font-size: 13px;
    line-height: 1.6;
}
.auto-income-status a { color: #3C3744; font-weight: 700; }
.income-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.income-stat {
    background: #f8f9fb;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.income-stat-label { font-size: 12px; color: #888; margin-bottom: 6px; }
.income-stat-value { font-size: 22px; font-weight: 800; color: #3C3744; }
.income-stat-meta { grid-column: 1/-1; text-align: center; font-size: 11px; color: #aab0c0; }
.refresh-income-btn {
    width: 100%;
    padding: 8px;
    background: #f4f5f9;
    border: 1px dashed #ccd3e0;
    border-radius: 8px;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}
.refresh-income-btn:hover { background: #ebedf4; color: #3C3744; }

/* ===== 공통 입력 필드 ===== */
.field-group { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.field-label { display: block; font-size: 13px; font-weight: 700; color: #3C3744; margin-bottom: 6px; }
.field-hint  { font-size: 11px; color: #888; margin: 6px 0 0; }
.field-group input[type="number"],
.field-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #e6e8ef;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
}

/* ===== 큐브 탭 ===== */
.cube-tab-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.cube-tab {
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cube-tab .cube-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--cube-color, #999);
}
.cube-tab:hover { border-color: #aab0c0; }
.cube-tab.active { background: var(--cube-color, #3C3744); color: #fff; border-color: var(--cube-color, #3C3744); }
.cube-tab.active .cube-dot { background: #fff; }

/* ===== 시뮬레이션 횟수 ===== */
.sim-count-bar { display: flex; gap: 8px; }
.sim-count-btn {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 18px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
}
.sim-count-btn.active { background: #3C3744; color: #fff; border-color: #3C3744; }

/* ===== 옵션 띄우기 - 조건 결합 / 목표 옵션 ===== */
.opt-match-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.opt-match-label { font-size: 12px; color: #666; font-weight: 600; }
.opt-match-toggle { display: inline-flex; border: 1px solid #ccd3e0; border-radius: 6px; overflow: hidden; }
.opt-match-btn { padding: 5px 14px; background: #fff; border: 0; font-size: 12px; font-weight: 700; color: #666; cursor: pointer; }
.opt-match-btn + .opt-match-btn { border-left: 1px solid #ccd3e0; }
.opt-match-btn:hover { background: #f4f5f9; color: #3C3744; }
.opt-match-btn.active { background: #3C3744; color: #fff; }
.opt-match-hint { font-size: 11px; color: #aab0c0; }

.option-target-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.option-target-row {
    display: grid;
    grid-template-columns: 1fr 110px 30px;
    gap: 8px;
    align-items: center;
}
.option-target-row select,
.option-target-row input { margin: 0; }
.option-target-row .remove-btn {
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 6px;
    color: #999;
    cursor: pointer;
    height: 32px;
    font-size: 16px;
    line-height: 1;
}
.option-target-row .remove-btn:hover { border-color: #e53935; color: #e53935; }

.add-option-btn {
    background: #f4f5f9;
    border: 1px dashed #ccd3e0;
    border-radius: 8px;
    padding: 8px;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}
.add-option-btn:hover { background: #ebedf4; color: #3C3744; border-color: #3C3744; }
.add-option-btn:disabled { cursor: not-allowed; opacity: 0.5; }
.add-option-btn:disabled:hover { background: #f4f5f9; color: #666; border-color: #ccd3e0; }

/* ===== 계산 버튼 ===== */
.calc-btn {
    width: 100%;
    padding: 14px;
    background: #3C3744;
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
}
.calc-btn:hover { background: #2a2530; }
.calc-btn:disabled { background: #aab0c0; cursor: not-allowed; }

/* ===== 결과 영역 ===== */
.result-section-title { font-size: 18px; color: #3C3744; margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.ok-badge { font-size: 11px; background: #27ae60; color: #fff; padding: 3px 9px; border-radius: 20px; font-weight: 700; }

.summary-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.summary-card {
    background: #f8f9fb;
    border-radius: 10px;
    padding: 18px;
}
.summary-card.highlight { background: #3C3744; color: #fff; }
.summary-card.primary { background: linear-gradient(135deg, #27ae60, #16a085); color: #fff; }
.summary-card .label { font-size: 12px; opacity: 0.85; margin-bottom: 6px; }
.summary-card .value { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.summary-card .sub { font-size: 11px; opacity: 0.7; }

/* ===== 진행률 바 ===== */
.roi-progress { background: #f8f9fb; border-radius: 10px; padding: 18px; }
.roi-progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.roi-progress-label { font-size: 14px; font-weight: 700; color: #3C3744; }
.roi-progress-value { font-size: 14px; font-weight: 800; color: #3C3744; }
.roi-progress-bar { height: 12px; background: #e6e8ef; border-radius: 6px; overflow: hidden; }
.roi-progress-fill { height: 100%; background: #3C3744; transition: width 0.4s ease; }
.roi-progress-desc { margin: 10px 0 0; font-size: 12px; color: #666; }

/* ===== 모바일 ===== */
@media (max-width: 720px) {
    .cube-roi-container { padding: 22px 12px 60px; }
    .field-row { grid-template-columns: 1fr; gap: 12px; }
    .income-stats, .summary-cards { grid-template-columns: 1fr; }
    .cube-roi-header h1 { font-size: 22px; }
    .summary-card .value { font-size: 18px; }
}

.error-banner {
    background: #fee;
    border: 1px solid #f99;
    border-radius: 8px;
    padding: 14px;
    color: #991b1b;
    margin-bottom: 16px;
    font-size: 13px;
}
