/* ========================================================
   tradingReport.css — 트레이딩 리포트 전용 스타일
   의존: account.css (히어로 카드), my.css (My페이지 기본)
   ======================================================== */

/* ===== 트레이딩 리포트 — 서머리/분석 탭 카드 ===== */
.tr-tab-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.tr-tab-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.tr-tab-card.active {
    border-color: rgba(0, 212, 255, 0.45);
    background: linear-gradient(145deg, rgba(0, 212, 255, 0.08), rgba(0, 212, 255, 0.03));
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.08);
}

.tr-tab-card:active {
    transform: scale(0.97);
}

.tr-tab-card-icon {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.35);
    transition: color 0.2s;
}

.tr-tab-card.active .tr-tab-card-icon {
    color: #00d4ff;
}

.tr-tab-card-label {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.3px;
    transition: color 0.2s;
}

.tr-tab-card.active .tr-tab-card-label {
    color: rgba(255, 255, 255, 0.95);
}

/* 탭 콘텐츠 */
.tr-tab-content {
    display: none;
}

.tr-tab-content.active {
    display: block;
}

.tr-content-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    min-height: 120px;
}

.tr-content-placeholder p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
    margin: 0;
}

/* ===== 트레이딩 리포트 — Summary 콘텐츠 ===== */
.tr-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.tr-summary-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.3px;
}

/* 기간 선택 드롭다운 */
.tr-period-selector {
    position: relative;
}

.tr-period-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}

.tr-period-btn .material-icons-round {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.4);
}

.tr-period-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    z-index: 100;
    min-width: 120px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.tr-period-dropdown.open {
    display: block;
}

.tr-period-option {
    padding: 10px 14px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.tr-period-option:active {
    background: rgba(255, 255, 255, 0.05);
}

.tr-period-option.active {
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.06);
}

/* 커스텀 기간 입력 */
.tr-custom-period {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.tr-date-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Rajdhani', sans-serif;
    color-scheme: dark;
}

.tr-date-sep {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

.tr-date-apply {
    background: var(--accent-cyan);
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    white-space: nowrap;
}

/* 서머리 데이터 카드 */
.tr-summary-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 4px 16px;
    margin-bottom: 16px;
}

.tr-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tr-summary-row:last-child {
    border-bottom: none;
}

.tr-summary-row.tr-summary-total {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tr-summary-row.tr-summary-sub {
    padding: 8px 0 8px 20px;
}

.tr-summary-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.tr-summary-row.tr-summary-sub .tr-summary-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.tr-summary-row.tr-summary-sub .tr-summary-label::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    margin-right: 8px;
    vertical-align: middle;
}

.tr-summary-value {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Rajdhani', sans-serif;
}

.tr-summary-row.tr-summary-total .tr-summary-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.tr-summary-row.tr-summary-total .tr-summary-value {
    font-size: 14px;
    font-weight: 700;
}

