/* ════════════════════════════════════════════════════════════
   국내주식 자동매매 현황 — 리디자인 v2
   폰트: Pretendard (기존 유지) + 숫자 고정폭 처리
   테마: 화이트 베이스, 딥 인디고 포인트, 세밀한 그림자
   ════════════════════════════════════════════════════════════ */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css');

:root {
    --bg:          #f0f2f7;
    --surface:     #ffffff;
    --surface-2:   #f7f8fb;
    --border:      #e4e7ef;
    --border-2:    #d1d5e0;

    --title:       #0d1117;
    --text:        #2d3340;
    --sub:         #7c839a;
    --muted:       #b0b6c8;

    --pos:         #0d9965;
    --pos-bg:      #edfaf4;
    --pos-border:  #a7e8cc;

    --neg:         #d93025;
    --neg-bg:      #fdf0ef;
    --neg-border:  #f4b8b4;

    --neu:         #2d3340;
    --warn:        #c47c0a;
    --warn-bg:     #fef9ed;

    --blue:        #2a5bd7;
    --blue-bg:     #eef3fd;
    --blue-border: #c3d4f7;

    --indigo:      #3730a3;
    --indigo-light:#6366f1;

    --radius-sm:   6px;
    --radius:      12px;
    --radius-lg:   16px;

    --shadow-xs:   0 1px 2px rgba(13,17,23,.05);
    --shadow-sm:   0 2px 8px rgba(13,17,23,.07);
    --shadow-md:   0 4px 20px rgba(13,17,23,.09);

    --mono: 'D2Coding', 'Consolas', 'SF Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

#sk_wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 14px 60px;
    background: var(--bg);
    font-family: 'Pretendard Variable', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
    font-size: 14px;
    color: var(--text);
    min-height: 100vh;
}

/* ────────── 페이지 타이틀 ────────── */
.sk-page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.sk-page-title h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--title);
    letter-spacing: -.4px;
}

.sk-mode-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 99px;
    letter-spacing: .02em;
}
.sk-mode-badge.virtual { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-border); }
.sk-mode-badge.real    { background: var(--neg-bg); color: var(--neg); border: 1px solid var(--neg-border); }

.sk-live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--pos);
    background: var(--pos-bg);
    border: 1px solid var(--pos-border);
    border-radius: 99px;
    padding: 4px 11px;
    letter-spacing: .02em;
}
.sk-live-dot {
    width: 7px;
    height: 7px;
    background: var(--pos);
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .3; transform: scale(.75); }
}

/* ────────── 카드 기본 ────────── */
.sk-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 18px;
    margin-bottom: 14px;
    transition: box-shadow .2s;
}
.sk-card:hover { box-shadow: var(--shadow-md); }

.sk-card-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--sub);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sk-card-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: var(--indigo-light);
    border-radius: 2px;
}

.sk-section-box {
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 14px;
    margin-top: 14px;
}
.sk-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 10px;
}

/* ────────── 색상 유틸 ────────── */
.pos  { color: var(--pos) !important; }
.neg  { color: var(--neg) !important; }
.neu  { color: var(--neu) !important; }
.warn { color: var(--warn) !important; }

