/* Dragon Trade 콘솔 공통 레이아웃 */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #0b0f14;
    color: #e6edf3;
    min-height: 100vh;
    display: flex;
}

.console-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #12171e;
    border-right: 1px solid #1e2630;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.console-brand {
    padding: 0 20px 16px;
    font-weight: 700;
    font-size: 1rem;
    color: #e6edf3;
    border-bottom: 1px solid #1e2630;
    margin-bottom: 12px;
}

.console-brand small {
    display: block;
    font-weight: 400;
    font-size: 0.75rem;
    color: #8b949e;
    margin-top: 4px;
}

.nav-section {
    padding: 8px 16px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6e7681;
}

.nav-links {
    list-style: none;
    margin: 0 0 12px;
    padding: 0 8px;
}

.nav-links a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #c9d1d9;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
}

.nav-links a:hover {
    background: #1e2630;
    color: #e6edf3;
}

.nav-links a.active {
    background: #1e2630;
    color: #f0883e;
    font-weight: 600;
}

.console-main {
    flex: 1;
    min-width: 0;
    padding: 24px 28px 40px;
}

.console-main h1 {
    font-size: 1.5rem;
    margin: 0 0 8px;
    font-weight: 600;
}

.console-main .lead {
    color: #8b949e;
    font-size: 0.95rem;
    margin: 0 0 24px;
}

.placeholder-card,
.panel-card {
    background: #12171e;
    border: 1px solid #2a3441;
    border-radius: 12px;
    padding: 24px;
}

.placeholder-card {
    max-width: 720px;
}

.placeholder-card p,
.panel-card p {
    margin: 0;
    color: #8b949e;
    line-height: 1.6;
}

/* 대시보드 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    max-width: 1280px;
    margin-bottom: 24px;
}

/* 대시보드 — 운영 전략 그리드 */
.dash-section {
    max-width: 1280px;
    margin-bottom: 24px;
}
.dash-section__title {
    margin: 0 0 12px;
    color: #f0f6fc;
    font-size: 1.1rem;
    font-weight: 700;
}
.dash-strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.dash-strat-card {
    display: flex; flex-direction: column;
    background: #12171e;
    border: 1px solid #2a3441;
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.15s;
}
.dash-strat-card:hover {
    border-color: rgba(240, 136, 62, 0.45);
    transform: translateY(-2px);
}
.dash-strat-card__head {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.dash-strat-card__cat {
    font-size: 0.72rem; font-weight: 700; padding: 2px 6px;
}
.dash-strat-card__name {
    color: #f0f6fc; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em;
}
.dash-strat-card__summary {
    color: #8b949e; font-size: 0.8rem; line-height: 1.4; flex: 1; margin-bottom: 10px;
}
.dash-strat-card__footer {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid #1f2630; padding-top: 8px;
}
.dash-strat-card__status {
    font-size: 0.78rem; font-weight: 600; color: #c9d1d9;
}
.dash-strat-card__id {
    font-size: 0.72rem; color: #6e7681; font-family: ui-monospace, monospace;
}

.stat-card {
    background: #12171e;
    border: 1px solid #2a3441;
    border-radius: 12px;
    padding: 20px;
}

.stat-card--highlight {
    border-color: rgba(240, 136, 62, 0.35);
    background: linear-gradient(145deg, #161b22 0%, #1a2332 100%);
}

.stat-card--highlight .value-score {
    color: #f0883e;
}

.stat-card .value-sub {
    font-size: 1rem;
    font-weight: 500;
    color: #8b949e;
}

.stat-card .value-regime {
    font-size: 1.15rem;
    font-family: ui-monospace, monospace;
    color: #f0883e;
}

.stat-card .hint-muted {
    margin-top: 4px;
    font-size: 0.75rem;
    color: #484f58;
}

.stat-card .label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8b949e;
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e6edf3;
}

.stat-card .hint {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #6e7681;
}

.stat-card a {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.85rem;
    color: #f0883e;
    text-decoration: none;
}

.stat-card a:hover {
    text-decoration: underline;
}

/* 시장분석 */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 960px;
    margin-bottom: 4px;
}

.page-toolbar h1 {
    margin: 0;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tab-panel-actions {
    justify-content: flex-end;
    max-width: 960px;
    margin-bottom: 12px;
}

.btn-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid rgba(240, 136, 62, 0.45);
    background: linear-gradient(180deg, rgba(240, 136, 62, 0.18) 0%, rgba(240, 136, 62, 0.08) 100%);
    color: #f0883e;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-refresh__icon {
    flex-shrink: 0;
    transition: transform 0.35s ease;
}

.btn-refresh:hover:not(:disabled) {
    background: linear-gradient(180deg, #f0883e 0%, #d97706 100%);
    border-color: #f0883e;
    color: #0d1117;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 4px 14px rgba(240, 136, 62, 0.35);
    transform: translateY(-1px);
}

.btn-refresh:hover:not(:disabled) .btn-refresh__icon {
    transform: rotate(-30deg);
}

.btn-refresh:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.btn-refresh:focus-visible {
    outline: 2px solid #f0883e;
    outline-offset: 2px;
}

.btn-refresh:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn-refresh.is-loading {
    pointer-events: none;
}

.btn-refresh.is-loading .btn-refresh__icon {
    animation: md-refresh-spin 0.85s linear infinite;
}

@keyframes md-refresh-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.md-status {
    font-size: 0.82rem;
    color: #8b949e;
}

.md-status.is-error {
    color: #f85149;
}

.md-warn {
    color: #f85149;
}

.md-hint {
    color: #8b949e;
    margin: 10px 0 0;
}

.md-root {
    max-width: 960px;
}

.regime-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 960px;
    margin-bottom: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #161b22 0%, #1a2332 100%);
    border: 1px solid #2a3441;
    border-radius: 12px;
}

.score-circle {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0d1117;
    border: 3px solid #f0883e;
    flex-shrink: 0;
}

.score-circle .num {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    color: #f0883e;
}

.score-circle .max {
    font-size: 0.7rem;
    color: #8b949e;
    margin-top: 2px;
}

.regime-info h2 {
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 600;
}

.regime-info .regime-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(240, 136, 62, 0.15);
    color: #f0883e;
    border: 1px solid rgba(240, 136, 62, 0.35);
}

.regime-info p {
    margin: 10px 0 0;
    font-size: 0.9rem;
    color: #8b949e;
}

.tier-grid {
    display: grid;
    gap: 16px;
    max-width: 960px;
}

/* ── Market Direction V2 — intensity, tier 점수, grade bar ── */
.intensity-bar {
    margin: 8px 0 4px;
    height: 8px;
    background: #1f2630;
    border-radius: 4px;
    overflow: hidden;
}
.intensity-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #5b95ff, #3b82f6);
    transition: width 0.3s ease;
}
.md-meta { margin: 6px 0 0; font-size: 0.78rem; color: #8b949e; }
.md-intensity-help {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: #8b949e;
    line-height: 1.5;
}

.tier-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 16px 0;
    padding: 14px;
    background: #12171e;
    border: 1px solid #2a3441;
    border-radius: 12px;
}
.tier-summary__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tier-summary__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8b949e;
}
.tier-summary__bar {
    height: 10px;
    background: #1f2630;
    border-radius: 4px;
    overflow: hidden;
}
.tier-summary__fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #6ee7b7, #10b981);
    transition: width 0.3s ease;
}
.tier-summary__val {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e6edf3;
    font-variant-numeric: tabular-nums;
}

/* V2.2 — Tier + SubTier 결합 */
.tier-summary--v22 .tier-summary__item {
    background: #161b22;
    border: 1px solid #2a3441;
    border-radius: 10px;
    padding: 12px;
}
.tier-summary--v22 .tier-summary__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 6px;
}
.tier-summary--v22 .tier-summary__label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #c9d1d9;
}
.tier-summary--v22 .tier-summary__val {
    font-size: 0.78rem;
}
.subtier-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.subtier-row {
    display: grid;
    grid-template-columns: 70px 1fr 48px;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
}
.subtier-label {
    color: #8b949e;
}
.subtier-bar {
    height: 6px;
    background: #1f2630;
    border-radius: 3px;
    overflow: hidden;
}
.subtier-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #93c5fd, #3b82f6);
    transition: width 0.3s ease;
}
.subtier-val {
    color: #e6edf3;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    text-align: right;
}