.tr-summary-value.tr-val-loss { color: #ff4d5a; }
.tr-summary-value.tr-val-profit { color: #00d4a4; }

/* 로딩 표시 */
.tr-summary-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 30px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

.tr-loading-spin {
    font-size: 18px;
    animation: liveSpin 1s linear infinite;
}

/* ===== 트레이딩 리포트 — P&L Chart ===== */
.tr-chart-section {
    margin-top: 8px;
    margin-bottom: 16px;
}

.tr-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.tr-chart-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.3px;
}

.tr-chart-period {
    font-size: 11px;
    color: var(--accent-cyan);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.tr-chart-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    overflow: hidden;
}

/* 차트 상단 요약 */
.tr-chart-summary-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 4px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tr-chart-summary-item {
    text-align: center;
}

.tr-chart-summary-label {
    display: block;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.tr-chart-summary-val {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Rajdhani', sans-serif;
}

.tr-chart-summary-val.tr-val-profit { color: #00d4a4; }
.tr-chart-summary-val.tr-val-loss { color: #ff4d5a; }

/* 차트 캔버스 */
.tr-chart-container {
    position: relative;
    width: 100%;
    height: 180px;
}

.tr-chart-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* X축 날짜 라벨 */
.tr-chart-xaxis {
    display: flex;
    justify-content: space-between;
    padding: 6px 0 0;
}

.tr-chart-xaxis span {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.25);
    font-family: 'Rajdhani', sans-serif;
}

/* ===== 분석 리포트 — Analysis Report ===== */
.tra-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tra-title { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.9); font-family: 'Rajdhani',sans-serif; letter-spacing: 0.3px; }
.tra-period-badge { font-size: 11px; font-weight: 600; color: var(--accent-cyan); background: rgba(0,212,255,0.08); border: 1px solid rgba(0,212,255,0.15); border-radius: 6px; padding: 3px 10px; font-family: 'Rajdhani',sans-serif; }
.tra-loading { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 40px; color: rgba(255,255,255,0.3); font-size: 12px; }
.tra-section-label { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.9); font-family: 'Rajdhani',sans-serif; letter-spacing: 0.3px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.tra-section-label .material-icons-round { font-size: 16px; color: var(--accent-cyan); }
.tra-card { background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.tra-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.tra-row:last-child { border-bottom: none; }
.tra-row-label { font-size: 12px; color: rgba(255,255,255,0.5); }
.tra-row-value { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.9); font-family: 'Rajdhani',sans-serif; }
.tra-profit { color: #00d4a4 !important; }
.tra-loss { color: #ff4d5a !important; }
.tra-cyan { color: var(--accent-cyan) !important; }

/* 승률 분석 */
.tra-winrate-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.tra-winrate-ring { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.tra-winrate-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tra-winrate-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
.tra-winrate-pct { font-size: 18px; font-weight: 700; font-family: 'Rajdhani',sans-serif; color: var(--accent-cyan); }
.tra-winrate-lbl { font-size: 9px; color: rgba(255,255,255,0.35); }
.tra-winrate-stats { flex: 1; }
.tra-winrate-bar-row { margin-bottom: 4px; }
.tra-winrate-bar-label { font-size: 10px; color: rgba(255,255,255,0.4); margin-bottom: 4px; display: flex; justify-content: space-between; }
.tra-winrate-bar-track { height: 6px; background: rgba(255,255,255,0.04); border-radius: 3px; overflow: hidden; display: flex; }
.tra-winrate-bar-win { height: 100%; background: linear-gradient(90deg, #00d4a4, #00d4a4aa); border-radius: 3px 0 0 3px; transition: width 0.5s; }
.tra-winrate-bar-lose { height: 100%; background: linear-gradient(90deg, #ff4d5aaa, #ff4d5a); border-radius: 0 3px 3px 0; transition: width 0.5s; }

/* 종목별 분석 */
.tra-symbol-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.tra-symbol-row:last-child { border-bottom: none; }
.tra-symbol-name { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.85); width: 60px; flex-shrink: 0; font-family: 'Rajdhani',sans-serif; }
.tra-symbol-bar-wrap { flex: 1; position: relative; height: 20px; }
.tra-symbol-center-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,0.08); }
.tra-symbol-bar { position: absolute; top: 0; height: 100%; border-radius: 4px; display: flex; align-items: center; padding: 0 6px; font-size: 10px; font-weight: 600; font-family: 'Rajdhani',sans-serif; min-width: 40px; }
.tra-symbol-bar.tra-profit-bar { background: linear-gradient(90deg, rgba(0,212,164,0.15), rgba(0,212,164,0.6)); left: 50%; color: #00d4a4; }
.tra-symbol-bar.tra-loss-bar { background: linear-gradient(270deg, rgba(255,77,90,0.15), rgba(255,77,90,0.6)); right: 50%; color: #ff4d5a; justify-content: flex-end; }
.tra-symbol-meta { font-size: 9px; color: rgba(255,255,255,0.3); width: 85px; text-align: right; flex-shrink: 0; white-space: nowrap; }
.tra-symbol-empty { text-align: center; padding: 20px; color: rgba(255,255,255,0.2); font-size: 12px; }

/* Buy/Sell 분석 */
.tra-buysell-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tra-buysell-card { background: var(--bg-tertiary); border-radius: 12px; padding: 16px 14px; border: 1px solid var(--border-color); position: relative; overflow: hidden; }
.tra-buysell-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.tra-buy-card::before { background: linear-gradient(90deg, #00d4a4, transparent); }
.tra-sell-card::before { background: linear-gradient(90deg, #ff4d5a, transparent); }
.tra-buysell-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tra-buysell-type { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; }
.tra-buysell-count { font-size: 11px; color: rgba(255,255,255,0.35); font-family: 'Rajdhani',sans-serif; font-weight: 600; }
.tra-buysell-pl { font-size: 20px; font-weight: 700; font-family: 'Rajdhani',sans-serif; margin-bottom: 12px; text-align: center; }
.tra-buysell-meta { display: flex; justify-content: space-between; gap: 8px; }
.tra-buysell-meta-item { text-align: center; flex: 1; }
.tra-buysell-meta-label { font-size: 9px; color: rgba(255,255,255,0.3); margin-bottom: 2px; }
.tra-buysell-meta-val { font-size: 13px; font-weight: 600; font-family: 'Rajdhani',sans-serif; color: rgba(255,255,255,0.8); }

/* 시간대별 분석 */
.tra-time-chart { display: flex; align-items: flex-end; gap: 2px; height: 80px; padding: 0 2px; margin-bottom: 4px; }
.tra-time-bar { flex: 1; border-radius: 2px 2px 0 0; min-height: 1px; transition: height 0.3s; }
.tra-time-labels { display: flex; justify-content: space-between; padding: 4px 2px 0; }
.tra-time-labels span { font-size: 7px; color: rgba(255,255,255,0.2); font-family: 'Rajdhani',sans-serif; }
.tra-time-legend { display: flex; gap: 16px; margin-top: 8px; justify-content: center; }
.tra-time-legend-item { display: flex; align-items: center; gap: 4px; font-size: 9px; color: rgba(255,255,255,0.4); }
.tra-time-legend-dot { width: 6px; height: 6px; border-radius: 50%; }

/* 거래량 분석 */
.tra-volume-hero { margin-bottom: 12px; }
.tra-volume-big { font-size: 28px; font-weight: 700; font-family: 'Rajdhani',sans-serif; color: var(--accent-cyan); }
.tra-volume-big-label { font-size: 10px; color: rgba(255,255,255,0.35); margin-top: -4px; }

/* 리스크 지표 */
.tra-risk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.tra-risk-item { background: rgba(255,255,255,0.02); border-radius: 10px; padding: 14px; border: 1px solid rgba(255,255,255,0.04); text-align: center; }
.tra-risk-label { font-size: 10px; color: rgba(255,255,255,0.35); margin-bottom: 4px; }
.tra-risk-value { font-size: 16px; font-weight: 700; font-family: 'Rajdhani',sans-serif; margin-bottom: 2px; }
.tra-risk-detail { font-size: 9px; color: rgba(255,255,255,0.3); font-family: 'Rajdhani',sans-serif; }
.tra-pf-row { display: flex; align-items: center; justify-content: space-between; background: rgba(0,212,255,0.04); border: 1px solid rgba(0,212,255,0.1); border-radius: 10px; padding: 14px 16px; }
.tra-pf-left { display: flex; align-items: center; gap: 10px; }
.tra-pf-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(0,212,255,0.08); display: flex; align-items: center; justify-content: center; }
.tra-pf-icon .material-icons-round { font-size: 20px; color: var(--accent-cyan); }
.tra-pf-label { font-size: 12px; color: rgba(255,255,255,0.6); }
.tra-pf-sub { font-size: 9px; color: rgba(255,255,255,0.3); }
.tra-pf-value { font-size: 24px; font-weight: 700; font-family: 'Rajdhani',sans-serif; color: var(--accent-cyan); }

/* 히어로 카드 ~ 탭 구분선 */
.tr-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    margin-top: 6px;
    margin-bottom: 11px;
}

/* ===== 계정 선택 화면 ===== */
.tr-acct-select-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.tr-acct-select-card:active { border-color: rgba(255,255,255,0.15); }
.tr-acct-select-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: rgba(255,255,255,0.04);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.tr-acct-select-icon .material-icons-round { font-size: 22px; color: var(--accent-cyan); }
.tr-acct-select-icon.tr-acct-live { background: rgba(0,212,255,0.08); }
.tr-acct-select-icon.tr-acct-live .material-icons-round { color: var(--accent-cyan); }
.tr-acct-select-info { flex: 1; }
.tr-acct-select-title { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.9); font-family: 'Rajdhani',sans-serif; margin-bottom: 2px; }
.tr-acct-select-desc { font-size: 11px; color: rgba(255,255,255,0.35); }
.tr-acct-select-arrow { font-size: 20px; color: rgba(255,255,255,0.2); }
