/*
* [모듈명]: 수익 대시보드 스타일
* [파일명]: dashboard.css
* [역할]: 수익 현황, 수수료 알림, 승급 퀘스트 등 대시보드 핵심 UI의 비주얼을 정의합니다.
*/

:root {
    --dashboard-bg: #000000;
    --card-bg: #0A0A0A;
    --card-border: #1A1A1A;
    --text-primary: #FFFFFF;
    --text-secondary: #777777;
    --point-white: #FFFFFF;
    --point-grey: #333333;
    --point-accent: #FFFFFF; /* 강조는 무조건 화이트 */
    --point-bolt: #FFD700; /* [수석 아키텍트]: 크레딧 전용 골드 포인트 */
    --warning-border: #333333;
    --warning-bg: rgba(255, 255, 255, 0.05);
}

.dashboard-page {
    background-color: var(--dashboard-bg);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, sans-serif;
    min-height: 100dvh;
}

.dashboard-container {
    padding: 24px 20px 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 헤더 영역 */
.nav-header {
    height: 56px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--safe-top, 0);
    box-sizing: content-box;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin-left: -8px;
}

#btn-help {
    font-size: 26px;
    color: var(--text-primary);
    padding: 8px;
    margin-right: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-title {
    font-size: 24px;
    font-weight: 800;
}

.level-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #111;
    border: 1px solid #333;
    color: #FFF;
}

.level-badge.lv-bronze { background: #1A1A1A; border-color: #333; --icon-color: #CD7F32; }
.level-badge.lv-silver { background: #333; border-color: #555; --icon-color: #C0C0C0; }
.level-badge.lv-gold { background: #FFF; color: #000; border-color: #FFF; --icon-color: #FFD700; }
.level-badge.lv-black { background: #FFF; color: #000; border-color: #FFF; --icon-color: #000000; }

.level-badge .material-icons {
    color: var(--icon-color, #FFF);
}

/* 정산 카드 */
.revenue-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.revenue-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.revenue-amount {
    display: flex;
    align-items: center;
    gap: 8px;
}

.revenue-value {
    font-size: 42px;
    font-weight: 900;
}

.revenue-symbol {
    font-size: 28px;
}

/* 수수료 알림 배너 */
.fee-banner {
    background: var(--warning-bg);
    border-left: 4px solid var(--point-accent);
    padding: 16px;
    border-radius: 12px;
}

.fee-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.fee-highlight {
    color: var(--text-primary);
    font-weight: 800;
}

/* 승급 퀘스트 섹션 */
.quest-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 24px;
}

.quest-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.quest-title {
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quest-target {
    font-size: 12px;
    color: var(--text-secondary);
}

.quest-item {
    margin-bottom: 20px;
}

.quest-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.quest-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.quest-value {
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 프로그레스 바 */
.progress-container {
    height: 8px;
    background: #111111; /* 트랙 배경을 더 어둡게 */
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.1, 0.7, 0.1, 1);
}

.progress-bar.blue { background: #FFFFFF; } /* 진행 바는 화이트로 통일 */
.progress-bar.red { background: #FFFFFF; opacity: 0.6; } /* 미달 시 약간 투명하게 처리하거나 대비 유지 */

/* 하단 알림 배지 */
.warning-icon {
    font-size: 18px;
    color: #FFFFFF;
}

/* 하단 고정 버튼 */
.bottom-action {
    position: fixed;
    bottom: 30px;
    left: 20px;
    right: 20px;
    z-index: 100;
}

.btn-large-white {
    width: 100%;
    background: #FFFFFF;
    color: #000000;
    border: none;
    border-radius: 16px;
    height: 56px;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-large-white:active {
    transform: scale(0.98);
}

/* 바텀시트 공통 */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bottom-sheet-overlay.active {
    display: block;
    opacity: 1;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #111;
    border-radius: 24px 24px 0 0;
    padding: 24px 20px 40px;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.1, 0.7, 0.1, 1);
    max-height: 85vh;
    overflow-y: auto;
    border-top: 1px solid #222;
}

.bottom-sheet.active {
    transform: translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: #333;
    border-radius: 2px;
    margin: 0 auto 20px;
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.sheet-title {
    font-size: 18px;
    font-weight: 800;
}

.btn-close-sheet {
    background: none;
    border: none;
    color: #FFF;
    cursor: pointer;
}

/* 안내 테이블 스타일 */
.info-table-container {
    margin-bottom: 32px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.info-table th {
    text-align: left;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 12px 8px;
    border-bottom: 1px solid #222;
}

.info-table td {
    padding: 16px 8px;
    border-bottom: 1px solid #222;
    font-weight: 700;
}

/* 조건 리스트 스타일 */
.section-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.condition-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.condition-list li {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.condition-list li .lv {
    font-weight: 800;
    color: var(--text-primary);
    min-width: 40px;
}

/* [수석 아키텍트]: 최근 내역 섹션 (인사이트에서 이식) */
.history-section {
    margin-bottom: 40px;
}

.history-list {
    display: flex;
    flex-direction: column;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #111;
}

.history-item:active {
    background: #050505;
}

.history-item:last-child {
    border-bottom: none;
}

.history-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-icon {
    width: 44px;
    height: 44px;
    background-color: #111111;
    border: 1px solid #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.history-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-name {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
}

.history-time-status {
    font-size: 12px;
    color: #555;
}

.history-amount {
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bolt-p {
    color: var(--point-bolt);
    font-weight: 900;
}