/* ────────── 정보 배너 (비로그인) ────────── */
.sk-info-banner {
    background: linear-gradient(135deg, #f5f7ff 0%, #eef2ff 100%);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 14px;
}
.sk-info-banner .info-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--title);
    margin-bottom: 14px;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.info-item {
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}
.info-item .label {
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 8px;
}
.info-item.visitor .label { color: #0369a1; }
.info-item.member  .label { color: #0d9965; }
.info-item.admin   .label { color: #7c3aed; }
.info-item .desc ul { list-style: none; }
.info-item .desc li {
    font-size: 12px;
    color: var(--sub);
    padding: 2px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}
.info-item .desc li::before { content: '›'; color: var(--muted); }
.login-msg { font-size: 13px; color: var(--sub); text-align: center; }
.login-btn-pill {
    display: inline-block;
    background: var(--blue);
    color: #fff;
    border-radius: 99px;
    padding: 5px 16px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s;
}
.login-btn-pill:hover { background: var(--indigo); }

/* ────────── 시장 현황 ────────── */
.sk-market-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
@media(max-width:600px) { .sk-market-grid { grid-template-columns: repeat(2, 1fr); } }

.sk-market-item {
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    border: 1px solid var(--border);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.sk-market-item::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: var(--border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.sk-market-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 5px;
}
.sk-market-val {
    font-size: 16px;
    font-weight: 800;
    color: var(--title);
    font-variant-numeric: tabular-nums;
}
.sk-market-chg {
    font-size: 11px;
    margin-top: 3px;
    color: var(--sub);
    font-variant-numeric: tabular-nums;
}
.sk-market-val.pos::parent .sk-market-item::after,
.sk-market-item:has(.sk-market-val.pos)::after { background: var(--pos); }
.sk-market-item:has(.sk-market-val.neg)::after { background: var(--neg); }

/* ────────── 수익 요약 ────────── */
.profit-all-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
@media(max-width:600px) { .profit-all-summary { grid-template-columns: repeat(2, 1fr); } }

.profit-all-item {
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 14px 12px;
    border: 1px solid var(--border);
    text-align: center;
}
.profit-all-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}
.profit-all-val {
    font-size: 22px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.5px;
}

/* 기간별 */
.profit-period-wrap { display: flex; gap: 10px; flex-wrap: wrap; }
.profit-period-item {
    flex: 1;
    min-width: 80px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
    box-shadow: var(--shadow-xs);
}
.profit-period-item .label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.profit-period-item .pct { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.profit-period-item .cnt { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ────────── 종목 행 ────────── */
.profit-coin-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.profit-coin-row:last-child { border-bottom: none; }
.profit-coin-name { font-size: 13px; font-weight: 700; color: var(--title); min-width: 80px; }
.profit-coin-code { font-size: 11px; color: var(--muted); }
.profit-coin-pct  { font-size: 14px; font-weight: 800; min-width: 70px; font-variant-numeric: tabular-nums; }
.profit-coin-count{ font-size: 12px; color: var(--sub); }
.profit-coin-win  { font-size: 12px; color: var(--sub); }
.profit-row-empty { font-size: 12px; color: var(--muted); padding: 12px 0; text-align: center; }

/* 바 차트 */
.profit-bar-wrap  { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.profit-bar-label { font-size: 12px; font-weight: 700; color: var(--text); min-width: 72px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profit-bars      { flex: 1; }
.profit-bar-item  { display: flex; align-items: center; gap: 8px; }
.profit-bar-bg    { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.profit-bar-fill  { height: 100%; border-radius: 4px; transition: width .4s cubic-bezier(.4,0,.2,1); }
.profit-bar-fill.pos { background: linear-gradient(90deg, #0d9965, #34d399); }
.profit-bar-fill.neg { background: linear-gradient(90deg, #d93025, #f87171); }
.profit-bar-val   { font-size: 11px; font-weight: 700; min-width: 54px; text-align: right; font-variant-numeric: tabular-nums; }

/* ────────── 보유 현황 ────────── */
.holding-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.holding-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
}
.holding-card-name { font-size: 13px; font-weight: 800; color: var(--title); }
.holding-card-code { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.holding-card-pct  { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.holding-card-meta { font-size: 11px; color: var(--sub); margin-top: 4px; }
.holding-card-bar  { height: 3px; border-radius: 2px; margin-top: 10px; background: var(--border); overflow: hidden; }
.holding-card-bar-fill { height: 100%; border-radius: 2px; transition: width .4s; }
.holding-card-bar-fill.pos { background: var(--pos); }
.holding-card-bar-fill.neg { background: var(--neg); }

/* ────────── 거래 내역 ────────── */
.sk-trade-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 300px;
    overflow-y: auto;
}
.trade-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    transition: background .15s;
}
.trade-row:hover { background: var(--surface-2); }
.trade-row.empty { color: var(--muted); text-align: center; display: flex; justify-content: center; }
.trade-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 99px;
    white-space: nowrap;
    letter-spacing: .02em;
}
.trade-badge.buy  { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-border); }
.trade-badge.sell { background: var(--neg-bg); color: var(--neg); border: 1px solid var(--neg-border); }
.trade-name  { font-weight: 700; color: var(--title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trade-price { color: var(--sub); font-variant-numeric: tabular-nums; }
.trade-time  { color: var(--muted); font-size: 11px; white-space: nowrap; }

/* ────────── 감시 종목 카드 그리드 ────────── */
.wl-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
@media(max-width:600px) { .wl-cards-grid { grid-template-columns: 1fr; } }

.wl-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-xs);
    transition: box-shadow .2s, transform .15s;
    position: relative;
    overflow: hidden;
}
.wl-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* 상단 컬러 스트라이프 */
.wl-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--border-2);
    transition: background .3s;
}
.wl-card.trend-up::before   { background: linear-gradient(90deg, var(--pos), #34d399); }
.wl-card.trend-down::before { background: linear-gradient(90deg, var(--neg), #f87171); }

.wl-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.wl-card-name { font-size: 15px; font-weight: 800; color: var(--title); }
.wl-card-code { font-size: 11px; color: var(--muted); margin-top: 2px; }
.wl-card-status-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 99px;
    white-space: nowrap;
}
.wl-card-status-badge.hold { background: var(--warn-bg); color: var(--warn); border: 1px solid #fde68a; }
.wl-card-status-badge.wait { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

/* 가격 */
.wl-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}
.wl-card-price {
    font-size: 24px;
    font-weight: 900;
    color: var(--title);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.5px;
}
.wl-card-change {
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.wl-card-volume { font-size: 11px; color: var(--muted); margin-bottom: 14px; }

/* 지표 섹션 */
.wl-indicators {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* RSI 게이지 */
.ind-row { display: flex; flex-direction: column; gap: 4px; }
.ind-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ind-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.ind-value {
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.ind-signal-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 99px;
    letter-spacing: .02em;
}
.ind-signal-badge.buy    { background: var(--blue-bg); color: var(--blue); }
.ind-signal-badge.sell   { background: var(--neg-bg); color: var(--neg); }
.ind-signal-badge.overbought { background: var(--neg-bg); color: var(--neg); }
.ind-signal-badge.oversold   { background: var(--pos-bg); color: var(--pos); }
.ind-signal-badge.golden { background: #fef9ed; color: var(--warn); border: 1px solid #fde68a; }
.ind-signal-badge.dead   { background: var(--neg-bg); color: var(--neg); }
.ind-signal-badge.neutral { background: var(--surface-2); color: var(--muted); }

/* RSI 트랙 */
.rsi-track {
    position: relative;
    height: 6px;
    border-radius: 3px;
    overflow: visible;
    background: linear-gradient(90deg,
        #34d399 0%,
        #34d399 21.4%,
        #f0f2f7 21.4%,
        #f0f2f7 71.4%,
        #f87171 71.4%,
        #f87171 100%
    );
}
.rsi-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--indigo-light);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    transition: left .5s cubic-bezier(.4,0,.2,1);
}
.rsi-track-labels {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--muted);
    margin-top: 2px;
}

/* MACD 작은 바 */
.macd-bar-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.macd-bars {
    flex: 1;
    display: flex;
    align-items: center;
    height: 20px;
    gap: 1px;
}
.macd-bar {
    flex: 1;
    border-radius: 1px;
    min-height: 2px;
    transition: height .3s;
}
.macd-bar.pos { background: var(--pos); }
.macd-bar.neg { background: var(--neg); }

/* BB 위치 */
.bb-track {
    position: relative;
    height: 8px;
    background: linear-gradient(90deg, var(--pos-bg) 0%, var(--surface-2) 25%, #fff 50%, var(--surface-2) 75%, var(--neg-bg) 100%);
    border-radius: 4px;
    border: 1px solid var(--border);
    overflow: visible;
}
.bb-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--indigo-light);
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: left .5s cubic-bezier(.4,0,.2,1);
}
.bb-track-labels {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--muted);
    margin-top: 2px;
}

/* MA 뱃지들 */
.ma-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.ma-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--sub);
}
.ma-badge.above { background: var(--pos-bg); color: var(--pos); border-color: var(--pos-border); }
.ma-badge.below { background: var(--neg-bg); color: var(--neg); border-color: var(--neg-border); }

/* 구분선 */
.wl-card-divider {
    height: 1px;
    background: var(--border);
    margin: 10px 0;
}

/* 로딩/빈 */
.wl-loading, .wl-empty {
    font-size: 13px;
    color: var(--muted);
    padding: 20px;
    text-align: center;
}

/* ────────── 상태바 ────────── */
.sk-statusbar {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}
.upd { color: var(--blue); font-weight: 700; }

/* ────────── 관리자 ────────── */
.sk-admin-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, #0d1117 0%, #1e293b 100%);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 12px 18px;
    margin-top: 8px;
}
.sk-admin-badge {
    font-size: 11px;
    font-weight: 800;
    background: #f59e0b;
    color: #0d1117;
    border-radius: 99px;
    padding: 3px 11px;
    letter-spacing: .02em;
}
.sk-admin-header span:last-child { font-size: 13px; color: #e2e8f0; font-weight: 600; }

.admin-tab-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    background: #e4e7ef;
    border: 1px solid var(--border);
    border-top: none;
    overflow: hidden;
}
.sk-tab-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--sub);
    background: var(--surface-2);
    border: none;
    cursor: pointer;
    transition: .15s;
    white-space: nowrap;
    letter-spacing: .01em;
}
.sk-tab-btn:hover { background: #fff; color: var(--text); }
.sk-tab-btn.active { background: #fff; color: var(--blue); border-bottom: 2px solid var(--blue); }

.sk-admin-panel { display: none; }
.sk-admin-panel.active { display: block; }

/* 시스템 그리드 */
.sys-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.sys-hold-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.sys-item { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px; border: 1px solid var(--border); }
.sys-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.sys-val   { font-size: 14px; font-weight: 800; }
.sys-val.on  { color: var(--pos); }
.sys-val.off { color: var(--neg); }
.sys-sub   { font-size: 11px; color: var(--sub); margin-top: 3px; }
.sys-actions { display: flex; gap: 6px; margin-top: 8px; }

.sk-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width:600px) { .sk-grid-2 { grid-template-columns: 1fr; } }

/* 제어 버튼 */
.ctrl-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctrl-row label { font-size: 12px; color: var(--sub); white-space: nowrap; min-width: 60px; }
.ctrl-row input { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }
.ctrl-btn {
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .15s;
    letter-spacing: .01em;
}
.ctrl-btn:hover { filter: brightness(.92); }
.buy-btn    { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-border); }
.sell-btn   { background: var(--neg-bg); color: var(--neg); border-color: var(--neg-border); }
.save-btn   { background: var(--pos-bg); color: var(--pos); border-color: var(--pos-border); }
.pause-btn  { background: var(--warn-bg); color: var(--warn); border-color: #fde68a; }
.resume-btn { background: var(--pos-bg); color: var(--pos); border-color: var(--pos-border); }
.ctrl-msg { font-size: 12px; padding: 5px 12px; border-radius: var(--radius-sm); font-weight: 600; }
.ctrl-msg.ok  { background: var(--pos-bg); color: var(--pos); }
.ctrl-msg.err { background: var(--neg-bg); color: var(--neg); }

/* 파라미터 */
.cfg-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    margin: 16px 0 8px;
    text-transform: uppercase;
    letter-spacing: .07em;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}
.cfg-toggle-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.cfg-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    transition: .15s;
}
.cfg-toggle:hover { border-color: var(--blue); }
.cfg-toggle input { accent-color: var(--blue); }
.cfg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.cfg-field label { display: block; font-size: 11px; font-weight: 700; color: var(--sub); margin-bottom: 5px; }
.cfg-field input, .cfg-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--title);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.cfg-field input:focus, .cfg-field select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(42,91,215,.12);
}

/* 감시종목 관리 */
.wl-add-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.wl-add-row input {
    flex: 1;
    min-width: 100px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
}
.wl-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 4px;
    border-bottom: 1px solid var(--border);
}
.wl-item:last-child { border-bottom: none; }
.wl-code { font-size: 12px; color: var(--muted); min-width: 60px; font-family: var(--mono); }
.wl-name { flex: 1; font-size: 13px; font-weight: 700; }

