/* =============================================
   CSS 변수
   ============================================= */
:root {
    --sidebar-w: 240px;
    --sidebar-collapsed-w: 60px;
    --topbar-h: 54px;
    --footer-h: 38px;

    /* 배경 */
    --bg-base:  #07090f;
    --bg-card:  #0d1117;
    --bg-card2: #111827;
    --bg-hover: #161d2d;

    /* 테두리 */
    --border:   #1c2640;
    --border2:  #243050;

    /* 텍스트 */
    --text-primary:   #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted:     #475569;

    /* 강조색 */
    --accent-blue:   #3b82f6;
    --accent-green:  #10b981;
    --accent-red:    #ef4444;
    --accent-yellow: #f59e0b;
    --accent-orange: #f97316;
    --accent-purple: #8b5cf6;

    --font: 'Inter', -apple-system, sans-serif;
    --radius: 14px;
    --radius-sm: 9px;
    --radius-xs: 6px;
    --shadow: 0 4px 20px rgba(0,0,0,0.5);
    --transition: 0.18s ease;
}

/* =============================================
   리셋
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; overflow: hidden; }
body {
    height: 100%;
    overflow: hidden;
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font);
    line-height: 1.5;
    display: flex;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; border: none; outline: none; }

/* 스크롤바 */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
    position: fixed; top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition);
    overflow: hidden;   /* 가로 숨김 */
}
/* 사이드바 내부 스크롤 영역 (로고·상태바 제외) */
.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
.sidebar-scroll::-webkit-scrollbar { width: 3px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* 로고 */
.sidebar-logo {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 15px; font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: var(--topbar-h);
}
.sidebar-logo i {
    color: var(--accent-orange); font-size: 18px; flex-shrink: 0;
    filter: drop-shadow(0 0 6px var(--accent-orange));
    animation: rocketFloat 2.5s ease-in-out infinite;
}
@keyframes rocketFloat {
    0%,100% { transform: translateY(0) rotate(-10deg); }
    50%      { transform: translateY(-4px) rotate(-10deg); }
}
.logo-accent {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 섹션 레이블 */
.nav-section-label {
    font-size: 9px; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--text-muted);
    padding: 14px 18px 5px;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: space-between;
    gap: 6px;
}
/* 필터 적용 범위 태그 */
.filter-scope-tag {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: none;
    background: rgba(59,130,246,0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 4px;
    padding: 1px 5px;
    cursor: default;
    flex-shrink: 0;
    opacity: 0.8;
}

/* 네비 아이템 */
.sidebar-nav { display: flex; flex-direction: column; gap: 1px; padding: 4px 10px; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
    white-space: nowrap; overflow: hidden;
}
.nav-item i { font-size: 14px; flex-shrink: 0; width: 16px; text-align: center; }
.nav-item span:first-of-type { flex: 1; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active {
    background: rgba(59,130,246,.12);
    color: var(--accent-blue);
    font-weight: 700;
    border-left: 2px solid var(--accent-blue);
}
.nav-item.active i { color: var(--accent-blue); }

.nav-badge {
    font-size: 10px; font-weight: 700;
    padding: 1px 6px; border-radius: 8px;
    background: rgba(239,68,68,.15); color: var(--accent-red);
    flex-shrink: 0;
}
.nav-badge.blue  { background: rgba(59,130,246,.15); color: var(--accent-blue); }
.nav-badge.green { background: rgba(16,185,129,.15);  color: var(--accent-green); }
.nav-badge.red   { background: rgba(239,68,68,.15);   color: var(--accent-red); }

/* 사이드바 필터 */
.sidebar-filters {
    display: flex; flex-direction: column; gap: 1px;
    padding: 0 10px 10px;
}
.sf-btn {
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    background: transparent; border: none;
    color: var(--text-secondary); font-size: 12px; font-weight: 500;
    text-align: left;
    transition: all var(--transition);
    white-space: nowrap;
    display: flex; align-items: center; gap: 6px;
}
.sf-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.sf-btn.active {
    background: rgba(59,130,246,.1);
    color: var(--accent-blue); font-weight: 700;
}

/* 사이드바 상태바 */
.sidebar-status {
    margin-top: auto;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.ss-dot-wrap { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.ss-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.ss-dot.ok      { background: var(--accent-green); animation: pulse 2s infinite; }
.ss-dot.error   { background: var(--accent-red); }
.ss-dot.loading { background: var(--accent-blue); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.85)} }
.ss-text     { font-size: 11px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.ss-update   { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.ss-countdown{ font-size: 10px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; }

/* 사이드바 토글 */
.sidebar-toggle {
    position: absolute; bottom: 70px; right: 10px;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--bg-hover); border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 10px;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.sidebar-toggle:hover { border-color: var(--accent-blue); color: var(--accent-blue); }

/* 사이드바 접힘 */
.sidebar.collapsed { width: var(--sidebar-collapsed-w); }
.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sf-btn,
.sidebar.collapsed .ss-text,
.sidebar.collapsed .ss-update,
.sidebar.collapsed .ss-countdown { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px 0; }
.sidebar.collapsed .sidebar-logo { justify-content: center; padding: 16px 0; }

/* =============================================
   MAIN WRAP
   ============================================= */
.main-wrap {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    transition: margin-left var(--transition);
    min-width: 0;
    position: relative;
}
.main-wrap.sidebar-collapsed { margin-left: var(--sidebar-collapsed-w); }

/* =============================================
   TOP BAR
   ============================================= */
.topbar {
    height: var(--topbar-h);
    background: rgba(7,9,15,.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; gap: 12px;
    flex-shrink: 0;     /* 높이 고정, 절대 줄지 않음 */
    z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.page-title  { font-size: 15px; font-weight: 800; color: var(--text-primary); }
.page-title i { color: var(--accent-orange); margin-right: 6px; }

.mobile-menu-btn {
    display: none; width: 32px; height: 32px;
    border-radius: var(--radius-sm); background: var(--bg-card2);
    border: 1px solid var(--border); color: var(--text-secondary); font-size: 14px;
    align-items: center; justify-content: center;
}
.topbar-right { display: flex; align-items: center; gap: 8px; }

.search-box { position: relative; display: flex; align-items: center; }
.search-box i { position: absolute; left: 10px; color: var(--text-muted); font-size: 11px; }
.search-box input {
    background: var(--bg-card2); border: 1px solid var(--border);
    border-radius: 20px; padding: 6px 12px 6px 30px;
    color: var(--text-primary); font-size: 12px; width: 180px;
    outline: none; transition: all var(--transition);
}
.search-box input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(59,130,246,.15);
    width: 220px;
}
.search-box input::placeholder { color: var(--text-muted); }

.refresh-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 20px;
    background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.25);
    color: var(--accent-blue); font-size: 12px; font-weight: 700;
    transition: all var(--transition);
}
.refresh-btn:hover { background: rgba(59,130,246,.16); border-color: var(--accent-blue); }
.refresh-btn i.spinning { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toggle-label {
    display: flex; align-items: center; gap: 6px;
    cursor: pointer; font-size: 11px; color: var(--text-secondary); user-select: none;
}
.toggle-label input { display: none; }
.toggle-switch {
    width: 32px; height: 17px; background: var(--border);
    border-radius: 8px; position: relative; transition: background var(--transition);
}
.toggle-switch::after {
    content: ''; position: absolute;
    width: 11px; height: 11px; background: #fff;
    border-radius: 50%; top: 3px; left: 3px;
    transition: transform var(--transition);
}
.toggle-label input:checked + .toggle-switch { background: var(--accent-green); }
.toggle-label input:checked + .toggle-switch::after { transform: translateX(15px); }
.toggle-text { white-space: nowrap; }

/* =============================================
   PAGE CONTAINER
   ============================================= */
/*
  전략: 단순 flex 레이아웃
  main-wrap (flex column, 100vh)
    ├── topbar          (flex-shrink:0, 고정높이)
    ├── page-scroll-wrap (flex:1, min-height:0, 남은공간)
    └── footer          (flex-shrink:0, 고정높이)

  - 대시보드: overflow:hidden → 내부 cat-coin-list / style-coin-list 각각 스크롤
  - 전체/섹터: scroll-mode → page-scroll-wrap 전체 스크롤
*/
.page-scroll-wrap {
    flex: 1;
    min-height: 0;       /* flex 자식에서 overflow 작동 필수 */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 전체/섹터: 외부 스크롤 허용 */
.page-scroll-wrap.scroll-mode {
    overflow-y: auto;
    overflow-x: hidden;
}
.page-scroll-wrap.scroll-mode::-webkit-scrollbar { width: 5px; }
.page-scroll-wrap.scroll-mode::-webkit-scrollbar-track { background: transparent; }
.page-scroll-wrap.scroll-mode::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
.page-scroll-wrap.scroll-mode::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

/* 공통 페이지 */
.page {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* 전체/섹터: 콘텐츠가 늘어날 수 있도록 */
.page-scroll-wrap.scroll-mode .page {
    flex: none;
    min-height: 0;
    overflow: visible;
}

/* scroll-mode에서 table-card는 남은 공간 대신 자연 높이 */
.page-scroll-wrap.scroll-mode .table-card {
    flex: none;
    min-height: calc(100vh - var(--topbar-h) - var(--footer-h) - 120px);
}

/* 대시보드 */
#pageDashboard {
    overflow: hidden;
}

/* 전체/섹터: table-card가 남은 공간 채움 */
#pageAll, #pageSectors {
    overflow: hidden;
}

.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px; gap: 10px;
}
.section-title {
    font-size: 15px; font-weight: 800; color: var(--text-primary);
    display: flex; align-items: center; gap: 7px;
}
.section-title i { color: var(--accent-orange); }

/* =============================================
   로딩 / 에러
   ============================================= */
.loading-overlay, .error-overlay {
    position: fixed;
    top: var(--topbar-h);   /* topbar 아래부터 시작 */
    left: var(--sidebar-w);
    right: 0;
    bottom: var(--footer-h);
    background: rgba(7,9,15,.92);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 16px; z-index: 200;
    backdrop-filter: blur(4px);
}
.loading-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.loading-spinner { position: relative; width: 64px; height: 64px; }
.spinner-ring {
    position: absolute; inset: 0; border-radius: 50%;
    border: 3px solid transparent;
    animation: spinRing 1.4s ease-in-out infinite;
}
.spinner-ring:nth-child(1) { border-top-color: var(--accent-blue);   animation-duration: .9s; }
.spinner-ring:nth-child(2) { inset: 8px; border-right-color: var(--accent-green);  animation-duration: 1.3s; animation-direction: reverse; }
.spinner-ring:nth-child(3) { inset: 16px; border-bottom-color: var(--accent-purple); animation-duration: 1.7s; }
@keyframes spinRing { to { transform: rotate(360deg); } }
.loading-text { font-size: 16px; font-weight: 700; }
.loading-sub  { font-size: 12px; color: var(--text-secondary); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.4} }

.error-overlay { gap: 12px; }
.error-title { font-size: 17px; font-weight: 800; }
.error-msg   { font-size: 13px; color: var(--text-secondary); text-align: center; white-space: pre-line; }
.retry-btn {
    padding: 8px 20px; border-radius: 20px;
    background: rgba(239,68,68,.1); border: 1px solid var(--accent-red);
    color: var(--accent-red); font-size: 12px; font-weight: 700;
    transition: all var(--transition);
}
.retry-btn:hover { background: rgba(239,68,68,.2); }

/* =============================================
   STATS ROW  — 좌우 스크롤 없이 한 줄 핏
   ============================================= */
.stats-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 14px;
    flex-shrink: 0;  /* 대시보드에서 높이 고정 */
}
.stat-card {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex; align-items: center; gap: 12px;
    transition: all var(--transition);
}
.stat-card:hover { border-color: var(--border2); }
.stat-icon {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.stat-icon.green  { background: rgba(16,185,129,.12);  color: var(--accent-green); }
.stat-icon.red    { background: rgba(239,68,68,.12);   color: var(--accent-red); }
.stat-icon.yellow { background: rgba(245,158,11,.12);  color: var(--accent-yellow); }
.stat-icon.blue   { background: rgba(59,130,246,.12);  color: var(--accent-blue); }
.stat-val { font-size: 20px; font-weight: 900; line-height: 1.1; }
.stat-lbl { font-size: 10px; color: var(--text-secondary); margin-top: 2px; white-space: nowrap; }

/* =============================================
   활성 섹터 배너
   ============================================= */
.active-sector-banner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid;
    margin-bottom: 10px; flex-wrap: wrap; gap: 8px;
}
.active-sector-info  { display: flex; align-items: center; gap: 8px; }
.active-sector-emoji { font-size: 16px; }
.active-sector-name  { font-size: 13px; font-weight: 800; }
.active-sector-count { font-size: 11px; color: var(--text-secondary); background: rgba(255,255,255,.06); border-radius: 6px; padding: 2px 7px; }
.clear-sector-btn {
    display: flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 12px;
    background: transparent; border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 11px; font-weight: 600;
    transition: all var(--transition);
}
.clear-sector-btn:hover { border-color: var(--accent-red); color: var(--accent-red); background: rgba(239,68,68,.07); }

/* =============================================
   TOP 3 카드 (레거시)
   ============================================= */
.top3-section { margin-bottom: 16px; }
.top3-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.top3-card {
    background: var(--bg-card2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px 18px;
    position: relative; overflow: hidden;
    transition: all var(--transition);
}
.top3-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.top3-card.gold   { border-color: rgba(245,158,11,.3); background: linear-gradient(135deg,rgba(245,158,11,.06),transparent); }
.top3-card.silver { border-color: rgba(192,192,192,.25); }
.top3-card.bronze { border-color: rgba(205,127,50,.25); }
.top3-bg { position: absolute; top:-12px; right:-8px; font-size:80px; opacity:.05; transform:rotate(-15deg); pointer-events:none; }
.top3-medal  { font-size: 32px; line-height: 1; margin-bottom: 7px; }
.top3-symbol { font-size: 22px; font-weight: 900; color: var(--text-primary); margin-bottom: 3px; }
.top3-sector { font-size: 11px; margin-bottom: 7px; }
.top3-score  { font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.top3-stats  { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 10px; }
.top3-stat   { background: rgba(255,255,255,.03); border-radius: 6px; padding: 6px 9px; }
.top3-stat span   { display: block; font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.top3-stat strong { display: block; font-size: 12px; font-weight: 800; margin-top: 2px; }
.top3-signals { display: flex; gap: 3px; flex-wrap: wrap; margin-bottom: 10px; }
.top3-link {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px; border-radius: 7px;
    background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.25);
    color: var(--accent-blue); font-size: 11px; font-weight: 700;
    transition: all var(--transition);
}
.top3-link:hover { background: rgba(59,130,246,.2); }

/* =============================================
   스코어 정보 바
   ============================================= */
.score-info-bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--bg-card2); border: 1px solid var(--border);
    border-left: 3px solid var(--accent-blue);
    border-radius: var(--radius); padding: 9px 14px;
    margin-bottom: 12px; font-size: 11px;
}
.sib-title { color: var(--accent-blue); font-weight: 700; }
.sib-item  { display: flex; align-items: center; gap: 4px; color: var(--text-secondary); }
.sib-dot   { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.sib-dot.blue   { background: var(--accent-blue); }
.sib-dot.green  { background: var(--accent-green); }
.sib-dot.orange { background: var(--accent-orange); }
.sib-dot.purple { background: var(--accent-purple); }
.sib-note { color: var(--text-muted); font-size: 10px; margin-left: auto; }

/* =============================================
   TABLE CARD
   ============================================= */
.table-card {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;   /* flex 컨테이너 안에서 인식되도록 */
    flex: 1;
}
.table-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; border-bottom: 1px solid var(--border);
    font-size: 11px; color: var(--text-secondary);
    flex-shrink: 0;
}
.table-count { font-weight: 700; color: var(--text-primary); }
.table-hint  { color: var(--text-muted); font-size: 10px; }
.table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    /* 테이블 전용 스크롤바 */
}
.table-wrap::-webkit-scrollbar { width: 5px; height: 5px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

.coin-table { width: 100%; border-collapse: collapse; }
.coin-table thead { position: sticky; top: 0; z-index: 10; }
.coin-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 10px; font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .06em;
    background: #0a0e18;   /* thead 배경 고정 (blur 문제 방지) */
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    user-select: none;
}
.coin-table th.sortable { cursor: pointer; transition: color var(--transition); }
.coin-table th.sortable:hover { color: var(--accent-blue); }
.coin-table th.active   { color: var(--accent-blue); }
.coin-table th i        { font-size: 9px; margin-left: 3px; }

.coin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(28,38,64,.5);
    vertical-align: middle;
    white-space: nowrap;
}
.coin-table tbody tr { transition: background var(--transition); }
.coin-table tbody tr:hover { background: rgba(59,130,246,.04); }
.coin-table tbody tr:last-child td { border-bottom: none; }
.coin-table tbody tr.rank-1 { background: rgba(245,158,11,.03); }
.coin-table tbody tr.rank-2 { background: rgba(148,163,184,.02); }
.coin-table tbody tr.rank-3 { background: rgba(180,100,30,.02); }