/* ── Market Analysis V3 — Kill Switch 배너 ── */
.md-kill-banner[hidden] { display: none !important; }
.md-kill-banner {
    margin: 12px 0;
    padding: 14px 18px;
    background: linear-gradient(90deg, #7f1d1d, #991b1b);
    border: 2px solid #ef4444;
    border-radius: 10px;
    color: #fee2e2;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}
.md-kill-banner strong { font-size: 1.05rem; }
.md-kill-banner__detail { font-size: 0.85rem; opacity: 0.85; margin-left: auto; }

/* ── 7 차원 카드 — V4 컴팩트 ── */
.md-dimensions {
    margin: 16px 0;
    padding: 16px 18px 18px;
    background: #12171e;
    border: 1px solid #2a3441;
    border-radius: 12px;
}
.md-dimensions__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.md-dimensions__title {
    margin: 0;
    font-size: 0.95rem;
    color: #c9d1d9;
}
.md-dimensions__hint {
    margin: 0;
    font-size: 0.75rem;
    color: #6b7280;
}
.md-dimensions__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}
/* 카드 자체가 <a> 링크 */
a.md-dim-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    background: #161b22;
    border: 1px solid #2a3441;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.1s, background 0.15s;
    cursor: pointer;
}
a.md-dim-card:hover {
    border-color: #3b82f6;
    background: #1a2230;
    transform: translateY(-1px);
}
a.md-dim-card.md-dim-card--warn { border-color: #f59e0b; background: #1a1410; }
a.md-dim-card.md-dim-card--warn:hover { background: #221810; border-color: #fbbf24; }

.md-dim-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}
.md-dim-card__title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #8b949e;
    letter-spacing: 0.2px;
}
.md-dim-card__score {
    font-size: 1.05rem;
    font-weight: 700;
    color: #e6edf3;
    font-variant-numeric: tabular-nums;
}
.md-dim-card__score small { font-size: 0.65em; color: #6b7280; margin-left: 1px; }
.md-dim-card__label {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 0.95rem;
    color: #e6edf3;
}
.md-dim-card__label strong { font-weight: 700; }
.md-dim-card--warn .md-dim-card__label strong { color: #fbbf24; }
.md-dim-card__intens {
    font-size: 0.72rem;
    color: #8b949e;
    font-weight: 400;
}
.md-dim-card__bar {
    height: 5px;
    background: #1f2630;
    border-radius: 3px;
    overflow: hidden;
}
.md-dim-card__fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #93c5fd, #3b82f6);
    transition: width 0.3s ease;
}
.md-dim-card--warn .md-dim-card__fill {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

/* 카드 안 sub-tier 미니 줄 */
.md-dim-card__subs {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 2px;
    padding-top: 8px;
    border-top: 1px solid #2a3441;
}
.md-subline {
    display: grid;
    grid-template-columns: minmax(80px, 1.4fr) minmax(60px, 2fr) 32px;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
}
.md-subline__label { color: #c9d1d9; }
.md-subline__bar {
    height: 4px;
    background: #1f2630;
    border-radius: 2px;
    overflow: hidden;
}
.md-subline__fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #6b7fbe, #3b82f6);
}
.md-subline__val {
    text-align: right;
    color: #e6edf3;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.md-dim-card--warn .md-subline__fill {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

/* subtier 풀 표는 상세 페이지에서만 사용 */
.subtier-row {
    grid-template-columns: 140px 60px 1fr 56px 56px 1fr;
    font-size: 0.78rem;
}
.subtier-detail {
    color: #8b949e;
    font-size: 0.72rem;
    padding-left: 8px;
}
.subtier-grade {
    color: #e6edf3;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.subtier-grade small { font-size: 0.7em; color: #8b949e; }
.subtier-weight {
    color: #8b949e;
    font-variant-numeric: tabular-nums;
    text-align: right;
    font-size: 0.72rem;
}
.subtier-table-head {
    display: grid;
    grid-template-columns: 140px 60px 1fr 56px 56px 1fr;
    gap: 8px;
    padding: 0 12px 4px;
    border-bottom: 1px solid #2a3441;
    margin-bottom: 4px;
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.subtier-th--num { text-align: right; }
.md-dim-card__ko {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(139, 148, 158, 0.15);
    color: #c9d1d9;
    font-size: 0.78rem;
    font-weight: 500;
}
.md-dim-card__expand-hint {
    margin: 10px 0 0;
    padding-top: 8px;
    border-top: 1px solid #2a3441;
    font-size: 0.78rem;
    color: #8b949e;
}
.md-dim-card__expand-link {
    color: #58a6ff;
    text-decoration: none;
}
.md-dim-card__expand-link:hover { text-decoration: underline; }

/* 상세 페이지 */
.md-detail-score__head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.md-detail-score__label {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e6edf3;
}
.md-detail-score__val {
    margin-left: auto;
    font-size: 1.2rem;
    font-weight: 700;
    color: #c9d1d9;
    font-variant-numeric: tabular-nums;
}
.md-detail-score__detail {
    margin: 8px 0 0;
    color: #8b949e;
    font-size: 0.85rem;
}
.md-detail-score__intensity {
    margin: 8px 0 0;
    color: #c9d1d9;
    font-size: 0.85rem;
}
.md-detail-subtier-head { font-size: 0.75rem; }
/* V3 활성조건 — 현재 시장 V4 미니 위젯 */
.v3-market-now {
    margin: 8px 0 16px;
    padding: 12px 14px;
    background: #0d1117;
    border: 1px solid #2a3441;
    border-radius: 8px;
}
.v3-market-now__head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 0.82rem;
    color: #c9d1d9;
    flex-wrap: wrap;
}
.v3-market-now__raw { color: #8b949e; font-variant-numeric: tabular-nums; }
.v3-market-now__intens { color: #8b949e; font-variant-numeric: tabular-nums; }
.v3-market-now__kill {
    margin-left: auto;
    padding: 2px 10px;
    border-radius: 6px;
    background: #7f1d1d;
    color: #fee2e2;
    font-weight: 700;
    font-size: 0.78rem;
}
.v3-market-now__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}
.v3-market-now__cell {
    display: grid;
    grid-template-columns: 60px 1fr 50px;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #161b22;
    border: 1px solid #2a3441;
    border-radius: 6px;
    font-size: 0.78rem;
}
.v3-market-now__dim { color: #8b949e; font-weight: 600; }
.v3-market-now__label { color: #e6edf3; }
.v3-market-now__score {
    text-align: right;
    color: #e6edf3;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.md-detail-raw {
    background: #0d1117;
    border: 1px solid #2a3441;
    border-radius: 8px;
    padding: 14px;
    color: #c9d1d9;
    font-family: monospace;
    font-size: 0.78rem;
    overflow-x: auto;
    white-space: pre;
    line-height: 1.5;
}

/* 스캔 LOG 상세 — V4 dimensions */
.md-scan-log-v4__summary {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 12px 14px;
    background: #161b22;
    border: 1px solid #2a3441;
    border-radius: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.md-scan-log-v4__metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.md-scan-log-v4__metric-label {
    font-size: 0.72rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.md-scan-log-v4__metric-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e6edf3;
    font-variant-numeric: tabular-nums;
}
.md-scan-log-v4__kill {
    margin-left: auto;
    padding: 4px 12px;
    border-radius: 8px;
    background: #7f1d1d;
    color: #fee2e2;
    font-weight: 700;
    border: 1px solid #ef4444;
}
.md-scan-log-v4__ok {
    margin-left: auto;
    padding: 4px 12px;
    border-radius: 8px;
    background: #064e3b;
    color: #6ee7b7;
    font-weight: 600;
    border: 1px solid #065f46;
    font-size: 0.85rem;
}
.md-scan-log-v4__dims td.md-scan-log-v4__subs {
    font-size: 0.78rem;
    color: #8b949e;
}
.md-scan-log-v4__dims td.md-scan-log-v4__subs strong {
    color: #e6edf3;
    font-weight: 700;
}
.md-dimensions__grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tier-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 10px;
    background: #161b22;
    border-bottom: 1px solid #2a3441;
}
.tier-panel__head h3 {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}
.tier-panel__score {
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: #e6edf3;
}
.tier-panel__num { font-size: 1.05rem; font-weight: 700; }
.tier-panel__max { font-size: 0.75rem; color: #8b949e; }
.tier-panel__bar {
    height: 4px;
    background: #1f2630;
}
.tier-panel__fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #6ee7b7, #10b981);
    transition: width 0.3s ease;
}

.signal-grade-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.signal-grade-num {
    min-width: 48px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #e6edf3;
}
.signal-grade-num small { font-size: 0.7em; color: #8b949e; margin-left: 2px; }
.signal-grade-bar {
    flex: 1;
    min-width: 60px;
    max-width: 120px;
    height: 6px;
    background: #1f2630;
    border-radius: 3px;
    overflow: hidden;
}
.signal-grade-fill {
    display: block;
    height: 100%;
    background: #6b7280;
    transition: width 0.3s ease;
}
.signal-grade-fill.is-pass {
    background: linear-gradient(90deg, #6ee7b7, #10b981);
}

.regime-tag--strong_bull { background: #065f46; }
.regime-tag--bull { background: #0e7490; }
.regime-tag--neutral { background: #525252; }
.regime-tag--bear { background: #92400e; }
.regime-tag--strong_bear { background: #991b1b; }

/* ── 활성 전략 요약 박스 ── */
.md-strategy-status {
    margin: 16px 0;
    padding: 18px;
    background: #12171e;
    border: 1px solid #2a3441;
    border-radius: 12px;
}
.md-strategy-status__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.md-strategy-status__head h3 {
    margin: 0;
    font-size: 0.95rem;
    color: #c9d1d9;
}
.md-strategy-status__counts {
    display: flex;
    gap: 8px;
}
.md-count {
    padding: 3px 10px;
    border-radius: 12px;
    background: #1f2630;
    color: #c9d1d9;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid #2a3441;
}
.md-count--on { background: #064e3b; border-color: #065f46; color: #6ee7b7; }
.md-count--off { background: #3f1d1d; border-color: #991b1b; color: #fca5a5; }
.md-strategy-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.md-strategy-row {
    display: grid;
    grid-template-columns: 14px 40px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #161b22;
    border: 1px solid #2a3441;
    border-radius: 8px;
    font-size: 0.85rem;
}
.md-strategy-row--on { border-left: 3px solid #10b981; }
.md-strategy-row--off { border-left: 3px solid #6b7280; opacity: 0.7; }
.md-strategy-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #6b7280;
}
.md-strategy-dot--on { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.5); }
.md-strategy-dot--off { background: #6b7280; }
.md-strategy-id {
    font-weight: 700;
    color: #e6edf3;
    font-variant-numeric: tabular-nums;
}
.md-strategy-name { color: #c9d1d9; }
.md-strategy-reason {
    font-size: 0.75rem;
    color: #8b949e;
    font-variant-numeric: tabular-nums;
}

/* ── Regime 전환 히스토리 ── */
.md-transitions {
    margin: 16px 0;
    padding: 18px;
    background: #12171e;
    border: 1px solid #2a3441;
    border-radius: 12px;
}
.md-transitions h3 {
    margin: 0 0 14px;
    font-size: 0.95rem;
    color: #c9d1d9;
}
.md-transition-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.md-transition-row {
    display: grid;
    grid-template-columns: 160px 110px 24px 110px 1fr;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #161b22;
    border: 1px solid #2a3441;
    border-radius: 8px;
    font-size: 0.83rem;
}
.md-transition-time {
    color: #8b949e;
    font-variant-numeric: tabular-nums;
    font-size: 0.78rem;
}
.md-transition-arrow { color: #6b7280; text-align: center; }
.md-transition-score {
    color: #e6edf3;
    font-variant-numeric: tabular-nums;
    text-align: right;
    font-weight: 600;
}

/* 시장 변화 타임라인 row — 7개 컬럼 (시간·icon·label·from·→·to·intens) */
.md-change-row {
    grid-template-columns: 140px 28px 80px 110px 24px 160px 1fr;
}
.md-change-icon {
    font-size: 1.05rem;
    text-align: center;
}
.md-change-type {
    font-weight: 600;
    font-size: 0.82rem;
    color: #58a6ff;
}
.md-change-type--regime { color: #d29922; }
.md-change-type--intensity { color: #79c0ff; }
.md-change-type--vol { color: #f0883e; }
.md-change-type--liq { color: #56d364; }
.md-change-type--risk { color: #f85149; }
.md-change-type--rotation { color: #a371f7; }
.md-change-type--rot { color: #a371f7; }
.md-change-type--direction { color: #d29922; font-weight: 700; }
.md-change-type--volatility { color: #f0883e; }
.md-change-type--risk_state { color: #f85149; }
.md-change-type--liquidity { color: #56d364; }
.md-change-type--sentiment { color: #db61a2; }
.md-change-type--macro { color: #58a6ff; }
.md-change-type--kill_switch { color: #f85149; font-weight: 700; }

/* score 변화 보조 표기 */
.md-change-score {
    color: #8b949e;
    font-size: 0.78rem;
    font-family: ui-monospace, "SF Mono", Monaco, monospace;
    margin-left: 6px;
}

/* 7차원 현재 상태 — 상단 칩 배열 */
.md-dim-now {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #12171e;
    border: 1px solid #2a3441;
    border-radius: 10px;
    margin-bottom: 12px;
}
.md-dim-now__title {
    color: #8b949e;
    font-size: 0.82rem;
    margin-right: 4px;
}
.md-dim-now__intens {
    color: #79c0ff;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-right: 8px;
    font-size: 0.85rem;
}
.md-dim-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    background: #161b22;
    border: 1px solid #2a3441;
    border-radius: 12px;
    font-size: 0.78rem;
}
.md-dim-chip__icon { font-size: 0.9rem; }
.md-dim-chip__name { color: #8b949e; }
.md-dim-chip__label { color: #e6edf3; font-weight: 600; }
.md-dim-chip__score {
    color: #79c0ff;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, "SF Mono", Monaco, monospace;
    font-size: 0.75rem;
}
.md-dim-chip--direction  { border-left: 3px solid #d29922; }
.md-dim-chip--volatility { border-left: 3px solid #f0883e; }
.md-dim-chip--liquidity  { border-left: 3px solid #56d364; }
.md-dim-chip--risk_state { border-left: 3px solid #f85149; }
.md-dim-chip--rotation   { border-left: 3px solid #a371f7; }
.md-dim-chip--sentiment  { border-left: 3px solid #db61a2; }
.md-dim-chip--macro      { border-left: 3px solid #58a6ff; }

.tier-panel {
    background: #12171e;
    border: 1px solid #2a3441;
    border-radius: 12px;
    overflow: hidden;
}

.tier-panel h3 {
    margin: 0;
    padding: 14px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #c9d1d9;
    background: #161b22;
    border-bottom: 1px solid #2a3441;
}

.signal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.signal-table th,
.signal-table td {
    padding: 10px 20px;
    text-align: left;
    border-bottom: 1px solid #1e2630;
}

.signal-table th {
    color: #8b949e;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

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

.signal-table td.mono {
    font-family: ui-monospace, monospace;
    font-size: 0.82rem;
    color: #79c0ff;
}

.signal-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    background: #484f58;
}

.signal-dot.on {
    background: #3fb950;
}

.signal-detail {
    font-size: 0.78rem;
    color: #8b949e;
}

.legend-table tr.legend-active td {
    background: rgba(240, 136, 62, 0.08);
}

.legend-table tr.legend-active td.mono {
    color: #f0883e;
}

.regime-legend {
    margin-top: 24px;
    max-width: 960px;
}

.regime-legend h3 {
    font-size: 0.9rem;
    margin: 0 0 12px;
    color: #c9d1d9;
}

.legend-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: #12171e;
    border: 1px solid #2a3441;
    border-radius: 12px;
    overflow: hidden;
}

.legend-table th,
.legend-table td {
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid #1e2630;
}

.legend-table th {
    background: #161b22;
    color: #8b949e;
    font-size: 0.72rem;
    text-transform: uppercase;
}

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

/* 전략 */
.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    max-width: 960px;
}

.strategy-card {
    background: #12171e;
    border: 1px solid #2a3441;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.strategy-card h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.strategy-card .strategy-desc {
    margin: 0;
    font-size: 0.9rem;
    color: #8b949e;
    line-height: 1.55;
    flex: 1;
    white-space: pre-wrap;
}

.strategy-card .strategy-meta {
    font-size: 0.8rem;
    color: #6e7681;
}

.strategy-card .tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #21262d;
    color: #8b949e;
    margin-right: 6px;
}

.strategy-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.strategy-card__status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.strategy-card__market {
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
}

.strategy-card__market-score {
    font-weight: 700;
    margin-left: 2px;
}

/* regime list 표기 (ALL / S↑·↑·─·↓·S↓ / no S↓ 등) */
.strategy-card__market-regime {
    font-family: ui-monospace, "SF Mono", Monaco, monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 100%;
}

/* 통과/차단 작은 라벨 (활성/차단) — 부드러운 알약 */
.strategy-card__market-state {
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.08);
    opacity: 0.9;
}

/* 상태 점 — 색은 pass/fail 클래스가 담당 */
.strategy-card__market-dot {
    font-size: 0.65rem;
    line-height: 1;
    text-shadow: 0 0 6px currentColor;
}

.strategy-card__market--pass {
    background: rgba(63, 185, 80, 0.12);
    color: #3fb950;
    border: 1px solid rgba(63, 185, 80, 0.35);
}

.strategy-card__market--fail {
    background: rgba(248, 81, 73, 0.1);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.35);
}

.strategy-card__market--neutral {
    background: rgba(139, 148, 158, 0.1);
    color: #8b949e;
    border: 1px solid rgba(139, 148, 158, 0.25);
}

.strategy-card__market--na {
    background: rgba(139, 148, 158, 0.1);
    color: #8b949e;
    border: 1px solid rgba(139, 148, 158, 0.25);
}

.strategy-card__schedule {
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.strategy-card__schedule--on {
    background: rgba(56, 139, 253, 0.12);
    color: #58a6ff;
    border: 1px solid rgba(56, 139, 253, 0.35);
}

.strategy-card__schedule--off {
    background: rgba(139, 148, 158, 0.1);
    color: #8b949e;
    border: 1px solid rgba(139, 148, 158, 0.25);
}

.strategy-card__version {
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: ui-monospace, monospace;
    background: rgba(240, 136, 62, 0.12);
    color: #f0883e;
    border: 1px solid rgba(240, 136, 62, 0.3);
}

.strategy-card__category {
    margin-left: 6px;
    font-size: 0.7rem;
    font-weight: 700;
}
/* cat-chip 색상은 .cat-chip--A ~ J 가 결정. card용 인라인 사이즈만 보정 */
.strategy-card__category.cat-chip {
    width: auto;
    height: auto;
    padding: 1px 6px;
}

/* ──────────────────────────────────────────────────────────────
   전략 카탈로그 매트릭스 (A~J) — 디자인 시스템
   ────────────────────────────────────────────────────────────── */
.strategy-catalog-matrix {
    margin: 20px 0 28px;
    padding: 0;
    background:
        radial-gradient(800px 200px at 0% 0%, rgba(88, 166, 255, 0.06), transparent 60%),
        linear-gradient(180deg, rgba(22, 27, 34, 0.85), rgba(22, 27, 34, 0.55));
    border: 1px solid rgba(48, 54, 61, 0.7);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

/* ─── 헤더 (summary) ─── */
.strategy-catalog-matrix__summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(48, 54, 61, 0);
    transition: border-color 0.2s ease;
    outline: none;
}
.strategy-catalog-matrix[open] > .strategy-catalog-matrix__summary {
    border-bottom-color: rgba(48, 54, 61, 0.6);
}
.strategy-catalog-matrix__summary::-webkit-details-marker { display: none; }
.strategy-catalog-matrix__summary:hover {
    background: rgba(255, 255, 255, 0.015);
}
.strategy-catalog-matrix__title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}
.strategy-catalog-matrix__title {
    position: relative;
    padding-left: 22px;
    color: #f0f6fc;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.strategy-catalog-matrix__title::before {
    content: "▸";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #58a6ff;
    font-size: 0.8rem;
    font-weight: 600;
    transition: transform 0.2s ease;
}
.strategy-catalog-matrix[open] > .strategy-catalog-matrix__summary .strategy-catalog-matrix__title::before {
    transform: translateY(-50%) rotate(90deg);
}
.strategy-catalog-matrix__subtitle {
    padding-left: 22px;
    color: #8b949e;
    font-size: 0.78rem;
    font-weight: 400;
}
.strategy-catalog-matrix__progress {
    flex-shrink: 0;
    text-align: right;
    padding: 6px 14px 8px;
    background: rgba(88, 166, 255, 0.08);
    border: 1px solid rgba(88, 166, 255, 0.25);
    border-radius: 10px;
    min-width: 88px;
}
.strategy-catalog-matrix__progress-num {
    color: #58a6ff;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    font-family: ui-monospace, monospace;
    letter-spacing: -0.02em;
}
.strategy-catalog-matrix__progress-total {
    color: #6e7681;
    font-size: 0.9rem;
    font-weight: 500;
}
.strategy-catalog-matrix__progress-label {
    margin-top: 3px;
    color: #8b949e;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ─── 그리드 ─── */
.strategy-catalog-matrix__grid {
    padding: 18px 22px 14px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
}

/* ─── 카드 ─── */
.cat-card {
    --cat-color: 139, 148, 158;
    position: relative;
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
    padding: 14px 14px 13px;
    background:
        linear-gradient(135deg, rgba(var(--cat-color), 0.06), rgba(var(--cat-color), 0.02) 70%),
        rgba(13, 17, 23, 0.55);
    border: 1px solid rgba(var(--cat-color), 0.22);
    border-radius: 10px;
    transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.18s ease,
                border-color 0.18s ease,
                background 0.18s ease;
    overflow: hidden;
}
.cat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: rgba(var(--cat-color), 0.55);
    box-shadow: 0 0 12px rgba(var(--cat-color), 0.5);
}
.cat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--cat-color), 0.5);
    box-shadow: 0 6px 20px rgba(var(--cat-color), 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ─── 큰 letter chip ─── */
.cat-card__chip {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-family: ui-monospace, "SF Mono", Monaco, monospace;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, rgba(var(--cat-color), 0.28), rgba(var(--cat-color), 0.14));
    color: rgb(var(--cat-color));
    border: 1px solid rgba(var(--cat-color), 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08),
                0 2px 8px rgba(var(--cat-color), 0.2);
}

.cat-card__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.cat-card__title {
    margin: 0;
    color: #f0f6fc;
    font-size: 0.92rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    line-height: 1.3;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.cat-card__sub {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6e7681;
    letter-spacing: 0.02em;
    font-family: ui-monospace, monospace;
}
.cat-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cat-card__regime {
    padding: 2px 8px;
    background: rgba(var(--cat-color), 0.12);
    color: rgb(var(--cat-color));
    border: 1px solid rgba(var(--cat-color), 0.3);
    border-radius: 4px;
    font-family: ui-monospace, monospace;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.cat-card__count {
    margin-left: auto;
    padding: 2px 7px;
    color: #8b949e;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(48, 54, 61, 0.7);
    border-radius: 4px;
    font-family: ui-monospace, monospace;
    font-size: 0.7rem;
    font-weight: 600;
}
.cat-card__count.is-filled {
    color: rgb(var(--cat-color));
    background: rgba(var(--cat-color), 0.1);
    border-color: rgba(var(--cat-color), 0.35);
}
/* 운영중 sub-id 칩 */
.cat-card__live {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.cat-card__live-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    font-family: ui-monospace, monospace;
    font-size: 0.7rem;
    font-weight: 700;
    color: #8b949e;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(48, 54, 61, 0.7);
    border-radius: 4px;
    line-height: 1.3;
}
.cat-card__live-chip.is-live {
    color: rgb(var(--cat-color));
    background: rgba(var(--cat-color), 0.14);
    border-color: rgba(var(--cat-color), 0.5);
    box-shadow: 0 0 0 1px rgba(var(--cat-color), 0.15);
}
.cat-card--has-live {
    border-color: rgba(var(--cat-color), 0.45);
}
.cat-card__desc {
    margin: 2px 0 0;
    color: #8b949e;
    font-size: 0.76rem;
    line-height: 1.5;
}

/* ─── 카테고리별 컬러 토큰 (--cat-color RGB) ─── */
.cat-card--A { --cat-color: 63, 185, 80; }   /* 초록 — 추세 */
.cat-card--B { --cat-color: 166, 116, 217; } /* 보라 — 평균회귀 */
.cat-card--C { --cat-color: 240, 136, 62; }  /* 오렌지 — 모멘텀 */
.cat-card--D { --cat-color: 88, 166, 255; }  /* 파랑 — 차익 */
.cat-card--E { --cat-color: 63, 199, 200; }  /* 청록 — 시장중립 */
.cat-card--F { --cat-color: 248, 81, 73; }   /* 빨강 — 파생 */
.cat-card--G { --cat-color: 210, 153, 34; }  /* 골드 — 온체인 */
.cat-card--H { --cat-color: 247, 178, 245; } /* 핑크 — 센티먼트 */
.cat-card--I { --cat-color: 255, 124, 84; }  /* 산호 — 이벤트 */
.cat-card--J { --cat-color: 173, 186, 199; } /* 라이트회색 — MM/ML */

/* ── 카탈로그 카드 클릭 효과 ───────────────────────────────── */
.cat-card[data-cat-open] { cursor: pointer; }
.cat-card[data-cat-open]:hover { transform: translateY(-3px); }
.cat-card[data-cat-open]:focus-visible {
    outline: 2px solid rgba(var(--cat-color), 0.6);
    outline-offset: 2px;
}

/* ── 카테고리 모달 ─────────────────────────────────────────── */
.cat-modal {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.cat-modal[hidden] { display: none; }
.cat-modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
}
.cat-modal__panel {
    position: relative;
    width: min(820px, 100%);
    max-height: 88vh;
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, #161b22, #0d1117);
    border: 1px solid rgba(48, 54, 61, 0.8);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}
.cat-modal__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid rgba(48, 54, 61, 0.6);
}
.cat-modal__title-area { display: flex; align-items: center; gap: 14px; }
.cat-modal__chip { width: 44px; height: 44px; font-size: 1.3rem; }
.cat-modal__title {
    margin: 0; color: #f0f6fc;
    font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em;
}
.cat-modal__sub {
    margin: 2px 0 0; color: #8b949e; font-size: 0.78rem;
}
.cat-modal__close {
    width: 32px; height: 32px;
    background: rgba(255, 255, 255, 0.05); color: #c9d1d9;
    border: 1px solid #30363d; border-radius: 8px;
    cursor: pointer; font-size: 0.9rem;
    transition: background 0.15s ease;
}
.cat-modal__close:hover {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
    border-color: rgba(248, 81, 73, 0.4);
}
.cat-modal__list {
    flex: 1; overflow-y: auto;
    padding: 14px 18px;
    display: flex; flex-direction: column; gap: 10px;
}
.cat-modal__footer {
    padding: 10px 22px 14px;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(48, 54, 61, 0.5);
    color: #8b949e; font-size: 0.74rem;
}
.cat-modal__footer code {
    padding: 1px 6px;
    background: rgba(240, 136, 62, 0.15);
    color: #f0883e;
    border-radius: 4px;
    font-size: 0.72rem;
}

/* ── 모달 내부 전략 row ───────────────────────────────────── */
.cat-strategy-row {
    padding: 11px 14px;
    background: rgba(13, 17, 23, 0.6);
    border: 1px solid rgba(48, 54, 61, 0.6);
    border-radius: 10px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.cat-strategy-row:hover {
    border-color: rgba(88, 166, 255, 0.4);
    transform: translateY(-1px);
}
.cat-strategy-row--active {
    border-color: rgba(63, 185, 80, 0.45);
    background: linear-gradient(135deg, rgba(63, 185, 80, 0.08), rgba(13, 17, 23, 0.6));
}
.cat-strategy-row__head {
    display: flex; align-items: baseline; gap: 10px;
    margin-bottom: 6px;
}
.cat-strategy-row__id {
    flex-shrink: 0;
    padding: 2px 8px;
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
    border: 1px solid rgba(88, 166, 255, 0.35);
    border-radius: 5px;
    font-family: ui-monospace, monospace;
    font-size: 0.78rem; font-weight: 700;
}
.cat-strategy-row__name {
    flex: 1; margin: 0;
    color: #f0f6fc;
    font-size: 0.93rem; font-weight: 600; letter-spacing: -0.01em;
}
.cat-strategy-row__badge {
    padding: 2px 7px;
    background: rgba(63, 185, 80, 0.18);
    color: #3fb950;
    border: 1px solid rgba(63, 185, 80, 0.4);
    border-radius: 4px;
    font-size: 0.66rem; font-weight: 700;
}
.cat-strategy-row__live-name {
    color: #79c0ff;
    font-size: 0.78rem;
    font-weight: 500;
    margin-left: 4px;
    opacity: 0.9;
}
.cat-strategy-row__field {
    display: flex; align-items: baseline; gap: 8px;
    margin-bottom: 6px;
    color: #c9d1d9;
    font-size: 0.78rem; line-height: 1.5;
}
.cat-strategy-row__label {
    flex-shrink: 0;
    padding: 1px 6px;
    background: rgba(139, 148, 158, 0.12);
    color: #8b949e;
    border: 1px solid rgba(139, 148, 158, 0.3);
    border-radius: 4px;
    font-size: 0.62rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.cat-strategy-row__meta {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.cat-strategy-row__chip {
    padding: 2px 7px;
    background: rgba(255, 255, 255, 0.04);
    color: #8b949e;
    border: 1px solid #30363d;
    border-radius: 5px;
    font-size: 0.7rem;
}

/* ─── 푸터 ─── */
.strategy-catalog-matrix__foot {
    margin: 0;
    padding: 12px 22px 14px;
    background: rgba(0, 0, 0, 0.18);
    border-top: 1px solid rgba(48, 54, 61, 0.5);
    color: #6e7681;
    font-size: 0.72rem;
    line-height: 1.6;
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.strategy-catalog-matrix__foot-label {
    padding: 2px 7px;
    background: rgba(139, 148, 158, 0.12);
    color: #c9d1d9;
    border: 1px solid rgba(139, 148, 158, 0.3);
    border-radius: 4px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: ui-monospace, monospace;
}

/* ── 카드의 ID 옆 [C] 배지 (기존 chip 유지) ──────────────────── */
.cat-chip {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: ui-monospace, monospace;
    background: rgba(88, 166, 255, 0.18);
    color: #58a6ff;
    border: 1px solid rgba(88, 166, 255, 0.35);
}
.cat-chip--A { background: rgba(63, 185, 80, 0.18); color: #3fb950; border-color: rgba(63, 185, 80, 0.4); }
.cat-chip--B { background: rgba(166, 116, 217, 0.18); color: #a674d9; border-color: rgba(166, 116, 217, 0.4); }
.cat-chip--C { background: rgba(240, 136, 62, 0.18); color: #f0883e; border-color: rgba(240, 136, 62, 0.4); }
.cat-chip--D { background: rgba(88, 166, 255, 0.18); color: #58a6ff; border-color: rgba(88, 166, 255, 0.4); }
.cat-chip--E { background: rgba(46, 160, 165, 0.20); color: #3fc7c8; border-color: rgba(46, 160, 165, 0.4); }
.cat-chip--F { background: rgba(248, 81, 73, 0.18); color: #f85149; border-color: rgba(248, 81, 73, 0.4); }
.cat-chip--G { background: rgba(210, 153, 34, 0.20); color: #d29922; border-color: rgba(210, 153, 34, 0.4); }
.cat-chip--H { background: rgba(247, 178, 245, 0.18); color: #f7b2f5; border-color: rgba(247, 178, 245, 0.4); }
.cat-chip--I { background: rgba(255, 124, 84, 0.18); color: #ff7c54; border-color: rgba(255, 124, 84, 0.4); }
.cat-chip--J { background: rgba(139, 148, 158, 0.20); color: #c9d1d9; border-color: rgba(139, 148, 158, 0.5); }

.strategy-card__actions {
    margin-top: 0;
}

.btn-strategy-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid rgba(240, 136, 62, 0.45);
    background: rgba(240, 136, 62, 0.1);
    color: #f0883e;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-strategy-detail:hover {
    background: #f0883e;
    color: #0d1117;
    border-color: #f0883e;
}

.strategy-back {
    margin: 0 0 12px;
    font-size: 0.88rem;
}

.strategy-back a {
    color: #8b949e;
    text-decoration: none;
}

.strategy-back a:hover {
    color: #f0883e;
}

.strategy-detail-section {
    max-width: 720px;
    margin-bottom: 24px;
}

.strategy-settings-panel {
    max-width: 960px;
    padding: 16px 18px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
}

.strategy-settings-panel > h3 {
    margin-top: 0;
}

.strategy-settings-panel > .hint {
    margin: 0 0 12px;
}

.strategy-settings-panel .strategy-spec-list {
    margin: 0;
}

.strategy-settings-panel .strategy-cond-list {
    margin: 0;
}

.strategy-detail-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 20px;
    padding: 4px;
    max-width: 960px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
}

.strategy-detail-tabs__tab {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #8b949e;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.strategy-detail-tabs__tab:hover {
    color: #f0883e;
    background: rgba(240, 136, 62, 0.08);
    border-color: rgba(240, 136, 62, 0.25);
}

.strategy-detail-tabs__tab.is-active {
    color: #0d1117;
    background: linear-gradient(180deg, #f0883e 0%, #e67e22 100%);
    border-color: #f0883e;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 2px 10px rgba(240, 136, 62, 0.3);
}

.ex-sync-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
}

.ex-sync-action-block {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

.ex-sync-section-title {
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 600;
}

.ex-sync-panel--divider {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border, #30363d);
}

.strategy-detail-tabs__tab.is-active:hover {
    color: #0d1117;
    background: linear-gradient(180deg, #ffa657 0%, #f0883e 100%);
    border-color: #ffa657;
}

.strategy-tab-panel {
    max-width: 960px;
}

.strategy-tab-panel[hidden] {
    display: none !important;
}

.v2-scan-stats-period .scan-period-tabs,
.v2-entry-history-period .scan-period-tabs {
    margin-top: 0;
}

.scan-period-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0 10px;
}

.scan-period-tabs__btn {
    padding: 8px 14px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: #c9d1d9;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    cursor: pointer;
}

.scan-period-tabs__btn:hover {
    color: #f0883e;
    border-color: rgba(240, 136, 62, 0.35);
}

.scan-period-tabs__btn.is-active {
    color: #0d1117;
    background: linear-gradient(180deg, #f0883e 0%, #e67e22 100%);
    border-color: #f0883e;
}

.scan-stats-custom-range {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
    margin-bottom: 10px;
    padding: 12px 14px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
}

.scan-stats-custom-range__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.scan-entry-stats-wrap {
    margin-top: 8px;
}

.scan-entry-stats-panel .v2-scan-stats-subbox {
    margin-top: 14px;
}

.scan-entry-stats-panel .v2-scan-stats-subbox > h3 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #c9d1d9;
}

.scan-entry-stats-range {
    margin: 0 0 12px;
    font-size: 0.8rem;
    color: #8b949e;
}

.scan-entry-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.scan-entry-stats-card {
    padding: 14px 16px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
}

.scan-entry-stats-card__label {
    display: block;
    font-size: 0.75rem;
    color: #8b949e;
    margin-bottom: 6px;
}

.scan-entry-stats-card__value {
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #f0883e;
    line-height: 1.1;
}

.scan-entry-stats-card__value--muted {
    color: #c9d1d9;
    font-size: 1.1rem;
}

.scan-entry-stats-subtitle {
    margin: 16px 0 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #c9d1d9;
}

.scan-log-table-wrap {
    margin-top: 12px;
    overflow-x: auto;
}

.scan-log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.scan-log-table th,
.scan-log-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #30363d;
    vertical-align: top;
}

.scan-log-table th {
    color: #8b949e;
    font-weight: 600;
    white-space: nowrap;
}

.scan-log-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.scan-log-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.scan-log-table__action {
    text-align: right;
    white-space: nowrap;
}

.v1-scan-log-pager,
.v2-scan-log-pager,
.v3-scan-log-pager,
.v4-scan-log-pager {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #30363d;
}

.v1-scan-log-pager__info,
.v2-scan-log-pager__info,
.v3-scan-log-pager__info,
.v4-scan-log-pager__info {
    margin: 0 0 10px;
    font-size: 0.82rem;
    color: #8b949e;
    text-align: center;
}

.v1-scan-log-pager__info strong,
.v2-scan-log-pager__info strong,
.v3-scan-log-pager__info strong,
.v4-scan-log-pager__info strong {
    color: #c9d1d9;
    font-weight: 600;
}

.v1-scan-log-pager__nav,
.v2-scan-log-pager__nav,
.v3-scan-log-pager__nav,
.v4-scan-log-pager__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.v1-scan-log-pager__btn,
.v1-scan-log-pager__num,
.v2-scan-log-pager__btn,
.v2-scan-log-pager__num,
.v3-scan-log-pager__btn,
.v3-scan-log-pager__num,
.v4-scan-log-pager__btn,
.v4-scan-log-pager__num {
    min-width: 36px;
    padding: 6px 10px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: #c9d1d9;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    cursor: pointer;
}

.v1-scan-log-pager__btn:hover:not(:disabled),
.v1-scan-log-pager__num:hover:not(.is-active),
.v2-scan-log-pager__btn:hover:not(:disabled),
.v2-scan-log-pager__num:hover:not(.is-active),
.v3-scan-log-pager__btn:hover:not(:disabled),
.v3-scan-log-pager__num:hover:not(.is-active),
.v4-scan-log-pager__btn:hover:not(:disabled),
.v4-scan-log-pager__num:hover:not(.is-active) {
    color: #f0883e;
    border-color: rgba(240, 136, 62, 0.35);
}

.v1-scan-log-pager__btn:disabled,
.v2-scan-log-pager__btn:disabled,
.v3-scan-log-pager__btn:disabled,
.v4-scan-log-pager__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.v1-scan-log-pager__num.is-active,
.v2-scan-log-pager__num.is-active,
.v3-scan-log-pager__num.is-active,
.v4-scan-log-pager__num.is-active {
    color: #0d1117;
    background: linear-gradient(180deg, #f0883e 0%, #e67e22 100%);
    border-color: #f0883e;
    cursor: default;
}

.v2-scan-log-pager__ellipsis {
    padding: 6px 4px;
    font-size: 0.8rem;
    color: #8b949e;
    user-select: none;
}

.btn-log-detail {
    padding: 5px 12px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: #58a6ff;
    background: rgba(56, 139, 253, 0.1);
    border: 1px solid rgba(56, 139, 253, 0.35);
    border-radius: 6px;
    cursor: pointer;
}

.btn-log-detail:hover {
    color: #fff;
    background: #388bfd;
    border-color: #388bfd;
}

.scan-log-table--inner {
    margin-top: 8px;
}

.scan-log-detail-fallback {
    margin-bottom: 12px;
}

.md-scan-log-board {
    border: 1px solid #2a3441;
    border-radius: 10px;
    overflow: hidden;
    background: #0d1117;
}

.md-scan-log-board__thead,
.md-scan-log-board__row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 72px 64px 56px 128px 56px;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 16px;
}

.md-scan-log-board__thead {
    background: #161b22;
    border-bottom: 1px solid #21262d;
    font-size: 0.72rem;
    font-weight: 600;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.md-scan-log-board__tbody {
    list-style: none;
    margin: 0;
    padding: 0;
}

.md-scan-log-board__row {
    border-bottom: 1px solid #21262d;
    transition: background 0.12s ease;
}

.md-scan-log-board__row:last-child {
    border-bottom: none;
}

.md-scan-log-board__row:hover {
    background: #161b22;
}

.md-scan-log-board__col--no {
    font-size: 0.78rem;
    font-weight: 700;
    color: #6e7681;
    text-align: center;
}

.md-scan-log-board__title-btn {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: #e6edf3;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.md-scan-log-board__title-btn:hover {
    color: #58a6ff;
    text-decoration: underline;
}

.md-scan-log-board__col--trigger {
    font-size: 0.78rem;
    color: #8b949e;
    text-align: center;
}

.md-scan-log-board__col--status {
    text-align: center;
}

.md-scan-log-board__col--time {
    font-size: 0.78rem;
    color: #8b949e;
    text-align: right;
}

.md-scan-log-board__col--action {
    text-align: center;
}

@media (max-width: 720px) {
    .md-scan-log-board__thead {
        display: none;
    }

    .md-scan-log-board__row {
        grid-template-columns: 36px 1fr auto;
        grid-template-rows: auto auto;
        padding: 12px 14px;
    }

    .md-scan-log-board__col--score,
    .md-scan-log-board__col--trigger,
    .md-scan-log-board__col--status,
    .md-scan-log-board__col--time {
        grid-column: 2;
        text-align: left;
    }

    .md-scan-log-board__col--action {
        grid-row: 1 / span 2;
        grid-column: 3;
        align-self: center;
    }
}

.md-scan-log-board__col--score {
    text-align: center;
    white-space: nowrap;
}

.md-scan-log-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.md-scan-log-badge--ok {
    color: #3fb950;
    background: rgba(63, 185, 80, 0.12);
}

.md-scan-log-badge--warn {
    color: #f0883e;
    background: rgba(240, 136, 62, 0.12);
}

.md-scan-log-badge--fail {
    color: #f85149;
    background: rgba(248, 81, 73, 0.12);
}

/* 시장분석 Regime · 점수 색상 */
.md-regime--STRONG_BULL,
.md-regime--STRONG_BULL .md-score__max {
    color: #3fb950;
}

.md-regime--BULL,
.md-regime--BULL .md-score__max {
    color: #56d364;
}

.md-regime--NEUTRAL,
.md-regime--NEUTRAL .md-score__max {
    color: #f0883e;
}

.md-regime--BEAR,
.md-regime--BEAR .md-score__max {
    color: #ff7b72;
}

.md-regime--STRONG_BEAR,
.md-regime--STRONG_BEAR .md-score__max {
    color: #f85149;
}

.md-regime--neutral,
.md-regime--neutral .md-score__max {
    color: #8b949e;
}

.md-regime-tag {
    display: inline-block;
    padding: 2px 8px;
    margin-right: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 4px;
    background: rgba(139, 148, 158, 0.12);
    border: 1px solid currentColor;
}

.md-regime-meaning {
    margin-right: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #8b949e;
}

.md-score {
    display: inline-block;
    margin-right: 8px;
    font-size: 0.88rem;
    font-weight: 700;
}

.md-score__max {
    font-weight: 500;
    opacity: 0.85;
}

.md-scan-log-board__title-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
    min-width: 0;
}

.md-scan-log-board__title-btn.md-scan-log-board__title-btn--fail,
.md-scan-log-board__title-btn.md-scan-log-board__title-btn--fail:hover {
    color: #f85149;
}

.md-scan-log-board__symbol {
    font-size: 0.82rem;
    color: #8b949e;
    font-weight: 500;
}

/* 거래소 동기화 — 스캔 LOG (집계 열 넓게) */
.ex-sync-scan-log-section__head {
    margin-bottom: 0;
}

.ex-sync-scan-log-section__status {
    margin: 8px 0 12px;
    min-height: 1.25em;
}

.ex-sync-scan-log-section__status[hidden] {
    display: none;
}

.ex-sync-scan-log-list {
    margin: 0;
}

.ex-sync-scan-log-pager {
    margin-top: 16px;
}

.md-scan-log-board.ex-sync-scan-log-board .md-scan-log-board__thead,
.md-scan-log-board.ex-sync-scan-log-board .md-scan-log-board__row {
    grid-template-columns: 44px minmax(0, 1.25fr) minmax(200px, 220px) 52px 52px 118px 52px;
}

.md-scan-log-board.ex-sync-scan-log-board .md-scan-log-board__col--score {
    text-align: left;
    white-space: normal;
}

.ex-sync-log-title-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.ex-sync-log-metrics {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    font-size: 0.72rem;
    color: #8b949e;
    line-height: 1.35;
}

.ex-sync-log-metrics__item strong {
    color: #e6edf3;
    font-weight: 600;
}

@media (max-width: 720px) {
    .md-scan-log-board.ex-sync-scan-log-board .md-scan-log-board__row {
        grid-template-columns: 36px 1fr auto;
        grid-template-rows: auto auto auto;
    }

    .md-scan-log-board.ex-sync-scan-log-board .md-scan-log-board__col--title {
        grid-column: 2;
        grid-row: 1;
    }

    .md-scan-log-board.ex-sync-scan-log-board .md-scan-log-board__col--score {
        grid-column: 2;
        grid-row: 2;
        padding-top: 4px;
    }

    .md-scan-log-board.ex-sync-scan-log-board .md-scan-log-board__col--trigger {
        grid-column: 2;
        grid-row: 3;
    }

    .md-scan-log-board.ex-sync-scan-log-board .md-scan-log-board__col--status {
        grid-column: 2;
        grid-row: 4;
    }

    .md-scan-log-board.ex-sync-scan-log-board .md-scan-log-board__col--time {
        grid-column: 2;
        grid-row: 5;
        text-align: left;
    }

    .md-scan-log-board.ex-sync-scan-log-board .md-scan-log-board__col--action {
        grid-row: 1 / span 5;
        grid-column: 3;
    }
}

.md-scan-log-detail-score {
    font-size: 1.1rem;
    font-weight: 700;
}

.md-scan-log-detail-regime {
    font-size: 1rem;
    font-weight: 600;
}

.md-scan-log-detail-meaning {
    margin-left: 6px;
    color: #8b949e;
    font-weight: 500;
}

.md-scan-log-signal-pass {
    color: #3fb950;
    font-weight: 600;
}

.md-scan-log-signal-fail {
    color: #8b949e;
    font-weight: 600;
}

.scan-log-detail-dialog {
    padding: 0;
    border: 1px solid #2a3441;
    border-radius: 12px;
    background: #0d1117;
    color: #c9d1d9;
    max-width: min(720px, 92vw);
    width: 100%;
}

.scan-log-detail-dialog::backdrop {
    background: rgba(0, 0, 0, 0.65);
}

.scan-log-detail-dialog__inner {
    padding: 0;
}

.scan-log-detail-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #2a3441;
}

.scan-log-detail-dialog__head h3 {
    margin: 0;
    font-size: 1rem;
}

.scan-log-detail-dialog__close {
    font-size: 1.5rem;
    line-height: 1;
    padding: 4px 10px;
    color: #8b949e;
    background: transparent;
    border: none;
    cursor: pointer;
}

.scan-log-detail-dialog__body {
    padding: 16px 20px 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.md-scan-log-detail-summary {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 8px 12px;
    margin: 0 0 16px;
    font-size: 0.88rem;
}

.md-scan-log-detail-summary dt {
    color: #8b949e;
    margin: 0;
}

.md-scan-log-detail-summary dd {
    margin: 0;
}

.md-scan-log-detail-error {
    color: #f85149;
    font-size: 0.88rem;
    margin: 0 0 12px;
}

.md-scan-log-detail-tier {
    margin-top: 16px;
}

.md-scan-log-detail-tier h4 {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: #8b949e;
}










.strategy-settings-placeholder {
    min-height: 48px;
    padding: 12px 0;
}

.strategy-indicator-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.strategy-indicator-form__actions {
    margin-top: 0;
    padding-top: 4px;
}

.indicator-panel {
    border: 1px solid #2a3441;
    border-radius: 10px;
    overflow: hidden;
    background: #0d1117;
}

.indicator-panel__row {
    display: grid;
    grid-template-columns: 88px minmax(120px, 220px) 1fr;
    align-items: center;
    gap: 12px 20px;
    padding: 12px 16px;
    border-bottom: 1px solid #21262d;
}

.indicator-panel__row:last-child {
    border-bottom: none;
}

.indicator-panel__row--stacked {
    grid-template-columns: 88px 1fr;
    align-items: start;
}

.indicator-panel__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.indicator-panel__ctrl--inline {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px;
}

.indicator-panel__row--stacked .indicator-panel__formula {
    padding-top: 0;
}

.indicator-panel__row--readonly {
    grid-template-columns: 88px 1fr;
}

.indicator-panel__row--readonly .indicator-panel__ctrl {
    display: none;
}

@media (max-width: 720px) {
    .indicator-panel__row {
        grid-template-columns: 72px 1fr;
        gap: 8px 12px;
    }

    .indicator-panel__row:not(.indicator-panel__row--readonly):not(.indicator-panel__row--stacked) {
        grid-template-columns: 72px auto;
    }

    .indicator-panel__row:not(.indicator-panel__row--readonly):not(.indicator-panel__row--stacked) .indicator-panel__formula {
        grid-column: 1 / -1;
        padding-top: 2px;
    }

    .indicator-panel__row--stacked {
        grid-template-columns: 72px 1fr;
    }

    .indicator-panel__ctrl--inline {
        flex-wrap: wrap;
    }

    .indicator-panel__row--readonly {
        grid-template-columns: 72px 1fr;
    }
}

.indicator-panel__tag {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #e6edf3;
    padding: 4px 0;
}

.indicator-panel__ctrl {
    display: flex;
    align-items: center;
    min-width: 0;
}

.indicator-panel__ctrl--group {
    flex-wrap: wrap;
    gap: 10px 16px;
}

.indicator-panel__formula {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #6e7681;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    word-break: break-word;
}

.indicator-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.indicator-field__label {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.strategy-settings-input--compact {
    width: 5.5rem;
    min-width: 0;
    padding: 7px 10px;
    font-size: 0.88rem;
}

select.strategy-settings-input--compact {
    width: 6.5rem;
}











.btn-refresh--sm {
    padding: 8px 14px;
    font-size: 0.82rem;
}

.btn-api-call--danger {
    border-color: rgba(248, 81, 73, 0.45);
    color: #f85149;
}

.btn-api-call--danger:hover {
    border-color: #f85149;
    background: rgba(248, 81, 73, 0.12);
    color: #ff7b72;
}

.strategy-scan-panel .strategy-detail-row {
    margin-bottom: 0;
}

.strategy-scan-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}



.btn-api-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid #30363d;
    background: #21262d;
    color: #c9d1d9;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.btn-api-call:hover {
    border-color: #58a6ff;
    color: #58a6ff;
    background: rgba(56, 139, 253, 0.08);
}

.btn-api-call:focus-visible {
    outline: 2px solid #388bfd;
    outline-offset: 2px;
}

.strategy-scan-panel .md-status {
    display: block;
    margin-top: 8px;
}

.strategy-settings-form {
    margin: 0;
}

.strategy-settings-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #30363d;
}

.strategy-settings-actions .md-status {
    flex: 1;
    min-width: 160px;
}

.btn-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(56, 139, 253, 0.45);
    background: linear-gradient(180deg, rgba(56, 139, 253, 0.18) 0%, rgba(56, 139, 253, 0.08) 100%);
    color: #58a6ff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 2px 8px rgba(0, 0, 0, 0.25);
}

.btn-save:hover:not(:disabled) {
    background: linear-gradient(180deg, #388bfd 0%, #1f6feb 100%);
    border-color: #388bfd;
    color: #fff;
}

.btn-save:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-save:focus-visible {
    outline: 2px solid #388bfd;
    outline-offset: 2px;
}

.strategy-settings-fieldset {
    margin: 0 0 16px;
    padding: 0;
    border: none;
}

.strategy-settings-fieldset legend {
    padding: 0;
    margin-bottom: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.symbol-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.symbol-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.82rem;
    color: #c9d1d9;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
}

.symbol-chip:has(input:checked) {
    border-color: #388bfd;
    background: rgba(56, 139, 253, 0.12);
    color: #e6edf3;
}

.symbol-chip input {
    accent-color: #388bfd;
}

.strategy-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px 16px;
}

.strategy-settings-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.strategy-settings-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.strategy-spec-list--compact {
    margin-bottom: 14px;
}

.strategy-spec-list--compact li {
    padding: 6px 0;
}

.hint-inline {
    font-size: 0.78rem;
    font-weight: 400;
    color: #6e7681;
}

.strategy-strategy-params {
    margin-top: 4px;
}

@media (max-width: 720px) {
    .strategy-settings-grid--3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .strategy-settings-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .strategy-settings-grid--4 {
        grid-template-columns: 1fr;
    }
}

.strategy-auto-trade-block {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #30363d;
    background: rgba(22, 27, 34, 0.85);
}

.strategy-auto-trade-block.is-on {
    border-color: rgba(46, 160, 67, 0.55);
    background: rgba(46, 160, 67, 0.08);
}

.strategy-auto-trade-block__label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin: 0;
}

.strategy-auto-trade-block__label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex-shrink: 0;
    accent-color: #2ea043;
    cursor: pointer;
}

.strategy-auto-trade-block__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.strategy-auto-trade-block__title {
    font-size: 0.95rem;
    color: #e6edf3;
}

.strategy-auto-trade-block.is-on .strategy-auto-trade-block__title {
    color: #aff5b4;
}

.strategy-auto-trade-block__desc {
    font-size: 0.78rem;
    color: #8b949e;
    line-height: 1.35;
}

.strategy-auto-trade-block__hint {
    margin: 8px 0 0 28px;
    font-size: 0.72rem;
}

/* ── auto_trade 활성화 확인 (Phase 6 안전장치 #4) ─────────────── */
.auto-trade-confirm {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 12px;
    background: rgba(13, 17, 23, 0.5);
    border: 1px solid #30363d;
    border-radius: 8px;
}
.auto-trade-confirm__status {
    flex: 1;
    min-width: 220px;
    font-size: 0.78rem;
    font-weight: 500;
}
.auto-trade-confirm__status--unset {
    color: #f0883e;
}
.auto-trade-confirm__status--set {
    color: #3fb950;
    font-weight: 600;
}
.btn-confirm-auto-trade {
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(240, 136, 62, 0.2), rgba(240, 136, 62, 0.1));
    color: #f0883e;
    border: 1px solid rgba(240, 136, 62, 0.5);
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.btn-confirm-auto-trade:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(240, 136, 62, 0.3), rgba(240, 136, 62, 0.18));
    border-color: rgba(240, 136, 62, 0.7);
    transform: translateY(-1px);
}
.btn-confirm-auto-trade:disabled {
    opacity: 0.5;
    cursor: wait;
}

.strategy-settings-exchange-block {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #30363d;
}

.strategy-settings-exchange-hint {
    margin: 8px 0 0;
    font-size: 0.72rem;
    color: #6e7681;
    line-height: 1.35;
}

.strategy-settings-field--auto-trade {
    margin-top: 10px;
    padding-top: 0;
}

.strategy-settings-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.strategy-settings-field--full {
    grid-column: 1 / -1;
}

.strategy-settings-field--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding-top: 22px;
}

.strategy-settings-field--checkbox .strategy-settings-label {
    margin: 0;
}

.strategy-settings-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #8b949e;
}

.strategy-settings-input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 7px 10px;
    font-size: 0.88rem;
    line-height: 1.25;
    color: #e6edf3;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    box-sizing: border-box;
}

select.strategy-settings-input {
    height: 34px;
    appearance: auto;
}

textarea.strategy-settings-input {
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
}

.strategy-settings-input--textarea {
    min-height: 260px;
    line-height: 1.6;
    white-space: pre-wrap;
    font-family: inherit;
    resize: vertical;
}

.strategy-settings-input:focus {
    outline: none;
    border-color: #388bfd;
    box-shadow: 0 0 0 2px rgba(56, 139, 253, 0.2);
}

.strategy-settings-field .hint {
    font-size: 0.72rem;
    color: #6e7681;
    line-height: 1.35;
}

.scan-settings-line {
    margin: 0 0 12px;
    padding: 8px 10px;
    font-size: 0.78rem;
    color: #8b949e;
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 6px;
    font-family: ui-monospace, monospace;
}

.strategy-detail-section--wide {
    max-width: 960px;
}

.strategy-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.strategy-detail-row h3 {
    margin: 0;
}

.strategy-spec-list {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #8b949e;
    font-size: 0.9rem;
    line-height: 1.75;
}

.strategy-spec-list li {
    padding: 6px 0;
    border-bottom: 1px solid #21262d;
}

.strategy-spec-list li:last-child {
    border-bottom: none;
}

.strategy-spec-list strong {
    color: #e6edf3;
    margin-right: 8px;
}

.strategy-cond-list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.strategy-cond-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #21262d;
}

.strategy-cond-list__item:last-child {
    border-bottom: none;
}

.strategy-cond-list__item--note {
    opacity: 0.85;
}

.strategy-cond-list__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.strategy-cond-list__text strong {
    font-size: 0.9rem;
    color: #e6edf3;
}

.strategy-cond-list__text span {
    font-size: 0.82rem;
    color: #8b949e;
}

.strategy-cond-list--params .strategy-cond-list__item {
    flex-wrap: wrap;
    align-items: center;
}

.strategy-cond-list__formula {
    font-size: 0.82rem;
    color: #8b949e;
}

.strategy-cond-list__param {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin: 0;
}

.strategy-cond-list__param-label {
    font-size: 0.78rem;
    color: #8b949e;
    white-space: nowrap;
}

.strategy-cond-list__param .strategy-settings-input--compact {
    width: 4.25rem;
    min-width: 3.5rem;
}

.cond-box-section-hint {
    margin: 0 0 14px;
}

.strategy-detail-section h3 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #c9d1d9;
}

.strategy-detail-list {
    margin: 0;
    padding-left: 1.25rem;
    color: #8b949e;
    line-height: 1.7;
    font-size: 0.9rem;
}

.strategy-detail-list strong {
    color: #e6edf3;
}

.strategy-param-table {
    max-width: 480px;
}

.strategy-detail-api .hint {
    margin: 0 0 12px;
    font-size: 0.85rem;
    color: #8b949e;
}

.strategy-detail-api code {
    font-family: ui-monospace, monospace;
    font-size: 0.82rem;
    color: #79c0ff;
}

.strategy-api-link {
    margin: 0 0 8px;
}

.page-toolbar .strategy-card__version {
    align-self: center;
}

.strategy-scan-toolbar {
    max-width: 960px;
    margin-bottom: 8px;
}

.strategy-scan-toolbar h3 {
    margin: 0;
    font-size: 0.95rem;
}

.v1-scan-root {
    max-width: 960px;
    margin-top: 16px;
}

.scan-empty {
    margin: 0;
    color: #8b949e;
    font-size: 0.9rem;
}

.scan-meta {
    margin: 0 0 12px;
    font-size: 0.85rem;
    color: #8b949e;
}

.scan-market-banner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    background: #161b22;
    border: 1px solid #2a3441;
    border-radius: 10px;
}

.scan-market-banner .label {
    display: block;
    font-size: 0.72rem;
    color: #6e7681;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.scan-table-wrap {
    overflow-x: auto;
    border: 1px solid #2a3441;
    border-radius: 10px;
}

.scan-result-table {
    margin: 0;
}

.scan-result-table .scan-msg {
    font-size: 0.82rem;
    color: #8b949e;
    max-width: 280px;
}

.scan-row--entry {
    background: rgba(63, 185, 80, 0.06);
}

.scan-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.scan-badge--entry {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
}

.scan-badge--none {
    background: #21262d;
    color: #8b949e;
}

.scan-badge--pass {
    background: rgba(63, 185, 80, 0.12);
    color: #3fb950;
}

.scan-badge--fail {
    background: rgba(248, 81, 73, 0.12);
    color: #f85149;
}

.scan-conditions-hint {
    margin-top: 12px;
}

.cond-cell {
    display: inline-block;
    width: 1.4em;
    text-align: center;
    font-weight: 700;
}

.cond-cell--pass {
    color: #3fb950;
}

.cond-cell--fail {
    color: #f85149;
}

.cond-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.cond-val {
    font-size: 0.72rem;
    line-height: 1.35;
    color: #8b949e;
    font-family: ui-monospace, monospace;
    word-break: break-word;
}

.cond-td {
    vertical-align: top;
    min-width: 140px;
}

.scan-result-table th {
    white-space: nowrap;
}

.cond-box-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.cond-box-grid--scan {
    margin: 12px 0 0;
}

.cond-box {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    min-height: 120px;
    background: #161b22;
    border: 1px solid #2a3441;
    border-radius: 10px;
}

.cond-box--static {
    border-color: #30363d;
}

.cond-box--pass {
    border-color: rgba(63, 185, 80, 0.45);
    background: rgba(63, 185, 80, 0.04);
}

.cond-box--fail {
    border-color: rgba(248, 81, 73, 0.35);
    background: rgba(248, 81, 73, 0.04);
}

.cond-box--note {
    border-style: dashed;
    background: #0d1117;
}

.strategy-board-hint {
    margin: 0 0 12px;
}

.strategy-board {
    border: 1px solid #2a3441;
    border-radius: 10px;
    overflow: hidden;
    background: #0d1117;
}

.strategy-board__post + .strategy-board__post {
    border-top: 1px solid #21262d;
}

.strategy-board__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #161b22;
    border-bottom: 1px solid #21262d;
}

.strategy-board__no {
    flex-shrink: 0;
    min-width: 1.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #6e7681;
    text-align: center;
}

.strategy-board__title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e6edf3;
}

.strategy-board__body {
    padding: 14px 16px 16px;
}

.strategy-board__text {
    margin: 0 0 10px;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #c9d1d9;
}

.strategy-board__formula {
    margin: 0;
    padding: 10px 12px;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #79c0ff;
    background: #161b22;
    border-left: 3px solid #30363d;
    border-radius: 0 6px 6px 0;
    word-break: break-word;
}

.cond-box__tag {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6e7681;
}

.cond-box__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding-right: 48px;
}

.cond-box__title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: #e6edf3;
    line-height: 1.3;
}

.cond-box__status {
    flex-shrink: 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
}

.cond-box--pass .cond-box__status {
    color: #3fb950;
}

.cond-box--fail .cond-box__status {
    color: #f85149;
}

.cond-box__desc,
.cond-box__detail {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #8b949e;
    flex: 1;
}

.cond-box__detail {
    font-family: ui-monospace, monospace;
    font-size: 0.72rem;
    word-break: break-word;
}

.cond-box__foot {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

.scan-results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.scan-symbol-card {
    padding: 16px;
    background: #0d1117;
    border: 1px solid #2a3441;
    border-radius: 12px;
}

.scan-symbol-card--entry {
    border-color: rgba(63, 185, 80, 0.5);
    box-shadow: inset 0 0 0 1px rgba(63, 185, 80, 0.08);
}

.scan-symbol-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.scan-symbol-card__symbol {
    font-size: 1rem;
    font-weight: 600;
    color: #e6edf3;
}

.scan-symbol-card__foot {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #21262d;
}

.scan-symbol-card__meta {
    font-size: 0.85rem;
    color: #8b949e;
    margin-bottom: 6px;
}

.scan-symbol-card__meta .label {
    margin-right: 6px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6e7681;
}

.scan-symbol-card__meta strong {
    color: #e6edf3;
}

.scan-symbol-card__msg {
    margin: 0;
    font-size: 0.82rem;
    color: #8b949e;
    line-height: 1.45;
}

.scan-market-line {
    margin: 0 0 12px;
    font-size: 0.88rem;
    color: #8b949e;
}

.scan-market-line strong {
    color: #e6edf3;
}

.scan-results-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.scan-result-block {
    padding: 12px 0;
    border-bottom: 1px solid #21262d;
}

.scan-result-block:last-child {
    border-bottom: none;
}

.scan-result-block--entry {
    background: rgba(63, 185, 80, 0.04);
    margin: 0 -8px;
    padding: 12px 8px;
    border-radius: 6px;
    border-bottom: none;
}

.scan-result-block__title {
    margin: 0 0 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e6edf3;
}

.scan-result-block__foot {
    margin: 8px 0 0;
    font-size: 0.8rem;
    color: #6e7681;
    line-height: 1.4;
}

.scan-group-ids {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #30363d;
    background: rgba(13, 17, 23, 0.6);
}

.scan-group-ids__title {
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.scan-group-ids__list {
    margin: 0;
    padding: 0;
}

.scan-group-ids__row {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 8px 12px;
    padding: 6px 0;
    border-top: 1px solid #21262d;
    font-size: 0.8rem;
}

.scan-group-ids__row:first-child {
    border-top: none;
    padding-top: 0;
}

.scan-group-ids__row--group dd code {
    color: #d2a8ff;
    font-weight: 600;
}

.scan-group-ids__row dt {
    margin: 0;
    color: #8b949e;
    font-weight: 600;
}

.scan-group-ids__row dd {
    margin: 0;
    color: #c9d1d9;
    word-break: break-all;
}

.scan-group-ids__client {
    color: #8b949e;
}

.scan-group-ids__order {
    color: #aff5b4;
}

.scan-group-ids__empty {
    color: #6e7681;
}

.scan-group-id-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 500;
    vertical-align: middle;
    background: rgba(240, 136, 62, 0.12);
    border: 1px solid rgba(240, 136, 62, 0.35);
    border-radius: 6px;
}

.scan-group-id-label {
    color: #8b949e;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.scan-group-id {
    color: #f0883e;
    font-size: 0.75rem;
    font-weight: 600;
}

.scan-meta .scan-group-id {
    font-size: 0.78rem;
}

.scan-cond-group-title {
    margin: 10px 0 4px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6e7681;
}

.scan-cond-group-title:first-child {
    margin-top: 0;
}

.scan-result-block__allowed {
    margin: 8px 0 0;
    font-size: 0.8rem;
    color: #8b949e;
}

.scan-result-block__test-note {
    margin: 0 0 10px;
    padding: 8px 10px;
    font-size: 0.8rem;
    color: #e6edf3;
    background: rgba(210, 153, 34, 0.12);
    border: 1px solid rgba(210, 153, 34, 0.35);
    border-radius: 6px;
}

.scan-test-badge {
    display: inline-block;
    margin-right: 4px;
    padding: 1px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #0d1117;
    background: #d29922;
    border-radius: 4px;
    vertical-align: middle;
}

.scan-entry-trade {
    display: inline-block;
    margin-left: 4px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 4px;
    vertical-align: middle;
}

.scan-entry-trade--success {
    color: #aff5b4;
    background: rgba(46, 160, 67, 0.25);
    border: 1px solid rgba(46, 160, 67, 0.45);
}

.scan-entry-trade--failed {
    color: #ffb4b4;
    background: rgba(248, 81, 73, 0.2);
    border: 1px solid rgba(248, 81, 73, 0.45);
}

.scan-entry-trade--skipped {
    color: #e6c87a;
    background: rgba(210, 153, 34, 0.15);
    border: 1px solid rgba(210, 153, 34, 0.4);
}

.scan-entry-trade--disabled {
    color: #8b949e;
    background: rgba(139, 148, 158, 0.12);
    border: 1px solid rgba(139, 148, 158, 0.35);
}

.scan-entry-trade-panel {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(139, 148, 158, 0.35);
    background: rgba(22, 27, 34, 0.6);
}

.scan-entry-trade-panel--success {
    border-color: rgba(46, 160, 67, 0.5);
    background: rgba(46, 160, 67, 0.1);
}

.scan-entry-trade-panel--failed {
    border-color: rgba(248, 81, 73, 0.5);
    background: rgba(248, 81, 73, 0.1);
}

.scan-entry-trade-panel--skipped {
    border-color: rgba(210, 153, 34, 0.45);
    background: rgba(210, 153, 34, 0.08);
}

.scan-entry-trade-panel--disabled {
    border-color: rgba(139, 148, 158, 0.35);
    background: rgba(139, 148, 158, 0.08);
}

.scan-entry-trade-panel__mark {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 50%;
}

.scan-entry-trade-panel--success .scan-entry-trade-panel__mark {
    color: #aff5b4;
    background: rgba(46, 160, 67, 0.35);
}

.scan-entry-trade-panel--failed .scan-entry-trade-panel__mark {
    color: #ffb4b4;
    background: rgba(248, 81, 73, 0.35);
}

.scan-entry-trade-panel__body {
    flex: 1;
    min-width: 0;
}

.scan-entry-trade-panel__title {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 2px;
}

.scan-entry-trade-panel__detail {
    margin: 0;
    font-size: 0.78rem;
    color: #8b949e;
    line-height: 1.4;
}

.scan-entry-trade-panel__log {
    margin: 8px 0 0;
    padding: 8px 10px 8px 22px;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #c9d1d9;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    list-style: disc;
}

.scan-entry-trade-panel__log li {
    margin: 2px 0;
}

.scan-entry-stats-card--success .scan-entry-stats-card__value {
    color: #aff5b4;
}

.scan-entry-stats-card--failed .scan-entry-stats-card__value {
    color: #ffb4b4;
}

.scan-log-trade {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 4px;
}

.scan-log-trade--success {
    color: #aff5b4;
    background: rgba(46, 160, 67, 0.2);
}

.scan-log-trade--failed {
    color: #ffb4b4;
    background: rgba(248, 81, 73, 0.2);
}

.scan-log-trade--disabled {
    color: #8b949e;
    background: rgba(139, 148, 158, 0.15);
}

.scan-result-cond-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.scan-result-cond {
    display: grid;
    grid-template-columns: 1.2em 5em 1fr;
    gap: 8px;
    align-items: baseline;
    padding: 4px 0;
    font-size: 0.82rem;
}

.scan-result-cond__mark {
    font-weight: 700;
}

.scan-result-cond.is-pass .scan-result-cond__mark {
    color: #3fb950;
}

.scan-result-cond.is-fail .scan-result-cond__mark {
    color: #f85149;
}

.scan-result-cond.is-hold .scan-result-cond__mark {
    color: #79c0ff;
}

.scan-tp-sl-panel {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    border: 1px solid #30363d;
}

.scan-tp-sl-panel--ok {
    border-color: rgba(46, 160, 67, 0.5);
    background: rgba(46, 160, 67, 0.1);
    color: #aff5b4;
}

.scan-tp-sl-panel--partial {
    border-color: rgba(210, 153, 34, 0.45);
    background: rgba(210, 153, 34, 0.08);
    color: #e6c87a;
}

.scan-tp-sl-panel--fail {
    border-color: rgba(248, 81, 73, 0.45);
    background: rgba(248, 81, 73, 0.1);
    color: #ffb4b4;
}

.scan-tp-sl-panel__detail {
    margin: 6px 0 0;
    font-size: 0.75rem;
    opacity: 0.9;
}

.scan-result-cond.is-na .scan-result-cond__mark {
    color: #6e7681;
}

.scan-result-cond.is-na .scan-result-cond__val {
    color: #6e7681;
}

.scan-result-cond__label {
    color: #8b949e;
}

.scan-result-cond__val {
    color: #c9d1d9;
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    word-break: break-word;
}

.btn-cond-run {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #c9d1d9;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-cond-run:hover {
    background: #30363d;
    color: #e6edf3;
    border-color: #484f58;
}

.btn-cond-run:disabled,
.btn-cond-run.is-loading {
    opacity: 0.55;
    cursor: wait;
}

.btn-cond-run--sm {
    padding: 2px 6px;
    font-size: 0.65rem;
    margin-left: 6px;
    vertical-align: middle;
}

.th-cond-run {
    white-space: nowrap;
}

.th-cond-run__label {
    vertical-align: middle;
}

body.json-modal-open {
    overflow: hidden;
}

.json-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.json-modal[hidden] {
    display: none !important;
}

.json-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.json-modal__panel {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: min(85vh, 720px);
    display: flex;
    flex-direction: column;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.json-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #30363d;
}

.json-modal__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.json-modal__close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 1.4rem;
    line-height: 1;
    color: #8b949e;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.json-modal__close:hover {
    color: #e6edf3;
    background: #21262d;
}

.json-modal__status {
    margin: 0;
    padding: 10px 16px 0;
    font-size: 0.82rem;
    color: #8b949e;
}

.json-modal__status.is-error {
    color: #f85149;
}

.json-modal__body {
    flex: 1;
    margin: 12px 16px 16px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: transparent;
    border: none;
}

.json-modal__json {
    flex: 1;
    margin: 0;
    padding: 14px;
    overflow: auto;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #c9d1d9;
    background: #0d1117;
    border: 1px solid #21262d;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

.json-modal__json[hidden],
.json-modal__html[hidden] {
    display: none !important;
}

.json-modal__html {
    flex: 1;
    margin: 0 16px 16px;
    padding: 0 0 4px;
    overflow: auto;
}

.json-modal__html .scan-table-wrap {
    margin-top: 0;
}

.json-modal__panel--wide {
    width: min(1100px, 100%);
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .console-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #1e2630;
        padding: 12px 0;
    }

    .console-brand {
        margin-bottom: 8px;
    }

    .nav-links {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 4px;
    }

    .console-main {
        padding: 16px;
    }

    .signal-table th:nth-child(3),
    .signal-table td:nth-child(3) {
        display: none;
    }
}

/* v2 진입내역 탭 */
#v2-tab-entry-history .strategy-detail-section {
    max-width: 100%;
}

.v2-entry-history-toolbar-box {
    max-width: 960px;
}

.v2-entry-history-toolbar-box .v2-entry-history-toolbar {
    margin-bottom: 0;
}

.v2-entry-history-toolbar-box .md-status {
    display: block;
    margin-top: 10px;
}

.v2-entry-history-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.v2-entry-history-toolbar__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.v2-entry-history-box {
    max-width: 960px;
}

.v2-entry-history-box--wide {
    max-width: 100%;
}

.v2-entry-history-box > h3 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #e6edf3;
}

.v2-entry-history-box > .hint {
    margin: 0 0 12px;
}

.v2-entry-history-box__body {
    margin-top: 4px;
}

.v2-entry-history-box + .v2-entry-history-box {
    margin-top: 0;
}

/* 진입내역 탭 — 표 항목 좌측 정렬 */
#v2-tab-entry-history .scan-log-table th,
#v2-tab-entry-history .scan-log-table td,
#v2-tab-entry-history .scan-log-table td.num,
#v2-tab-entry-history .scan-log-table__action,
#v2-tab-entry-history .v2-entry-close-cell,
#v2-tab-entry-history .v2-entry-pnl-cell {
    text-align: left;
}

.v2-entry-history-table td.symbol {
    font-weight: 600;
}

#v2-entry-history-symbol-wrap .scan-log-table th:not(:first-child),
#v2-entry-history-symbol-wrap .scan-log-table td.num {
    text-align: left;
}

#v2-scan-stats-symbol-wrap .scan-log-table th:nth-child(2),
#v2-scan-stats-symbol-wrap .scan-log-table td.num {
    text-align: left;
}

.v2-entry-history-table .mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    word-break: break-all;
}

.v2-entry-order-ids {
    font-size: 0.75rem;
    line-height: 1.45;
}

.v2-entry-note {
    max-width: 160px;
    font-size: 0.78rem;
}

.v2-entry-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.v2-entry-badge--long {
    background: #1a472a;
    color: #3fb950;
    border: 1px solid #238636;
}

.v2-entry-badge--short {
    background: #3d1f1f;
    color: #f85149;
    border: 1px solid #da3633;
}

.v2-entry-badge--entry {
    background: #1f6feb;
    color: #fff;
}

.v2-entry-badge--tp {
    background: #238636;
    color: #fff;
}

.v2-entry-badge--sl {
    background: #da3633;
    color: #fff;
}

.v2-entry-badge--cancel {
    background: rgba(139, 148, 158, 0.25);
    color: #8b949e;
}

.v2-entry-badge--muted {
    background: rgba(139, 148, 158, 0.2);
    color: #c9d1d9;
}

.scan-log-table--stats .scan-stats-side-cell {
    white-space: nowrap;
}

.scan-log-table--stats .scan-stats-side-cell .v2-entry-badge + .v2-entry-badge {
    margin-left: 6px;
}

/* 포지션 종료 TP/SL 버튼형 배지 */
.v2-entry-close-cell {
    text-align: center;
    white-space: nowrap;
}

.v2-close-btn {
    display: inline-block;
    min-width: 48px;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.02em;
    text-align: center;
    border: 1px solid transparent;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.v2-close-btn--tp {
    background: #238636;
    color: #fff;
    border-color: #2ea043;
}

.v2-close-btn--sl {
    background: #da3633;
    color: #fff;
    border-color: #f85149;
}

.v2-close-btn--closed {
    background: #21262d;
    color: #c9d1d9;
    border-color: #484f58;
    box-shadow: none;
}

.v2-close-btn--cancel {
    background: rgba(139, 148, 158, 0.2);
    color: #8b949e;
    border-color: #484f58;
    box-shadow: none;
}

.v2-close-btn--muted {
    background: rgba(139, 148, 158, 0.15);
    color: #8b949e;
    border-color: #30363d;
    box-shadow: none;
}

.v2-entry-stats-tp {
    color: #3fb950 !important;
}

.v2-entry-stats-sl {
    color: #f85149 !important;
}

.v2-pnl-pos {
    color: #3fb950;
    font-weight: 600;
}

.v2-pnl-neg {
    color: #f85149;
    font-weight: 600;
}

.v2-pnl-fee {
    color: #f85149;
    font-weight: 600;
}

.v2-entry-detail-table tr.v2-entry-detail-row--total th,
.v2-entry-detail-table tr.v2-entry-detail-row--total td {
    font-weight: 700;
    border-top: 1px solid #30363d;
    padding-top: 10px;
}

.scan-entry-stats-subtitle {
    margin: 14px 0 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #8b949e;
}

.scan-entry-stats-cards--pnl {
    margin-top: 0;
}

.scan-entry-stats-card--net .scan-entry-stats-card__label {
    font-weight: 700;
}

.v2-entry-detail__note--formula {
    margin-top: 6px;
    font-size: 0.75rem;
}

.v2-entry-detail__note {
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: #8b949e;
}

.v2-entry-detail {
    font-size: 0.88rem;
}

.v2-entry-detail__subtitle {
    margin: 16px 0 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #c9d1d9;
}

.v2-entry-detail__error {
    margin: 12px 0 0;
    padding: 10px 12px;
    background: rgba(248, 81, 73, 0.12);
    border: 1px solid rgba(248, 81, 73, 0.35);
    border-radius: 6px;
    color: #ffb4b4;
    font-size: 0.85rem;
}

.v2-entry-detail-table th {
    width: 120px;
    color: #8b949e;
    font-weight: 600;
    white-space: nowrap;
}

.v2-entry-detail-table td {
    word-break: break-word;
}

/* 거래소 동기화 */
.ex-sync-panel {
    margin-bottom: 1.25rem;
}

.ex-sync-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-end;
    margin-bottom: 8px;
}

.ex-sync-toolbar__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
}

.ex-sync-count {
    font-size: 0.85rem;
    font-weight: 400;
    color: #8b949e;
}

.ex-sync-table-wrap {
    overflow-x: auto;
}

.ex-sync-table .mono {
    font-size: 0.78rem;
}

.ex-sync-time {
    white-space: nowrap;
    font-size: 0.78rem;
    color: #8b949e;
}

.ex-sync-row--warn {
    background: rgba(210, 153, 34, 0.08);
}

.ex-sync-row--closed {
    background: rgba(63, 185, 80, 0.06);
}

.ex-sync-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #21262d;
    color: #c9d1d9;
}

.ex-sync-badge--open {
    background: rgba(56, 139, 253, 0.15);
    color: #58a6ff;
}

.ex-sync-badge--warn {
    background: rgba(210, 153, 34, 0.2);
    color: #d29922;
}

.ex-sync-badge--closed {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
}

.ex-sync-yes {
    color: #3fb950;
}

.ex-sync-no {
    color: #484f58;
}

.ex-sync-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 16px;
    margin: 0 0 12px;
    font-size: 0.88rem;
}

.ex-sync-summary dt {
    color: #8b949e;
    font-weight: 600;
}

.ex-sync-summary dd {
    margin: 0;
}

.ex-sync-errors {
    color: #f85149;
}

.ex-sync-last-run {
    overflow-x: auto;
}

.ex-sync-table--compact th,
.ex-sync-table--compact td {
    padding: 6px 10px;
    font-size: 0.82rem;
}

/* ── 스케줄 탭 (EventBridge) ── */
.console-schedule-block {
    margin-bottom: 8px;
}

.console-schedule-block > .lead {
    margin-bottom: 12px;
}

.schedule-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.schedule-power-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.schedule-power-hint {
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.schedule-power-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.schedule-power-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.schedule-power-toggle__track {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #30363d;
    transition: background 0.2s;
}

.schedule-power-toggle__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #c9d1d9;
    transition: transform 0.2s;
}

.schedule-power-toggle input:checked + .schedule-power-toggle__track {
    background: #238636;
}

.schedule-power-toggle input:checked + .schedule-power-toggle__track::after {
    transform: translateX(20px);
}

.schedule-power-toggle__state {
    font-size: 0.85rem;
    font-weight: 700;
    color: #8b949e;
    min-width: 2rem;
}

.schedule-power-toggle input:checked ~ .schedule-power-toggle__state {
    color: #3fb950;
}

.schedule-preset-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 대시보드 매니저 cron ON/OFF 토글 — 명확한 색상 구분 */
.cron-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    vertical-align: middle;
    cursor: pointer;
}
.cron-toggle__input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
/* OFF 상태 — 진한 빨강 (꺼져있다는 게 한눈에) */
.cron-toggle__slider {
    position: absolute;
    inset: 0;
    background: #6e2222;
    border: 2px solid #b91c1c;
    border-radius: 22px;
    transition: all 0.2s;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.3);
}
.cron-toggle__slider::after {
    content: "OFF";
    position: absolute;
    width: 14px;
    height: 14px;
    left: 2px;
    top: 2px;
    background: #fca5a5;
    border-radius: 50%;
    transition: transform 0.2s;
    font-size: 0;
}
/* ON 상태 — 선명한 초록 + 글로우 */
.cron-toggle__input:checked + .cron-toggle__slider {
    background: #16a34a;
    border-color: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5), inset 0 0 4px rgba(0,0,0,0.2);
}
.cron-toggle__input:checked + .cron-toggle__slider::after {
    transform: translateX(18px);
    background: #ffffff;
    box-shadow: 0 0 4px rgba(255,255,255,0.6);
}
.cron-toggle__input:disabled + .cron-toggle__slider {
    opacity: 0.5;
    cursor: not-allowed;
}
.cron-toggle--busy .cron-toggle__slider {
    opacity: 0.6;
}

.schedule-preset-btn {
    padding: 6px 12px;
    font-size: 0.82rem;
    font-family: inherit;
    color: #c9d1d9;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    cursor: pointer;
}

.schedule-preset-btn:hover {
    border-color: #388bfd;
    color: #e6edf3;
}

.schedule-preset-btn.is-active {
    border-color: #388bfd;
    background: rgba(56, 139, 253, 0.15);
    color: #58a6ff;
}


/* ──────────────────────────────────────────────────────────────
   관제 (Live Status) 페이지
   ────────────────────────────────────────────────────────────── */
.bot-status-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 20px; flex-wrap: wrap;
    margin-bottom: 18px;
}
.bot-status-summary {
    display: flex; gap: 10px;
    flex-wrap: wrap;
}
.bot-status-summary__item {
    min-width: 84px;
    padding: 10px 14px;
    background: rgba(22, 27, 34, 0.65);
    border: 1px solid #30363d;
    border-radius: 10px;
    text-align: center;
}
.bot-status-summary__num {
    font-size: 1.6rem; font-weight: 700;
    font-family: ui-monospace, monospace;
    color: #f0f6fc;
    line-height: 1;
}
.bot-status-summary__label {
    margin-top: 4px;
    color: #8b949e;
    font-size: 0.72rem;
}
.bot-status-summary__item--green { border-color: rgba(63,185,80,0.4); background: rgba(63,185,80,0.08); }
.bot-status-summary__item--green .bot-status-summary__num { color: #3fb950; }
.bot-status-summary__item--yellow { border-color: rgba(240,136,62,0.4); background: rgba(240,136,62,0.08); }
.bot-status-summary__item--yellow .bot-status-summary__num { color: #f0883e; }
.bot-status-summary__item--red { border-color: rgba(248,81,73,0.4); background: rgba(248,81,73,0.08); }
.bot-status-summary__item--red .bot-status-summary__num { color: #f85149; }
.bot-status-summary__item--gray .bot-status-summary__num { color: #c9d1d9; }

.bot-status-controls {
    display: flex; align-items: center; gap: 14px;
    margin: 14px 0 20px;
    flex-wrap: wrap;
}
.bot-status-auto-refresh {
    display: inline-flex; align-items: center; gap: 6px;
    color: #c9d1d9; font-size: 0.85rem; cursor: pointer;
}
.bot-status-updated {
    margin-left: auto;
    color: #8b949e;
    font-size: 0.78rem;
    font-family: ui-monospace, monospace;
}

.bot-status-group-title {
    margin: 24px 0 10px;
    color: #c9d1d9;
    font-size: 0.95rem; font-weight: 600;
}
.bot-status-group-count {
    color: #8b949e; font-weight: 500; font-size: 0.85rem;
}

.bot-status-list {
    display: flex; flex-direction: column;
}
/* 1.2 — 봇 라이브 카드 = 컴팩트 한 줄 + 클릭 expand (collapsible) */
.bot-status-grid {
    display: flex; flex-direction: column;
    gap: 4px;
}

.bot-status-card {
    --c: 139,148,158;
    background: rgba(13, 17, 23, 0.55);
    border: 1px solid rgba(var(--c), 0.3);
    border-radius: 8px;
    border-left: 3px solid rgba(var(--c), 0.7);
    transition: border-color 0.15s ease;
    overflow: hidden;
}
.bot-status-card:hover { border-color: rgba(var(--c), 0.55); }
.bot-status-card[open] { background: rgba(13, 17, 23, 0.75); }
.bot-status-card--status-green { --c: 63,185,80; }
.bot-status-card--status-yellow { --c: 240,136,62; }
.bot-status-card--status-red { --c: 248,81,73; }
.bot-status-card--status-gray { --c: 139,148,158; }

.bot-status-card__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.bot-status-card__title {
    display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
}
.bot-status-card__icon { font-size: 1rem; }
.bot-status-card__name {
    color: #f0f6fc;
    font-size: 0.95rem; font-weight: 600;
    letter-spacing: -0.01em;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bot-status-card__meta {
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0;
}
.bot-status-card__status {
    padding: 2px 8px;
    background: rgba(var(--c), 0.15);
    color: rgb(var(--c));
    border: 1px solid rgba(var(--c), 0.4);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.bot-status-card__link {
    color: #58a6ff;
    font-size: 0.78rem;
    text-decoration: none;
}
.bot-status-card__link:hover { text-decoration: underline; }

.bot-status-card__msg {
    margin-bottom: 10px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.03);
    border-left: 2px solid rgba(var(--c), 0.6);
    color: rgb(var(--c));
    font-size: 0.8rem;
    border-radius: 4px;
}
.bot-status-card__gates {
    display: flex; flex-direction: column;
    gap: 3px;
    margin-bottom: 8px;
}
.gate-row {
    display: grid;
    grid-template-columns: 18px 110px 1fr;
    align-items: baseline;
    gap: 8px;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.76rem;
}
.gate-row--pass { background: rgba(63,185,80,0.05); }
.gate-row--fail { background: rgba(248,81,73,0.07); }
.gate-row__mark {
    font-weight: 700;
    font-family: ui-monospace, monospace;
}
.gate-row--pass .gate-row__mark { color: #3fb950; }
.gate-row--fail .gate-row__mark { color: #f85149; }
.gate-row__label {
    color: #c9d1d9;
    font-size: 0.74rem;
    font-weight: 500;
}
.gate-row__value {
    color: #8b949e;
    font-size: 0.74rem;
    font-family: ui-monospace, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gate-row--fail .gate-row__value {
    color: #f0883e;
    font-weight: 500;
}
.bot-status-card__foot {
    padding-top: 8px;
    border-top: 1px solid rgba(48,54,61,0.5);
    color: #6e7681;
    font-size: 0.72rem;
}

/* 전략 목록 필터 바 + 상태 그룹 */
.strategy-filter-bar {
    display: flex; align-items: center; gap: 14px;
    margin: 18px 0 14px;
    flex-wrap: wrap;
}
.strategy-filter-bar__group {
    display: flex; align-items: center; gap: 6px;
    flex-wrap: wrap;
}
.strategy-filter-bar__group--cats { flex: 1 1 auto; }
.strategy-filter-chip {
    padding: 5px 12px;
    background: rgba(22,27,34,0.6);
    color: #8b949e;
    border: 1px solid #30363d;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: ui-monospace, monospace;
    transition: all 0.15s ease;
}
.strategy-filter-chip:hover { color: #c9d1d9; border-color: #58a6ff; }
.strategy-filter-chip.is-active {
    background: rgba(88,166,255,0.15);
    color: #58a6ff;
    border-color: rgba(88,166,255,0.5);
}
.strategy-filter-search {
    min-width: 220px;
    padding: 5px 12px;
    background: rgba(13,17,23,0.6);
    color: #c9d1d9;
    border: 1px solid #30363d;
    border-radius: 6px;
    font-size: 0.85rem;
}
.strategy-filter-search:focus {
    outline: none;
    border-color: rgba(88,166,255,0.5);
    background: rgba(13,17,23,0.85);
}

.strategy-group-title {
    margin: 22px 0 10px;
    color: #c9d1d9;
    font-size: 0.95rem; font-weight: 600;
    grid-column: 1 / -1;     /* outer가 grid 흐름이어도 full-width 강제 */
}
.strategy-group-count {
    color: #8b949e; font-weight: 500; font-size: 0.85rem;
}
/* 그룹화 모드 — outer는 block 흐름, 카드는 inner grid에만 */
.strategy-grid:has(.strategy-grid__inner),
.strategy-grid.strategy-grid--grouped {
    display: block;
    max-width: none;
}
.strategy-grid__inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    max-width: 960px;
    margin-bottom: 8px;
}

/* 관제 — BLUE (진입중) 상태 + 포지션 row + 24h history */
.bot-status-summary__item--blue { border-color: rgba(88,166,255,0.4); background: rgba(88,166,255,0.08); }
.bot-status-summary__item--blue .bot-status-summary__num { color: #58a6ff; }
.bot-status-card--status-blue { --c: 88,166,255; }

.bot-status-card__positions {
    margin: 8px 0 10px;
    padding: 8px 10px;
    background: rgba(88,166,255,0.06);
    border: 1px solid rgba(88,166,255,0.25);
    border-radius: 6px;
}
.bot-status-card__positions-title {
    color: #58a6ff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.pos-row {
    display: grid;
    grid-template-columns: 55px 90px 1fr auto auto;
    align-items: baseline;
    gap: 10px;
    padding: 3px 6px;
    font-size: 0.76rem;
}
.pos-row + .pos-row { border-top: 1px dashed rgba(48,54,61,0.6); margin-top: 2px; padding-top: 5px; }
.pos-row__side {
    font-weight: 700;
    font-family: ui-monospace, monospace;
    font-size: 0.72rem;
    padding: 1px 6px;
    border-radius: 3px;
    text-align: center;
}
.pos-row.pos-long .pos-row__side { background: rgba(63,185,80,0.18); color: #3fb950; border: 1px solid rgba(63,185,80,0.4); }
.pos-row.pos-short .pos-row__side { background: rgba(248,81,73,0.18); color: #f85149; border: 1px solid rgba(248,81,73,0.4); }
.pos-row__sym { color: #f0f6fc; font-weight: 600; font-family: ui-monospace, monospace; }
.pos-row__entry, .pos-row__qty, .pos-row__time {
    color: #8b949e;
    font-family: ui-monospace, monospace;
    font-size: 0.72rem;
}

.bot-status-card__history {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 10px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(48,54,61,0.5);
    border-radius: 6px;
    color: #8b949e;
    font-size: 0.74rem;
    flex-wrap: wrap;
}
.bot-status-card__history .hist-tp { color: #3fb950; }
.bot-status-card__history .hist-sl { color: #f85149; }
.bot-status-card__history .hist-open { color: #58a6ff; }
.bot-status-card__history .hist-pnl { margin-left: auto; font-weight: 700; font-family: ui-monospace, monospace; }
.bot-status-card__history .pnl-pos { color: #3fb950; }
.bot-status-card__history .pnl-neg { color: #f85149; }
.bot-status-card__history .pnl-zero { color: #8b949e; }

/* ──────────────────────────────────────────────────────────────
   포지션 현황 페이지
   ────────────────────────────────────────────────────────────── */
.positions-balance {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.positions-balance .balance-card {
    min-width: 0;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(31, 111, 235, 0.10), rgba(22, 27, 34, 0.85));
    border: 1px solid #30363d;
    border-radius: 12px;
    text-align: left;
}
.positions-balance .balance-card .positions-summary__num {
    font-size: 1.55rem;
    letter-spacing: 0.01em;
}
.positions-balance .balance-card .positions-summary__label {
    font-size: 0.78rem;
    margin-top: 6px;
    color: #adb6c1;
}
@media (max-width: 900px) {
    .positions-balance { grid-template-columns: repeat(2, 1fr); }
}
.positions-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 20px; flex-wrap: wrap;
    margin-bottom: 18px;
}
.positions-summary {
    display: flex; gap: 10px;
    flex-wrap: wrap;
}
.positions-summary__item {
    min-width: 100px;
    padding: 10px 14px;
    background: rgba(22, 27, 34, 0.65);
    border: 1px solid #30363d;
    border-radius: 10px;
    text-align: center;
}
.positions-summary__num {
    font-size: 1.4rem; font-weight: 700;
    font-family: ui-monospace, monospace;
    color: #f0f6fc;
    line-height: 1.1;
}
.positions-summary__num.pnl-pos { color: #3fb950; }
.positions-summary__num.pnl-neg { color: #f85149; }
.positions-summary__num.pnl-zero { color: #8b949e; }
.positions-summary__label {
    margin-top: 4px;
    color: #8b949e;
    font-size: 0.72rem;
}

.positions-controls {
    display: flex; align-items: center; gap: 14px;
    margin: 14px 0 16px;
    flex-wrap: wrap;
}
.positions-auto-refresh {
    display: inline-flex; align-items: center; gap: 6px;
    color: #c9d1d9; font-size: 0.85rem; cursor: pointer;
}
.positions-updated {
    margin-left: auto;
    color: #8b949e;
    font-size: 0.78rem;
    font-family: ui-monospace, monospace;
}

.positions-strategy-row {
    display: flex; gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.strategy-pnl-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    background: rgba(13, 17, 23, 0.6);
    border: 1px solid #30363d;
    border-radius: 8px;
    font-size: 0.82rem;
}
.strategy-pnl-chip__name { color: #c9d1d9; font-weight: 600; }
.strategy-pnl-chip__count {
    padding: 1px 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    color: #8b949e; font-size: 0.74rem;
    font-family: ui-monospace, monospace;
}
.strategy-pnl-chip__pnl {
    font-family: ui-monospace, monospace;
    font-weight: 700;
}

.positions-table-wrap {
    background: rgba(13, 17, 23, 0.55);
    border: 1px solid rgba(48, 54, 61, 0.7);
    border-radius: 10px;
    overflow-x: auto;
}
.positions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.positions-table thead th {
    padding: 10px 12px;
    background: rgba(22, 27, 34, 0.85);
    color: #8b949e;
    text-align: left;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid #30363d;
}
.positions-table tbody td {
    padding: 10px 12px;
    color: #c9d1d9;
    border-bottom: 1px solid rgba(48, 54, 61, 0.4);
    vertical-align: top;
}
.positions-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}
.positions-table tbody tr.side-long {
    border-left: 3px solid rgba(63,185,80,0.5);
}
.positions-table tbody tr.side-short {
    border-left: 3px solid rgba(248,81,73,0.5);
}
.pos-side {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: ui-monospace, monospace;
    font-size: 0.72rem;
    font-weight: 700;
}
.pos-side.side-long {
    background: rgba(63,185,80,0.18);
    color: #3fb950;
    border: 1px solid rgba(63,185,80,0.4);
}
.pos-side.side-short {
    background: rgba(248,81,73,0.18);
    color: #f85149;
    border: 1px solid rgba(248,81,73,0.4);
}
.positions-table .pos-strategy-name {
    color: #f0f6fc;
    font-weight: 500;
    margin-left: 4px;
}
.positions-table .pos-symbol {
    color: #f0f6fc;
    font-weight: 600;
    font-size: 0.86rem;
}
.positions-table .pos-pnl-pct {
    font-size: 0.74rem;
    font-weight: 500;
    opacity: 0.85;
}
.positions-table .pos-notional {
    font-size: 0.72rem;
    color: #6e7681;
}
.positions-table .pos-tp { color: #3fb950; font-size: 0.74rem; }
.positions-table .pos-sl { color: #f85149; font-size: 0.74rem; }
.positions-table .pos-group-id {
    color: #6e7681;
    font-size: 0.72rem;
}
.positions-table .mono {
    font-family: ui-monospace, monospace;
}

/* 포지션 페이지 추가 — Binance 실시간 표시 */
.positions-interval-select {
    padding: 3px 8px;
    background: rgba(13,17,23,0.6);
    color: #c9d1d9;
    border: 1px solid #30363d;
    border-radius: 5px;
    font-size: 0.78rem;
    cursor: pointer;
}
.positions-source {
    padding: 4px 10px;
    background: rgba(63,185,80,0.1);
    color: #3fb950;
    border: 1px solid rgba(63,185,80,0.3);
    border-radius: 5px;
    font-size: 0.74rem;
    font-weight: 600;
}
.pos-leverage {
    font-size: 0.7rem;
    color: #d29922;
    font-family: ui-monospace, monospace;
}
.pos-liq {
    font-size: 0.7rem;
    color: #f85149;
    font-weight: 600;
}
.pos-source-external {
    display: inline-block;
    padding: 1px 6px;
    background: rgba(240,136,62,0.15);
    color: #f0883e;
    border: 1px solid rgba(240,136,62,0.4);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}
tr.pos-external td {
    background: rgba(240,136,62,0.04);
}

/* ───────────────────────── 거래 회고 (Lessons Learned) ───────────────────────── */
.lessons-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 16px;
}
.lessons-header h1 {
    margin: 0 0 4px 0;
    font-size: 1.4rem;
}
.lessons-header .lead {
    color: #8b949e;
    margin: 0;
    font-size: 0.85rem;
}
.lessons-summary {
    display: flex;
    gap: 12px;
}
.lessons-summary__item {
    background: #161b22;
    border: 1px solid rgba(240,246,252,0.1);
    padding: 10px 14px;
    border-radius: 6px;
    min-width: 80px;
    text-align: center;
}
.lessons-summary__num {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f0f6fc;
    font-family: ui-monospace, monospace;
}
.lessons-summary__label {
    font-size: 0.72rem;
    color: #8b949e;
    margin-top: 4px;
}
.lessons-summary__num.pnl-pos { color: #3fb950; }
.lessons-summary__num.pnl-neg { color: #f85149; }
.lessons-summary__num.pnl-zero { color: #8b949e; }

.lessons-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    background: #0d1117;
    border: 1px solid rgba(240,246,252,0.08);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 18px;
}
.lessons-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #8b949e;
}
.lessons-select {
    background: #161b22;
    border: 1px solid rgba(240,246,252,0.1);
    color: #f0f6fc;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
}
.lessons-updated {
    margin-left: auto;
    font-size: 0.75rem;
    color: #8b949e;
}

.lessons-section {
    margin-bottom: 22px;
}
.lessons-section__title {
    font-size: 1.05rem;
    margin: 0 0 4px 0;
    color: #f0f6fc;
}
.lessons-section__hint {
    color: #8b949e;
    font-size: 0.78rem;
    margin: 0 0 10px 0;
}

.lessons-insights {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.lesson-card {
    background: #161b22;
    border: 1px solid rgba(240,246,252,0.1);
    border-left-width: 4px;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lesson-card--high { border-left-color: #f85149; }
.lesson-card--medium { border-left-color: #d29922; }
.lesson-card--low { border-left-color: #3fb950; }
.lesson-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: #8b949e;
}
.lesson-card__icon { font-size: 1rem; }
.lesson-card__cat {
    padding: 1px 6px;
    background: rgba(56,139,253,0.15);
    color: #58a6ff;
    border-radius: 3px;
    font-weight: 600;
}
.lesson-card__title {
    font-size: 0.92rem;
    margin: 0;
    color: #f0f6fc;
    line-height: 1.35;
}
.lesson-card__evidence {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: #0d1117;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
}
.lesson-ev-row {
    display: flex;
    justify-content: space-between;
}
.lesson-ev-key { color: #8b949e; }
.lesson-ev-val { color: #f0f6fc; font-family: ui-monospace, monospace; }
.lesson-card__rec {
    font-size: 0.78rem;
    color: #c9d1d9;
    margin: 0;
    line-height: 1.4;
}
.lesson-card__action {
    font-size: 0.75rem;
    color: #58a6ff;
    text-decoration: none;
}
.lesson-card__action:hover { text-decoration: underline; }

.lessons-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}
.lessons-stats-card {
    background: #161b22;
    border: 1px solid rgba(240,246,252,0.1);
    border-radius: 6px;
    padding: 12px 14px;
}
.lessons-stats-card h3 {
    font-size: 0.88rem;
    margin: 0 0 8px 0;
    color: #f0f6fc;
}
.lesson-stat-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(240,246,252,0.05);
    font-size: 0.78rem;
    align-items: center;
}
.lesson-stat-row:last-child { border-bottom: none; }
.lesson-stat-label { color: #f0f6fc; }
.lesson-stat-meta { color: #8b949e; font-size: 0.72rem; }
.lesson-stat-pnl {
    font-family: ui-monospace, monospace;
    font-weight: 600;
    text-align: right;
}
.lesson-stat-strategy { font-weight: 600; }
.lesson-stat-hour { font-family: ui-monospace, monospace; color: #d29922; }

.lessons-table-wrap {
    overflow-x: auto;
}
.lessons-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.lessons-table thead tr {
    background: #161b22;
}
.lessons-table th, .lessons-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(240,246,252,0.06);
}
.lessons-table th {
    color: #8b949e;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.lessons-table tbody tr:hover { background: rgba(56,139,253,0.04); }
.lesson-strategy-name { color: #f0f6fc; font-weight: 600; }
.lesson-oc-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
}
.lesson-oc-win { background: rgba(63,185,80,0.15); color: #3fb950; border: 1px solid rgba(63,185,80,0.35); }
.lesson-oc-loss { background: rgba(248,81,73,0.15); color: #f85149; border: 1px solid rgba(248,81,73,0.35); }
.lesson-oc-open { background: rgba(210,153,34,0.15); color: #d29922; border: 1px solid rgba(210,153,34,0.35); }
.lesson-oc-be { background: rgba(139,148,158,0.15); color: #8b949e; }
.lesson-exit-chip {
    display: inline-block;
    padding: 1px 6px;
    background: rgba(56,139,253,0.1);
    color: #58a6ff;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}
.lesson-regime-chip {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}
.lesson-regime-chip--bull, .lesson-regime-chip--strong_bull { background: rgba(63,185,80,0.15); color: #3fb950; }
.lesson-regime-chip--bear, .lesson-regime-chip--strong_bear { background: rgba(248,81,73,0.15); color: #f85149; }
.lesson-regime-chip--neutral { background: rgba(210,153,34,0.15); color: #d29922; }
.lesson-regime-chip--unknown { background: rgba(139,148,158,0.15); color: #8b949e; }
.lesson-cf-btn {
    background: rgba(56,139,253,0.1);
    border: 1px solid rgba(56,139,253,0.3);
    color: #58a6ff;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}
.lesson-cf-btn:hover { background: rgba(56,139,253,0.2); }

/* 반사실 모달 */
.lessons-cf-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.lessons-cf-modal.is-open { display: flex; }
.lessons-cf-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}
.lessons-cf-modal__panel {
    position: relative;
    background: #0d1117;
    border: 1px solid rgba(240,246,252,0.1);
    border-radius: 8px;
    padding: 22px 26px;
    width: min(720px, 92vw);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}
.lessons-cf-modal__close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: transparent;
    color: #8b949e;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
}
.lessons-cf-modal__panel h3 {
    margin: 0 0 16px 0;
    color: #f0f6fc;
    font-size: 1.05rem;
}
.lesson-cf-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
    background: #161b22;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #f0f6fc;
    margin-bottom: 14px;
}
.lesson-cf-meta__key {
    color: #8b949e;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 6px;
}
.lesson-cf-section-title {
    font-size: 0.88rem;
    color: #f0f6fc;
    margin: 14px 0 8px 0;
}
.lesson-cf-scenarios {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lesson-cf-scenario {
    background: #161b22;
    border: 1px solid rgba(240,246,252,0.08);
    border-radius: 6px;
    padding: 10px 14px;
}
.lesson-cf-scenario__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #f0f6fc;
    margin-bottom: 6px;
}
.lesson-cf-scenario__applies {
    font-size: 0.72rem;
    color: #58a6ff;
}
.lesson-cf-scenario__body {
    font-size: 0.78rem;
    color: #c9d1d9;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.lesson-cf-scenario__note {
    color: #8b949e;
    font-size: 0.72rem;
    margin: 4px 0 0 0;
    line-height: 1.4;
}
.lesson-cf-unsupported {
    margin: 0;
    padding-left: 20px;
    color: #8b949e;
    font-size: 0.78rem;
    line-height: 1.6;
}
.lesson-cf-unsupported b { color: #c9d1d9; }
.lesson-cf-disclaimer {
    background: rgba(240,136,62,0.08);
    border: 1px solid rgba(240,136,62,0.3);
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 14px;
    font-size: 0.75rem;
    color: #f0883e;
    line-height: 1.5;
}

/* ─── PnL 색상 전역 규칙 — 수익 초록 / 손실 빨강 / 0 회색 ─── */
.pnl-pos { color: #3fb950 !important; font-weight: 600; }
.pnl-neg { color: #f85149 !important; font-weight: 600; }
.pnl-zero { color: #8b949e !important; }

/* ════════════════════════════════════════════════════════════
 * 🏛️ V5 분석실 대시보드 (헤지펀드 분석실 → 매니저 군단 브리핑)
 * ════════════════════════════════════════════════════════════ */
.md-analyst {
    margin: 16px 0 24px;
    padding: 16px;
    background: linear-gradient(180deg, #1a1f2c 0%, #161a23 100%);
    border: 1px solid #2a3140;
    border-radius: 12px;
}
.md-analyst__brief-wrap {
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #2a3140;
}
.md-analyst__brief-title {
    font-size: 0.85rem;
    color: #8b94a8;
    margin-bottom: 4px;
}
.md-analyst__brief {
    font-size: 0.95rem;
    color: #e6e8eb;
    line-height: 1.55;
    margin: 0;
}
.md-analyst__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.md-analyst__card {
    padding: 12px;
    background: #20263a;
    border-radius: 8px;
    border: 1px solid #2a3140;
}
.md-analyst__card h4 {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: #cbd0dc;
    font-weight: 600;
}
.md-analyst__card--convergence .md-conv-pct {
    font-size: 1.6rem;
    margin-bottom: 6px;
}
.md-conv-pct b { color: #ffffff; }
.md-conv-label {
    margin-left: 6px;
    font-size: 0.75rem;
    color: #aab3c5;
}
.md-conv-breakdown {
    font-size: 0.75rem;
    color: #8b94a8;
    margin: 6px 0;
}
.md-conv-dominant {
    font-size: 0.78rem;
    color: #cbd0dc;
}
.md-pct-bar {
    height: 6px;
    background: #0d1117;
    border-radius: 3px;
    overflow: hidden;
    margin: 4px 0;
}
.md-pct-bar__fill {
    height: 100%;
    transition: width 0.3s ease;
}
.md-fc-row {
    display: grid;
    grid-template-columns: 50px 1fr 50px;
    gap: 8px;
    align-items: center;
    font-size: 0.8rem;
    margin: 4px 0;
}
.md-fc-row span { color: #8b94a8; }
.md-fc-row b { color: #e6e8eb; text-align: right; }
.md-prox-row {
    font-size: 0.78rem;
    color: #cbd0dc;
    margin-top: 4px;
}
.md-prox-warn {
    margin-top: 6px;
    font-size: 0.75rem;
}
.md-alert {
    padding: 8px 10px;
    margin-bottom: 6px;
    background: #161a23;
    border-radius: 6px;
}
.md-alert-title { font-size: 0.82rem; color: #e6e8eb; }
.md-alert-detail { font-size: 0.72rem; color: #8b94a8; margin-top: 2px; }
.md-alert-action { font-size: 0.72rem; color: #cbd0dc; margin-top: 4px; }
.md-empty {
    text-align: center;
    color: #5cd6a4;
    margin: 4px 0;
    font-size: 0.82rem;
}
.md-analyst__activations h4 {
    margin: 0 0 4px;
    font-size: 0.92rem;
    color: #cbd0dc;
}
.md-analyst__hint {
    font-size: 0.72rem;
    color: #8b94a8;
    margin: 0 0 10px;
}
.md-act-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.md-act-table thead th {
    text-align: left;
    padding: 8px 10px;
    background: #20263a;
    color: #aab3c5;
    font-weight: 600;
    font-size: 0.75rem;
    border-bottom: 1px solid #2a3140;
}
.md-act-table tbody td {
    padding: 10px;
    border-bottom: 1px solid #20263a;
    vertical-align: middle;
}
.md-act-icon {
    white-space: nowrap;
    font-size: 1.1rem;
}
.md-act-label {
    font-size: 0.7rem;
    color: #8b94a8;
    margin-left: 4px;
}
.md-act-mult-detail {
    font-size: 0.68rem;
    color: #5a6275;
}
.md-act-dim {
    font-size: 0.7rem;
    color: #7bb8ff;
    background: #1a2030;
    padding: 1px 6px;
    border-radius: 4px;
    margin-right: 4px;
}
.md-act-reason {
    font-size: 0.78rem;
    color: #aab3c5;
}

/* ════════════════════════════════════════════════════════ */
/* 1.1 매니저 군단 시장 커버리지 (collapsible + current-first) */
/* ════════════════════════════════════════════════════════ */
.coverage-bucket {
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    overflow: hidden;
    transition: border-color 0.15s, background 0.15s;
}
.coverage-bucket:hover {
    border-color: rgba(255,255,255,0.14);
}
.coverage-bucket--current {
    border-left: 3px solid #4caf50;
    background: rgba(76,175,80,0.05);
}
.coverage-bucket--current:hover {
    border-left-color: #66bb6a;
}
.coverage-bucket__summary {
    cursor: pointer;
    padding: 10px 14px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: #e8eaed;
}
.coverage-bucket__summary::-webkit-details-marker {
    display: none;
}
.coverage-bucket__summary::before {
    content: '▶';
    font-size: 0.7rem;
    color: #8b949e;
    transition: transform 0.15s;
    width: 12px;
    display: inline-block;
}
.coverage-bucket[open] > .coverage-bucket__summary::before {
    transform: rotate(90deg);
}
.coverage-bucket__label {
    flex: 1;
}
.coverage-bucket__count {
    color: #8b949e;
    font-weight: 400;
    font-size: 0.85rem;
}
.coverage-bucket__current-badge {
    background: rgba(76,175,80,0.18);
    color: #4caf50;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.3px;
}
.coverage-bucket__body {
    padding: 4px 14px 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ════════════════════════════════════════════════════════ */
/* 1.1.B 버킷 표 — 컬럼 너비·시각화 (UI 개편 2026-06-09)      */
/* ════════════════════════════════════════════════════════ */

/* A. 매니저 군단은 1-col 강제 (2-col grid 시 컬럼 짜부 방지) */
#dash-strategy-grid:has(.coverage-bucket) {
    display: block !important;
    max-width: none !important;
}

/* 버킷 내부 테이블: 컬럼 너비 명시 + 텍스트 깨짐 방지 */
.coverage-bucket__body .strategy-table {
    table-layout: fixed;
    width: 100%;
}
.coverage-bucket__body .strategy-table th,
.coverage-bucket__body .strategy-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 8px 6px;
    vertical-align: middle;
}
/* B. 컬럼 압축 — 좁은 폭 대응 */
.coverage-bucket__body .strategy-table .col-bk-id     { width: 40px; font-family: 'SF Mono', Monaco, monospace; font-size: 0.78rem; }
.coverage-bucket__body .strategy-table .col-bk-status { width: 32px; text-align: center; }
.coverage-bucket__body .strategy-table .col-bk-pnl    { width: 104px; }
.coverage-bucket__body .strategy-table .col-bk-n      { width: 52px; }
.coverage-bucket__body .strategy-table .col-bk-wr     { width: 64px; }
.coverage-bucket__body .strategy-table .col-bk-cron   { width: 40px; text-align: center; }
.coverage-bucket__body .strategy-table .col-bk-name   { color: #c9d1d9; }

/* B. cron 토글 미니 (매니저 군단 섹션 한정) */
.coverage-bucket__body .cron-toggle {
    width: 28px;
    height: 16px;
}
.coverage-bucket__body .cron-toggle__slider {
    border-radius: 16px;
    border-width: 1.5px;
}
.coverage-bucket__body .cron-toggle__slider::after {
    width: 10px;
    height: 10px;
    left: 1px;
    top: 1px;
}
.coverage-bucket__body .cron-toggle__input:checked + .cron-toggle__slider::after {
    transform: translateX(12px);
}

/* B. 상태 점 — 텍스트 떼고 점만 + 호버 툴팁 */
.coverage-bucket__body .bk-dot {
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
    cursor: help;
}
.coverage-bucket__body .bk-dot--run  { color: #3fb950; text-shadow: 0 0 6px rgba(63,185,80,0.6); }
.coverage-bucket__body .bk-dot--wait { color: #a371f7; }
.coverage-bucket__body .bk-dot--off  { color: #8b949e; }

/* 7d 손익 배경 막대 (intensity) */
.coverage-bucket__body .pnl-bar-bg {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    min-width: 78px;
    text-align: right;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.82rem;
}
.coverage-bucket__body .pnl-bar-bg.pnl-pos  { background: rgba(76,175,80,0.18);  color: #4caf50; font-weight: 700; }
.coverage-bucket__body .pnl-bar-bg.pnl-neg  { background: rgba(255,82,82,0.18);  color: #ff5252; font-weight: 700; }
.coverage-bucket__body .pnl-bar-bg.pnl-zero { background: rgba(255,255,255,0.04); color: #6b7280; }

/* 버킷 헤더 — 운영/대기/OFF 미니바 + 평균 손익 */
.coverage-bucket__minibar {
    display: inline-flex;
    height: 8px;
    width: 64px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    vertical-align: middle;
}
.coverage-bucket__minibar > span { display: block; height: 100%; }
.coverage-bucket__minibar .mb-run  { background: #3fb950; }
.coverage-bucket__minibar .mb-wait { background: #a371f7; }
.coverage-bucket__minibar .mb-off  { background: #424950; }

.coverage-bucket__avg-pnl {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    white-space: nowrap;
}
.coverage-bucket__avg-pnl.pnl-pos  { color: #4caf50; background: rgba(76,175,80,0.12); }
.coverage-bucket__avg-pnl.pnl-neg  { color: #ff5252; background: rgba(255,82,82,0.12); }
.coverage-bucket__avg-pnl.pnl-zero { color: #6b7280; background: rgba(255,255,255,0.04); }

/* 현재 시장 버킷 — 글로우 강조 */
.coverage-bucket--current {
    box-shadow: 0 0 0 1px rgba(76,175,80,0.35), 0 0 18px -4px rgba(76,175,80,0.45);
}
.coverage-bucket--current .coverage-bucket__current-badge {
    animation: cv-pulse 2.2s ease-in-out infinite;
}
@keyframes cv-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(76,175,80,0); }
    50%      { box-shadow: 0 0 0 4px rgba(76,175,80,0.22); }
}

/* ════════════════════════════════════════════════════════ */
/* 1.2 봇 라이브 카드 summary / expand                       */
/* ════════════════════════════════════════════════════════ */
.bot-status-card__summary {
    cursor: pointer;
    list-style: none;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    flex-wrap: wrap;
}
.bot-status-card__summary::-webkit-details-marker { display: none; }
.bot-status-card__summary::before {
    content: '▶';
    font-size: 0.62rem;
    color: #6b7280;
    transition: transform 0.15s;
    flex-shrink: 0;
}
.bot-status-card[open] > .bot-status-card__summary::before {
    transform: rotate(90deg);
}
.bot-status-card__status-chip {
    padding: 2px 8px;
    background: rgba(var(--c), 0.15);
    color: rgb(var(--c));
    border: 1px solid rgba(var(--c), 0.4);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.bot-status-card__summary-spacer { flex: 1; }
.bot-status-card__expand {
    padding: 4px 14px 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* 한 줄 컴팩트 정보 칩 (포지션 수, 24h 진입수, 24h PnL) */
.bot-card-chip {
    padding: 1px 7px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-family: ui-monospace, monospace;
    background: rgba(255,255,255,0.05);
    color: #aab3c5;
    border: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.bot-card-chip--pos {
    background: rgba(33,150,243,0.12);
    color: #58a6ff;
    border-color: rgba(33,150,243,0.35);
}
.bot-card-chip--h24 { color: #8b949e; }
.bot-card-chip.pnl-pos { color: #3fb950; border-color: rgba(63,185,80,0.4); }
.bot-card-chip.pnl-neg { color: #f85149; border-color: rgba(248,81,73,0.4); }
.bot-card-chip.pnl-zero { color: #8b949e; }

/* UI.4 — skip code 색상 칩 (status_msg 시각화) */
.skip-chip {
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
    letter-spacing: 0.02em;
    cursor: help;
}

/* ════════════════════════════════════════════════════════ */
/* C1 (2.1) hero — 점수+regime+intensity ↔ Today's Brief 가로 */
/* ════════════════════════════════════════════════════════ */
.regime-banner--hero {
    max-width: none;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
}
.regime-hero__main {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1 1 440px;
    min-width: 300px;
}
.regime-hero__brief {
    flex: 1 1 360px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 18px;
    background: rgba(123,184,255,0.06);
    border: 1px solid rgba(123,184,255,0.18);
    border-radius: 10px;
}
.regime-hero__brief-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #7bb8ff;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}
.regime-hero__brief-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #c9d1d9;
    margin: 0;
}
@media (max-width: 760px) {
    .regime-banner--hero { flex-direction: column; }
    .regime-hero__brief { width: 100%; }
}

/* ════════════════════════════════════════════════════════ */
/* C2 (2.3) 타임라인·히스토리 더보기 토글                      */
/* ════════════════════════════════════════════════════════ */
.md-more-toggle { margin-top: 8px; }
.md-more-toggle > summary {
    cursor: pointer; list-style: none; display: inline-block;
    color: #7bb8ff; font-size: 0.82rem; padding: 6px 12px;
    background: rgba(123,184,255,0.06); border: 1px solid rgba(123,184,255,0.15);
    border-radius: 6px; user-select: none;
}
.md-more-toggle > summary::-webkit-details-marker { display: none; }
.md-more-toggle > summary:hover { background: rgba(123,184,255,0.12); }
.md-more-toggle[open] > summary { color: #aab3c5; }

/* ════════════════════════════════════════════════════════ */
/* C3 (2.4) ⓐ 7차원 → 전략 영향 지도                          */
/* ════════════════════════════════════════════════════════ */
.md-dim-strategy-map { margin-top: 24px; }
.md-dsm-head h3 { margin: 0 0 6px; font-size: 1.05rem; }
.md-dsm-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px; margin-top: 12px;
}
.md-dsm-card {
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px; padding: 12px 14px;
}
.md-dsm-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.md-dsm-card__name { font-weight: 600; color: #e8eaed; font-size: 0.92rem; }
.md-dsm-card__score { font-family: ui-monospace, monospace; color: #cbd0dc; font-size: 0.95rem; white-space: nowrap; }
.md-dsm-card__score small { color: #8b949e; font-size: 0.68rem; margin-left: 4px; }
.md-dsm-card__bar { height: 5px; background: #1f2630; border-radius: 3px; overflow: hidden; margin: 8px 0; }
.md-dsm-card__bar span { display: block; height: 100%; background: linear-gradient(90deg, #5b95ff, #3b82f6); }
.md-dsm-card__explain { font-size: 0.78rem; color: #aab3c5; line-height: 1.5; margin: 6px 0 10px; }
.md-dsm-card__chips { display: flex; flex-wrap: wrap; gap: 5px; }
.md-dsm-chip { padding: 2px 8px; border-radius: 8px; font-size: 0.72rem; font-weight: 600; font-family: ui-monospace, monospace; transition: filter 0.12s; }
.md-dsm-chip:hover { filter: brightness(1.3); }
.md-dsm-empty { color: #5a6275; font-size: 0.74rem; }

/* ════════════════════════════════════════════════════════ */
/* C3 (2.4) ⓒ 활성도 배율 분해 모달                           */
/* ════════════════════════════════════════════════════════ */
.md-act-row:hover { background: rgba(123,184,255,0.06); }
.md-act-dialog {
    border: none; border-radius: 14px; padding: 0;
    background: #161b22; color: #e8eaed;
    max-width: 440px; width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.md-act-dialog::backdrop { background: rgba(0,0,0,0.6); }
.md-act-dialog__head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.md-act-dialog__head h3 { margin: 0; font-size: 0.95rem; }
.md-act-dialog__close { background: none; border: none; color: #8b949e; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.md-act-dialog__close:hover { color: #e8eaed; }
.md-act-dialog__body { padding: 16px 18px; }
.md-act-modal-state { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.md-act-modal-dims { display: flex; gap: 16px; font-size: 0.82rem; color: #aab3c5; margin-bottom: 12px; }
.md-act-modal-dims span { color: #777; }
.md-act-modal-mult { background: rgba(255,255,255,0.03); border-radius: 8px; padding: 10px 12px; }
.md-act-modal-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 0.85rem; }
.md-act-modal-row > span { flex: 1; color: #aab3c5; }
.md-act-modal-row b { font-family: ui-monospace, monospace; color: #e8eaed; }
.md-act-modal-row small { color: #8b949e; font-size: 0.72rem; flex: 2; text-align: right; }
.md-act-modal-row--final { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 4px; padding-top: 8px; }
.md-act-modal-row--final b { color: #5cd6a4; font-size: 1.05rem; }
.md-act-modal-warn { color: #ff8a65; font-size: 0.82rem; margin: 10px 0 0; }
.md-act-modal-note { color: #8b949e; font-size: 0.8rem; margin: 10px 0 0; }
.md-act-modal-reason { color: #7d8590; font-size: 0.78rem; margin: 8px 0 0; font-style: italic; }

/* ════════════════════════════════════════════════════════ */
/* UI.6 Regime 커버리지 맵 (9단계 × 매니저)                    */
/* ════════════════════════════════════════════════════════ */
.dash-rmap { display: flex; flex-direction: column; gap: 3px; }
.dash-rmap-row {
    display: grid; grid-template-columns: 140px 1fr 36px;
    align-items: center; gap: 10px;
    padding: 7px 10px; border-radius: 7px;
    background: rgba(255,255,255,0.02); border: 1px solid transparent;
}
.dash-rmap-row--current { border-color: rgba(76,175,80,0.5); background: rgba(76,175,80,0.06); }
.dash-rmap-row--nospec { opacity: 0.72; }
.dash-rmap-band {
    display: grid; grid-template-columns: 140px 1fr 36px;
    align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 7px; margin-bottom: 6px;
    background: rgba(123,184,255,0.06); border: 1px solid rgba(123,184,255,0.25);
}
.dash-rmap-band__label { font-size: 0.82rem; font-weight: 700; color: #7bb8ff; }
.dash-rmap-band__label small { color: #8b949e; font-weight: 400; display: block; font-size: 0.66rem; }
.dash-rmap-nospec { color: #8b949e; font-size: 0.74rem; font-style: italic; }
.dash-rmap-empty { color: #5a6275; font-size: 0.74rem; }
.dash-rmap-label { font-size: 0.82rem; font-weight: 600; color: #cbd0dc; font-family: ui-monospace, monospace; }
.dash-rmap-label small { color: #777; font-weight: 400; font-family: inherit; margin-left: 2px; }
.dash-rmap-now { color: #4caf50; }
.dash-rmap-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.dash-rmap-chip {
    padding: 1px 7px; border-radius: 7px; font-size: 0.72rem;
    font-family: ui-monospace, monospace; text-decoration: none; border: 1px solid;
}
.dash-rmap-chip--on { background: rgba(63,185,80,0.12); color: #3fb950; border-color: rgba(63,185,80,0.35); }
.dash-rmap-chip--pos { background: rgba(33,150,243,0.15); color: #58a6ff; border-color: rgba(33,150,243,0.4); }
.dash-rmap-chip--off { background: rgba(255,255,255,0.04); color: #8b949e; border-color: rgba(255,255,255,0.1); }
.dash-rmap-chip:hover { filter: brightness(1.25); }
.dash-rmap-gapwarn { color: #ff8a65; font-size: 0.76rem; }
.dash-rmap-count { text-align: right; font-family: ui-monospace, monospace; color: #8b949e; font-size: 0.8rem; }
@media (max-width: 640px) {
    .dash-rmap-row { grid-template-columns: 100px 1fr 28px; }
}