/* ════════ 봇 로그 ════════ */
#spanel-log .sk-card { padding: 12px 10px 14px; }
.bot-log-box {
    background: #0d1117;
    border-radius: var(--radius-sm);
    padding: 14px 14px;
    height: 620px;
    max-height: 72vh;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: var(--mono);
    scrollbar-width: thin;
    scrollbar-color: #334155 #0d1117;
}
.bot-log-box::-webkit-scrollbar { width: 6px; }
.bot-log-box::-webkit-scrollbar-track { background: #0d1117; }
.bot-log-box::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }

.bot-log-row {
    font-size: 12.5px;
    line-height: 1.7;
    padding: 2px 0;
    color: #94a3b8;
    white-space: pre-wrap;
    word-break: break-all;
    border-bottom: 1px solid rgba(148,163,184,.06);
}
.bot-log-row:last-child { border-bottom: none; }
.bot-log-row.info  { color: #cbd5e1; }
.bot-log-row.buy   { color: #93c5fd; }
.bot-log-row.sell  { color: #fca5a5; }
.bot-log-row.hold  { color: #fde68a; }
.bot-log-row.err   { color: #fecaca; font-weight: 700; }
.bot-log-row.warn  { color: #fcd34d; }
.bot-log-row.empty { color: #475569; text-align: center; padding: 24px; }

.log-time   { color: #64748b; }
.log-level  { display: inline-block; padding: 1px 6px; margin: 0 3px; border-radius: 99px; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; }
.level-INFO    { background: rgba(59,130,246,.15); color: #93c5fd; }
.level-WARNING { background: rgba(245,158,11,.15); color: #fcd34d; }
.level-ERROR   { background: rgba(239,68,68,.15); color: #fca5a5; }
.level-DEBUG   { background: rgba(148,163,184,.12); color: #94a3b8; }
.level-VIRTUAL { background: rgba(34,197,94,.15); color: #86efac; }
.level-REAL    { background: rgba(244,63,94,.15); color: #fda4af; }

.log-keyword { color: #f1f5f9; font-weight: 800; }
.kw-BUY  { color: #60a5fa; }
.kw-SELL { color: #f87171; }
.kw-HOLD, .kw-WAIT { color: #fbbf24; }
.log-metric  { color: #c4b5fd; font-weight: 700; }
.log-percent { color: #67e8f9; font-weight: 800; }
.log-number  { color: #e2e8f0; font-weight: 700; }
.log-flag    { color: #86efac; font-weight: 800; }

@media(max-width:600px) {
    .bot-log-box { height: 60vh; max-height: none; padding: 12px 10px; }
    .bot-log-row { font-size: 12px; }
    .trade-row { grid-template-columns: auto 1fr auto; }
    .trade-row .trade-price { display: none; }
}

/* ══════════════════════════════════════════════════════
   코인 전용 추가 스타일
   ══════════════════════════════════════════════════════ */

/* 봇 상태 뱃지 */
.sk-bot-status { font-size:11px; font-weight:700; padding:4px 10px; border-radius:99px; letter-spacing:.02em; }
.sk-bot-status.running { background:var(--pos-bg); color:var(--pos); border:1px solid var(--pos-border); }
.sk-bot-status.paused  { background:var(--warn-bg); color:var(--warn); border:1px solid #fde68a; }
.sk-bot-status.stopped { background:var(--neg-bg); color:var(--neg); border:1px solid var(--neg-border); }

/* 시장현황 — 코인 전용 (거래량 순위) */
.sk-market-rank { font-size:10px; font-weight:700; color:var(--muted); margin-bottom:3px; }
.sk-market-code { font-size:10px; color:var(--muted); margin-bottom:4px; font-family:var(--mono); }
.sk-market-vol  { font-size:10px; color:var(--muted); margin-top:3px; }

/* 감시 코인 카드 — 고가/저가 행 */
.wl-card-hl {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--sub);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

/* 감시 코인 보유중 뱃지 */
.wl-card-status-badge.buy { background:var(--pos-bg); color:var(--pos); border:1px solid var(--pos-border); }
/* ══════════════════════════════════════════════════════
   매수/매도 신호 게이지 — Signal Strength Meter
   ══════════════════════════════════════════════════════ */

/* ── 메인 게이지 컨테이너 ── */
.sig-gauge-wrap {
    margin-top: 10px;
    padding: 12px 14px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* 상단 레이블 행 */
.sig-gauge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.sig-gauge-title {
    font-size: 10px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
}
.sig-score-badge {
    font-size: 12px;
    font-weight: 900;
    padding: 3px 10px;
    border-radius: 99px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
    transition: background .3s, color .3s;
}
.sig-score-badge.strong-buy  { background: #052e16; color: #4ade80; border: 1px solid #166534; }
.sig-score-badge.buy         { background: var(--pos-bg); color: var(--pos); border: 1px solid var(--pos-border); }
.sig-score-badge.neutral     { background: var(--surface-2); color: var(--sub); border: 1px solid var(--border); }
.sig-score-badge.sell        { background: var(--neg-bg); color: var(--neg); border: 1px solid var(--neg-border); }
.sig-score-badge.strong-sell { background: #450a0a; color: #f87171; border: 1px solid #7f1d1d; }

/* ── 게이지 트랙 ── */
.sig-gauge-track {
    position: relative;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg,
        #7f1d1d 0%,
        #dc2626 20%,
        #fca5a5 35%,
        #e5e7eb 42%,
        #e5e7eb 58%,
        #86efac 65%,
        #16a34a 80%,
        #052e16 100%
    );
    overflow: visible;
    margin-bottom: 4px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.1);
}

/* 중앙 세로선 */
.sig-gauge-track::after {
    content: '';
    position: absolute;
    top: -3px;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: rgba(255,255,255,.5);
    border-radius: 1px;
}

/* 게이지 바 (채워지는 영역 — 중앙 기준 좌우로 확장) */
.sig-gauge-fill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 5px;
    opacity: .35;
    transition: left .6s cubic-bezier(.4,0,.2,1), width .6s cubic-bezier(.4,0,.2,1);
}
.sig-gauge-fill.buy-fill  { background: var(--pos); }
.sig-gauge-fill.sell-fill { background: var(--neg); }

/* 썸 (포인터) */
.sig-gauge-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--indigo-light);
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    transition: left .6s cubic-bezier(.4,0,.2,1), border-color .3s;
    z-index: 2;
}
.sig-gauge-thumb.strong-buy  { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.2); }
.sig-gauge-thumb.buy         { border-color: var(--pos); }
.sig-gauge-thumb.neutral     { border-color: var(--border-2); }
.sig-gauge-thumb.sell        { border-color: var(--neg); }
.sig-gauge-thumb.strong-sell { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.2); }

/* 눈금 레이블 */
.sig-gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--muted);
    letter-spacing: .03em;
    margin-top: 3px;
}
.sig-gauge-labels span:first-child { color: var(--neg); font-weight: 700; }
.sig-gauge-labels span:last-child  { color: var(--pos); font-weight: 700; }

/* ── 지표별 미니 신호 행 ── */
.sig-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}
.sig-ind-chip {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    letter-spacing: .02em;
    transition: background .2s, color .2s;
}
.sig-ind-chip .chip-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--muted);
    flex-shrink: 0;
}
.sig-ind-chip.chip-buy  { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-border); }
.sig-ind-chip.chip-buy  .chip-dot { background: var(--blue); }
.sig-ind-chip.chip-sell { background: var(--neg-bg); color: var(--neg); border-color: var(--neg-border); }
.sig-ind-chip.chip-sell .chip-dot { background: var(--neg); }
.sig-ind-chip.chip-off  { opacity: .45; }

/* ── 관리자 로그 탭 전용 — 전체 현황 게이지 카드 ── */
.admin-signal-overview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.admin-sig-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow-xs);
}
.admin-sig-card-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--title);
    margin-bottom: 2px;
}
.admin-sig-card-code {
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 10px;
    font-family: var(--mono);
}

/* ── 큰 스코어 숫자 (관리자 뷰) ── */
.sig-big-score {
    font-size: 36px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: -.5px;
    transition: color .3s;
}
.sig-big-score.strong-buy  { color: #16a34a; }
.sig-big-score.buy         { color: var(--pos); }
.sig-big-score.neutral     { color: var(--sub); }
.sig-big-score.sell        { color: var(--neg); }
.sig-big-score.strong-sell { color: #dc2626; }

.sig-big-label {
    font-size: 11px;
    font-weight: 700;
    margin-top: 2px;
    margin-bottom: 10px;
}

/* ── 애니메이션: 신호 업데이트 시 펄스 ── */
@keyframes sig-pulse {
    0%   { transform: translate(-50%, -50%) scale(1); }
    40%  { transform: translate(-50%, -50%) scale(1.4); }
    100% { transform: translate(-50%, -50%) scale(1); }
}
.sig-gauge-thumb.updating {
    animation: sig-pulse .4s ease-out;
}

/* ── 반응형 ── */
@media (max-width: 600px) {
    .admin-signal-overview { grid-template-columns: 1fr; }
    .sig-big-score { font-size: 28px; }
}