/* 랭크 */
.td-rank  { text-align: center; width: 40px; font-size: 12px; font-weight: 700; color: var(--text-muted); }
.rank-medal { font-size: 16px; }

/* 코인 셀 */
.coin-cell { display: flex; align-items: center; gap: 9px; }
.coin-icon {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-hover); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 700; color: var(--accent-blue);
    overflow: hidden; flex-shrink: 0;
}
.coin-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.coin-name { font-size: 13px; font-weight: 800; color: var(--text-primary); display: flex; align-items: center; gap: 4px; }
.coin-pair { font-size: 10px; color: var(--text-muted); }

/* 섹터 뱃지 */
.sector-badge {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 8px; border-radius: 8px; border: 1px solid;
    font-size: 10px; font-weight: 600; white-space: nowrap;
    cursor: pointer; transition: all var(--transition);
}
.sector-badge:hover { filter: brightness(1.25); }

/* 스코어 */
.score-wrap    { display: flex; align-items: center; gap: 7px; min-width: 100px; }
.score-num     { font-size: 15px; font-weight: 900; min-width: 28px; }
.score-bar-bg  { flex: 1; height: 4px; background: var(--bg-base); border-radius: 2px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 2px; transition: width .7s ease; }
.score-bar-fill.excellent { background: linear-gradient(90deg,#ef4444,#f97316,#f59e0b); }
.score-bar-fill.good      { background: linear-gradient(90deg,#f97316,#f59e0b); }
.score-bar-fill.average   { background: linear-gradient(90deg,#3b82f6,#10b981); }
.score-bar-fill.low       { background: var(--text-muted); }

/* 가격 */
.td-price { font-size: 13px; font-weight: 700; }

/* 시그널 뱃지 */
.signal-badges { display: flex; gap: 3px; flex-wrap: wrap; max-width: 160px; }
.signal-badge {
    padding: 2px 6px; border-radius: 5px;
    font-size: 9px; font-weight: 700; white-space: nowrap; border: 1px solid;
}
.signal-badge.vol   { background: rgba(59,130,246,.13);  color: #60a5fa; border-color: rgba(59,130,246,.3); }
.signal-badge.pump  { background: rgba(239,68,68,.13);   color: #f87171; border-color: rgba(239,68,68,.3); }
.signal-badge.rsi   { background: rgba(16,185,129,.13);  color: #34d399; border-color: rgba(16,185,129,.3); }
.signal-badge.oi    { background: rgba(139,92,246,.13);  color: #a78bfa; border-color: rgba(139,92,246,.3); }
.signal-badge.break { background: rgba(245,158,11,.13);  color: #fbbf24; border-color: rgba(245,158,11,.3); }
.signal-badge.hot   { background: rgba(249,115,22,.13);  color: #fb923c; border-color: rgba(249,115,22,.3); }

/* 차트 버튼 */
.chart-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 7px;
    background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.2);
    color: var(--accent-blue); font-size: 12px;
    transition: all var(--transition);
}
.chart-btn:hover { background: rgba(59,130,246,.22); transform: translateY(-1px); }

/* =============================================
   FOOTER
   ============================================= */
.footer {
    flex-shrink: 0;          /* main-wrap 하단 고정 */
    height: var(--footer-h);
    padding: 0 20px;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 6px;
    font-size: 10px; color: var(--text-muted);
    background: var(--bg-base);
    z-index: 10;
}

/* =============================================
   반응형
   ============================================= */
@media (max-width: 1400px) {
    .stats-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
    .stats-row { grid-template-columns: repeat(3, 1fr); }
    .top3-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    :root { --sidebar-w: 60px; }
    .sidebar-logo-text, .nav-section-label,
    .nav-item span, .nav-badge, .sf-btn,
    .ss-text, .ss-update, .ss-countdown { display: none; }
    .nav-item { justify-content: center; padding: 10px 0; }
    .sidebar-logo { justify-content: center; padding: 16px 0; }
    .mobile-menu-btn { display: flex; }
    .sidebar.mobile-open { width: 240px; }
    .sidebar.mobile-open .sidebar-logo-text,
    .sidebar.mobile-open .nav-section-label,
    .sidebar.mobile-open .nav-item span,
    .sidebar.mobile-open .nav-badge,
    .sidebar.mobile-open .sf-btn,
    .sidebar.mobile-open .ss-text { display: block; }
    .sidebar.mobile-open .nav-item { justify-content: flex-start; padding: 9px 10px; }
    .refresh-text { display: none; }
    .toggle-text  { display: none; }
    .search-box input { width: 130px; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .top3-grid { grid-template-columns: 1fr; }
    .page { padding: 12px 10px; }
    .topbar { padding: 0 12px; }
    /* 모바일에서 덜 중요한 컬럼 숨김 */
    .coin-table th:nth-child(3),
    .coin-table td:nth-child(3),
    .coin-table th:nth-child(8),
    .coin-table td:nth-child(8),
    .coin-table th:nth-child(9),
    .coin-table td:nth-child(9) { display: none; }
}
