/* ============================================================
   股票策略跟踪优化工具 - Behance 风格现代化设计
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
    /* 基础背景 */
    --bg-deep: #090b10;
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-elevated: #1c2128;
    --bg-card: #21262d;
    --bg-card-hover: #282e38;
    --bg-input: #0d1117;

    /* 边框 */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(56, 189, 248, 0.3);

    /* 文字 */
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #484f58;

    /* 主色调 - 青色/蓝色渐变 */
    --accent-primary: #38bdf8;
    --accent-secondary: #818cf8;
    --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --accent-dim: rgba(56, 189, 248, 0.12);

    /* 功能色 - A股习惯：红涨绿跌 */
    --up: #ef4444;
    --up-dim: rgba(239, 68, 68, 0.15);
    --up-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --down: #22c55e;
    --down-dim: rgba(34, 197, 94, 0.15);
    --down-gradient: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    --warn: #fbbf24;
    --warn-dim: rgba(251, 191, 36, 0.15);

    /* 紫色强调 */
    --purple: #a78bfa;
    --purple-dim: rgba(167, 139, 250, 0.15);

    /* 字体 */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(56, 189, 248, 0.15);

    /* 过渡 */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* 间距系统 */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 20px;
    --space-xl: 24px;
    --space-2xl: 32px;
}

/* ---- Base Reset ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- App Layout ---- */
.app-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: auto 1fr;
    height: 100vh;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 var(--space-2xl);
    overflow: hidden;
}

/* ---- Header ---- */
.app-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    gap: var(--space-xl);
    flex-wrap: wrap;
    position: relative;
}

.app-header::after {
    display: none;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.app-logo svg {
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.4));
}

.stock-header-bar {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-default);
    color: var(--text-primary);
}

.header-btn:active {
    transform: translateY(1px);
}

.header-btn svg {
    flex-shrink: 0;
}

/* ---- Sidebar ---- */
.sidebar {
    padding: var(--space-md) var(--space-xl) var(--space-lg) 0;
    border-right: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

#watchListArea {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sidebar::before {
    display: none;
}

/* ---- Main Content ---- */
.main-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.main-content-fixed {
    padding: var(--space-lg) var(--space-xl) 0 var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    flex-shrink: 0;
}

.main-content-scroll {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: 0 var(--space-xl) var(--space-2xl) var(--space-xl);
    overflow-y: auto;
    min-height: 0;
}

/* ---- Section Spacing ---- */
.section {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xs) 0;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.section-title-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.section-title::before {
    display: none;
}

/* ---- Card Base ---- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    position: relative;
    transition: all var(--transition-normal);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    border-color: var(--border-default);
}

.card-header {
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.card-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.card-header .strategy-select {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--border-default);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    min-width: 160px;
    margin-left: 15px;
}

.card-header-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

/* ---- Search Bar ---- */
.search-bar {
    position: relative;
    width: 320px;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: hidden;
    transition: all var(--transition-normal);
    border-bottom: 1px solid var(--border-subtle);
}

.search-input-wrap:focus-within {
    border-color: var(--accent-primary);
    box-shadow: none;
}

.search-icon {
    width: 18px;
    height: 18px;
    margin: 0 var(--space-sm);
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.88rem;
    padding: 10px 0;
    min-width: 0;
}

.search-input-wrap input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: transparent;
    border: none;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.82rem;
    padding: 0 var(--space-sm);
    height: 32px;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.search-btn:hover {
    color: var(--accent-secondary);
    filter: none;
    transform: none;
}

/* ---- Stock Header Info ---- */
#stockHeader {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    background: transparent;
    border-radius: 0;
    border: none;
    position: relative;
    overflow: visible;
}

#stockHeader::before {
    display: none;
}

.stock-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
}

.stock-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.stock-code {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.stock-price {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    margin-left: auto;
}

.price-main {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.price-change {
    font-size: 0.88rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
}

.price-change.up {
    background: var(--up-dim);
    color: var(--up);
}

.price-change.down {
    background: var(--down-dim);
    color: var(--down);
}

/* ---- Sidebar Components ---- */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 12px 0;
}

.sidebar-header:first-child {
    padding-top: 0;
}

.sidebar-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.badge {
    background: transparent;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    border: none;
}

/* ---- Watch List ---- */
.watchlist-card {
    margin: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.watchlist-card .card-header {
    display: none;
}

.watchlist-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.watchlist-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    min-height: 0;
}

.watchlist-holdings-section {
    padding: 12px 12px 8px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(251, 191, 36, 0.05);
}

.watchlist-section-header {
    display: flex;
    align-items: center;
    padding: 4px 0 8px;
}

.watchlist-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--warn);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.watchlist-section-title::before {
    content: '◆';
    font-size: 0.6rem;
    color: var(--warn);
}

.holdings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.holding-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.holding-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-default);
}

.holding-card.active {
    background: rgba(251, 191, 36, 0.12);
    border-color: var(--warn);
}

.hc-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 4px;
}

.hc-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.hc-name.holding {
    color: var(--warn);
    font-weight: 700;
}

.hc-advice {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 3px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.hc-advice.buy {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}

.hc-advice.sell {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.hc-advice.position {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.hc-advice.observe {
    background: rgba(107, 114, 128, 0.15);
    color: var(--text-muted);
}

.hc-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.hc-code {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.hc-price {
    font-weight: 600;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.hc-change-badge {
    font-size: 0.65rem;
    font-weight: 600;
    font-family: var(--font-mono);
    padding: 1px 4px;
    border-radius: 2px;
}

.hc-change-badge.up {
    background: var(--up-dim);
    color: var(--up);
}

.hc-change-badge.down {
    background: var(--down-dim);
    color: var(--down);
}

.hc-data {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.hc-profit {
    font-weight: 600;
    font-size: 0.7rem;
}

.hc-profit.profit {
    color: var(--up);
}

.hc-profit.loss {
    color: var(--down);
}

.hc-remove,
.hc-move {
    background: none;
    border: none;
    color: transparent;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    opacity: 0;
    flex-shrink: 0;
    position: absolute;
    top: 6px;
}

.hc-move {
    right: 28px;
}

.hc-remove {
    right: 6px;
}

.holding-card:hover .hc-remove,
.holding-card:hover .hc-move {
    opacity: 1;
    color: var(--text-muted);
}

.hc-remove:hover {
    color: var(--down);
    background: transparent;
}

.hc-move:hover {
    color: var(--accent-primary);
    background: transparent;
}

.watchlist-empty {
    padding: var(--space-lg) 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.watchlist-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    gap: 12px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

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

.watchlist-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.watchlist-item.active {
    background: rgba(59, 130, 246, 0.15) !important;
}

.wi-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.wi-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wi-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wi-name.holding {
    color: var(--warn);
    font-weight: 700;
}

.watchlist-item.active .wi-name {
    text-decoration: underline !important;
    text-decoration-color: var(--accent-primary, #3b82f6) !important;
    text-underline-offset: 3px !important;
    text-decoration-thickness: 2px !important;
}

.wi-code {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    white-space: nowrap;
}

.wi-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.wi-price {
    font-weight: 600;
    font-size: 0.88rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
    text-align: right;
    white-space: nowrap;
    min-width: 70px;
}

.wi-change-badge {
    font-size: 0.72rem;
    font-weight: 600;
    font-family: var(--font-mono);
    padding: 2px 6px;
    border-radius: 4px;
    text-align: right;
    white-space: nowrap;
}

.wi-change-badge.up {
    background: var(--up-dim);
    color: var(--up);
}

.wi-change-badge.down {
    background: var(--down-dim);
    color: var(--down);
}

.wi-advice {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
    vertical-align: middle;
    flex-shrink: 0;
}

.wi-advice.buy {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

.wi-advice.sell {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.wi-advice.position {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.wi-advice.observe {
    background: rgba(107, 114, 128, 0.2);
    color: var(--text-muted);
}

.wi-remove,
.wi-move {
    background: none;
    border: none;
    color: transparent;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    opacity: 0;
    flex-shrink: 0;
}

.watchlist-item:hover .wi-remove,
.watchlist-item:hover .wi-move {
    opacity: 1;
    color: var(--text-muted);
}

.wi-remove:hover {
    color: var(--down);
    background: transparent;
}

.wi-move:hover {
    color: var(--accent-primary);
    background: transparent;
}

.wg-move-popup {
    position: fixed;
    z-index: 10000;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 4px 0;
    min-width: 110px;
    backdrop-filter: blur(12px);
}

.wg-mp-item {
    padding: 8px 14px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
}

.wg-mp-item:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.wg-multi-select-popup {
    min-width: 180px;
    padding: 0;
}

.wg-mp-title {
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
}

.wg-mp-list {
    max-height: 240px;
    overflow-y: auto;
    padding: 4px 0;
}

.wg-mp-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
}

.wg-mp-item:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.wg-mp-checkbox {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-default);
    border-radius: 3px;
    font-size: 10px;
    color: var(--bg-card);
    background: var(--bg-input);
    transition: all var(--transition-fast);
}

.wg-mp-item.selected .wg-mp-checkbox {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-card);
}

.wg-mp-name {
    flex: 1;
}

.wg-mp-apply {
    display: block;
    width: 100%;
    padding: 10px;
    border: none;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.wg-mp-apply:hover {
    background: var(--bg-card-hover);
}

/* ---- Signal Summary Bar ---- */
.signal-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.ss-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ss-stats {
    display: flex;
    gap: 8px;
}

.ss-stat {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: var(--font-mono);
}

.ss-stat.buy {
    background: var(--up-dim);
    color: var(--up);
}

.ss-stat.buy.has-signals {
    animation: ssPulse 2s ease-in-out infinite;
}

.ss-stat.sell {
    background: var(--down-dim);
    color: var(--down);
}

.ss-stat.sell.has-signals {
    animation: ssPulse 2s ease-in-out infinite;
}

.ss-stat.observe {
    background: var(--muted-dim);
    color: var(--text-muted);
}

@keyframes ssPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ---- Signal Stock Overlay ---- */
.signal-stock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.signal-stock-dialog {
    background: var(--bg-primary);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
}

.signal-stock-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.signal-stock-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.signal-stock-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
}

.signal-stock-close:hover {
    color: var(--text-primary);
}

.signal-stock-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.signal-stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.signal-stock-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 10px;
    cursor: pointer;
}

.signal-stock-card:hover {
    background: var(--bg-tertiary);
}

.signal-stock-card.buy {
    border-left: 2px solid var(--up);
}

.signal-stock-card.sell {
    border-left: 2px solid var(--down);
}

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

.ssc-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ssc-signal {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    min-width: 28px;
    text-align: center;
}

.signal-stock-card.buy .ssc-signal {
    background: var(--up-dim);
    color: var(--up);
}

.signal-stock-card.sell .ssc-signal {
    background: var(--down-dim);
    color: var(--down);
}

.ssc-code {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ---- Stats Panel ---- */
.stats-panel {
    width: 100%;
    padding: 0;
}

.stats-layout {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2xl);
}

.stats-stock-info {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding-left: var(--space-md);
    margin-right: auto;
}

.stats-stock-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stats-stock-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.stats-stock-code {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.stats-stock-right {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.stock-groups {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
}

.group-tag {
    display: inline-block;
    padding: 1px 6px;
    font-size: 0.65rem;
    color: var(--accent-primary);
    background: var(--accent-dim);
    border: 1px solid var(--border-accent);
    border-radius: 3px;
    white-space: nowrap;
    line-height: 1.2;
}

.stats-price-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
    line-height: 1;
}

.stats-price-change {
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
    padding: 2px 6px;
    border-radius: 4px;
}

.stats-price-change.up {
    color: var(--up);
    background: var(--up-dim);
}

.stats-price-change.down {
    color: var(--down);
    background: var(--down-dim);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    padding: var(--space-xs) 0;
    flex: 1;
    margin-left: auto;
}

.stats-data-area {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    padding: var(--space-xs) 0;
}

.stat-card {
    background: transparent;
    border-radius: 0;
    padding: var(--space-xs) var(--space-md);
    border: none;
    position: relative;
    overflow: hidden;
    transition: background var(--transition-normal);
    text-align: right;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
}

.stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
    font-family: var(--font-mono);
    color: var(--text-primary);
    text-align: right;
}

.stat-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    text-align: right;
}

.stat-value.up {
    color: var(--up);
}

.stat-value.down {
    color: var(--down);
}

.stat-value.neutral {
    color: var(--accent-primary);
}

.stat-note {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.stats-empty {
    padding: var(--space-xl);
    text-align: center;
    color: var(--text-muted);
}

/* ---- Param Panel ---- */
.param-card {
    background: transparent;
    padding: 0;
    border: none;
}

.param-card .card-header {
    padding: var(--space-md) var(--space-lg);
}

.param-card .card-title {
    margin-right: var(--space-md);
}
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--border-default);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    min-width: 160px;
    transition: all var(--transition-fast);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.param-card .strategy-select:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.param-card .strategy-select:focus {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

.param-card .strategy-select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 8px;
}

.param-header-actions {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
    margin-left: auto;
}

.param-header-actions .btn {
    min-width: 90px;
    justify-content: center;
}

.param-section {
    border-top: none;
    padding: var(--space-lg) var(--space-lg) 0;
}

.card-body {
    padding: var(--space-md) var(--space-lg);
}

.param-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 0 0 0 var(--space-sm);
}

.param-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.param-item label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.param-item input,
.param-item select {
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--text-primary);
    font-size: 0.85rem;
    padding: 4px 0;
    outline: none;
    transition: all var(--transition-fast);
    -moz-appearance: textfield;
    font-family: var(--font-mono);
}

.param-item input:hover,
.param-item select:hover {
}

.param-item input:focus,
.param-item select:focus {
    box-shadow: none;
}

.param-item input::-webkit-outer-spin-button,
.param-item input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.param-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.param-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) 0 0;
}

.opt-status {
    font-size: 0.8rem;
    color: var(--up);
    display: flex;
    align-items: center;
    gap: 6px;
}

.opt-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--up);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Checkbox Grid */
.checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    background: transparent;
    border-radius: var(--radius-sm);
    border: none;
    transition: all var(--transition-fast);
}

.checkbox-label:hover {
    background: transparent;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

/* Strategy Selector */
.strategy-selector-row {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.strategy-select {
    cursor: pointer;
    font-family: var(--font);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
    padding: 6px 10px;
    outline: none;
    transition: all var(--transition-fast);
    min-width: 160px;
    margin-left: 15px;
}

.strategy-select:hover {
    border-color: var(--border-default);
}

.strategy-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

.strategy-select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 8px;
}

/* ---- Buttons ---- */
.btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.8rem;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-default);
}

.btn-primary {
    background: var(--accent-primary);
    border: none;
    color: var(--bg-primary);
    font-weight: 600;
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    border-color: var(--border-default);
    background: var(--bg-elevated);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    font-weight: 600;
}

.btn-success:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ---- Data Table ---- */
.datatable-wrapper {
    width: 100%;
    background: transparent;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--border-subtle);
    overflow: visible;
}

.dt-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    gap: var(--space-md);
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
}

.dt-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.dt-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.dt-title::before {
    content: '';
    width: 3px;
    height: 14px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.dt-filter-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.dt-search {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
    padding: 8px var(--space-sm);
    outline: none;
    width: 150px;
    transition: all var(--transition-fast);
}

.dt-search:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.1);
}

.dt-search::placeholder {
    color: var(--text-muted);
}

.table-scroll {
    overflow-x: auto;
}

.table-scroll::-webkit-scrollbar {
    height: 6px;
}

.table-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.table-scroll::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 3px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.data-table thead {
    background: rgba(22, 27, 34, 0.8);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px var(--space-sm);
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
    font-weight: 600;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color var(--transition-fast);
}

.data-table th.sortable:hover {
    color: var(--accent-primary);
}

.data-table th.num,
.data-table td.num {
    text-align: center;
}

.sort-arrow {
    margin-left: 4px;
    opacity: 0.5;
    font-size: 0.6rem;
}

.data-table td {
    padding: 10px var(--space-sm);
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    vertical-align: middle;
    transition: background var(--transition-fast);
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover td {
    background-color: rgba(56, 189, 248, 0.05);
}

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

.date-cell {
    font-weight: 600;
    color: var(--text-primary) !important;
    text-align: center;
}

/* ---- Status Row Backgrounds (Distinct Colors) ---- */

/* 买入/加仓 - 蓝色背景 */
.data-table tbody tr.row-buy td {
    background-color: rgba(56, 189, 248, 0.20) !important;
}
.data-table tbody tr.row-buy:hover td {
    background-color: rgba(56, 189, 248, 0.25) !important;
}

/* 加仓 - 浅蓝色背景 */
.data-table tbody tr.row-add td {
    background-color: rgba(56, 189, 248, 0.12) !important;
}
.data-table tbody tr.row-add:hover td {
    background-color: rgba(56, 189, 248, 0.17) !important;
}

/* 满仓 - 深红色背景 */
.data-table tbody tr.row-hold-full td {
    background-color: rgba(239, 68, 68, 0.30) !important;
}
.data-table tbody tr.row-hold-full:hover td {
    background-color: rgba(239, 68, 68, 0.35) !important;
}

/* 持仓 - 红色背景 */
.data-table tbody tr.row-hold td {
    background-color: rgba(239, 68, 68, 0.22) !important;
}
.data-table tbody tr.row-hold:hover td {
    background-color: rgba(239, 68, 68, 0.27) !important;
}

/* 轻仓 - 浅红色背景 */
.data-table tbody tr.row-light td {
    background-color: rgba(239, 68, 68, 0.14) !important;
}
.data-table tbody tr.row-light:hover td {
    background-color: rgba(239, 68, 68, 0.19) !important;
}

/* 减仓 - 橙色背景 */
.data-table tbody tr.row-reduce td {
    background-color: rgba(249, 115, 22, 0.22) !important;
}
.data-table tbody tr.row-reduce:hover td {
    background-color: rgba(249, 115, 22, 0.27) !important;
}

/* 离场 - 浅橙色背景 */
.data-table tbody tr.row-exit td {
    background-color: rgba(249, 115, 22, 0.14) !important;
}
.data-table tbody tr.row-exit:hover td {
    background-color: rgba(249, 115, 22, 0.19) !important;
}

/* 卖出/止损/清仓 - 深红色背景 */
.data-table tbody tr.row-sell td {
    background-color: rgba(239, 68, 68, 0.25) !important;
}
.data-table tbody tr.row-sell:hover td {
    background-color: rgba(239, 68, 68, 0.30) !important;
}

/* 空仓 - 无背景色，仅hover */
.data-table tbody tr.row-empty:hover td {
    background-color: rgba(107, 114, 128, 0.08) !important;
}

/* 观察中 - 灰色背景（14:40前当天数据） */
.data-table tbody tr.row-observing td {
    background-color: rgba(234, 179, 8, 0.15) !important;
}
.data-table tbody tr.row-observing:hover td {
    background-color: rgba(234, 179, 8, 0.22) !important;
}

/* Price Change Colors */
td.up {
    color: var(--up) !important;
}

td.down {
    color: var(--down) !important;
}

td.empty {
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-xl);
}

td.empty-cell {
    text-align: center;
    color: var(--text-muted);
}

/* Badges */
.stage-badge,
.suggestion-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.stage-badge.stage-strong {
    background: var(--up-dim);
    color: var(--up);
}

.stage-badge.stage-weak {
    background: var(--down-dim);
    color: var(--down);
}

.stage-badge.stage-neutral {
    background: var(--accent-dim);
    color: var(--accent-primary);
}

.suggestion-badge.suggest-buy {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

.suggestion-badge.suggest-hold {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.suggestion-badge.suggest-reduce {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.suggestion-badge.suggest-sell {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.suggestion-badge.suggest-watch {
    background: rgba(107, 114, 128, 0.2);
    color: var(--text-muted);
}

.suggestion-badge.suggest-position {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.suggestion-badge.suggest-observe {
    background: rgba(107, 114, 128, 0.2);
    color: var(--text-muted);
}

/* 观察中 - 黄色 */
.suggestion-badge.suggest-observing {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

td.profit-up {
    color: var(--up) !important;
    font-weight: 600;
}

td.profit-down {
    color: var(--down) !important;
    font-weight: 600;
}

.dt-pagination {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--border-subtle);
    font-size: 0.72rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
}

.dt-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    gap: var(--space-md);
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
}

.dt-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.dt-title {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.dt-title::before {
    content: '';
    width: 3px;
    height: 12px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.dt-search {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.75rem;
    padding: 6px var(--space-sm);
    outline: none;
    width: 140px;
    transition: all var(--transition-fast);
}

.dt-search:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.1);
}

.dt-search::placeholder {
    color: var(--text-muted);
}

.table-scroll {
    overflow-x: auto;
}

.table-scroll::-webkit-scrollbar {
    height: 4px;
}

.table-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.table-scroll::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 2px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.data-table thead {
    background: rgba(22, 27, 34, 0.8);
}

.data-table th {
    color: var(--text-muted);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px var(--space-sm);
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
    font-weight: 600;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color var(--transition-fast);
}

.data-table th.sortable:hover {
    color: var(--accent-primary);
}

.data-table th.num,
.data-table td.num {
    text-align: center;
}

.sort-arrow {
    margin-left: 4px;
    opacity: 0.5;
    font-size: 0.6rem;
}

.data-table td {
    padding: 8px var(--space-sm);
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover td {
    background-color: rgba(56, 189, 248, 0.06);
}

/* 移除状态行的 hover 覆盖，保持背景色稳定显示 */

.data-table tbody tr:last-child td {
    border-bottom: none;
}
.chart-card {
    padding-bottom: var(--space-md);
    position: relative;
    overflow: visible;
}

.chart-container {
    position: relative;
    height: 220px;
    padding: 0;
}

.chart-container::before {
    display: none;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    padding: 0 var(--space-lg) var(--space-sm);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-bar {
    width: 16px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-line {
    width: 20px;
    height: 2px;
    border-radius: 1px;
    flex-shrink: 0;
}

.legend-dot {
    transition: transform 0.2s ease;
}

.legend-item:hover .legend-dot {
    transform: scale(1.2);
}

/* ---- Chart Mode Toggle (日K/分时切换) ---- */
.chart-mode-toggle {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.mode-btn {
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.mode-btn.active {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}

/* ---- Intraday Tracker (当日数据追踪) ---- */
.tracker-stats {
    display: flex;
    gap: var(--space-md);
    font-size: 0.8rem;
}

.tracker-stats .stat {
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.tracker-stats .stat.buy {
    color: var(--up);
    background: var(--up-dim);
}

.tracker-stats .stat.sell {
    color: var(--down);
    background: var(--down-dim);
}

.tracker-stats .stat.hold {
    color: var(--warn);
    background: var(--warn-dim);
}

/* 持仓记录栏 - 新设计 */
.tracker-position-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    margin: 0 var(--space-sm) 10px var(--space-sm);
}

.position-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--warn);
    white-space: nowrap;
    padding-bottom: 2px;
    border-bottom: 2px solid var(--warn);
}

.position-badge svg {
    opacity: 0.9;
}

.position-data-grid {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.position-data-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 60px;
}

.position-data-item.position-current .data-value {
    font-size: 1rem;
}

.position-data-item.position-profit-pct .data-value,
.position-data-item.position-profit .data-value {
    font-size: 0.95rem;
}

.data-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.data-value {
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.data-value.profit-up {
    color: var(--up);
}

.data-value.profit-down {
    color: var(--down);
}

.position-actions {
    display: flex;
    gap: 6px;
}

.btn-sell-record {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--down);
    background: transparent;
    color: var(--down);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-sell-record:hover {
    background: var(--down);
    color: white;
}

.btn-position-remove {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-position-remove:hover {
    border-color: var(--down);
    color: var(--down);
}

/* 买入记录栏 */
.tracker-buy-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px var(--space-md);
    margin: 0 var(--space-sm);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.tracker-sell-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px var(--space-md);
    margin: 0 var(--space-sm);
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.sell-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sell-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

#sellPrice {
    width: 100px;
    padding: 6px 10px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 0.85rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

#sellPrice:focus {
    outline: none;
    border-color: var(--down);
}

.btn-sell-confirm {
    padding: 6px 16px;
    background: var(--down);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-sell-confirm:hover {
    background: #dc2626;
}

.buy-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.buy-inputs input {
    width: 80px;
    padding: 6px 8px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-family: var(--font-mono);
    outline: none;
    transition: border-color 0.2s;
}

.buy-inputs input:focus {
    border-color: var(--up);
}

.buy-inputs input::placeholder {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.buy-x, .buy-equals {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.buy-total {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--up);
    font-family: var(--font-mono);
    min-width: 80px;
}

.btn-buy-record {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--up);
    background: var(--up-dim);
    color: var(--up);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-buy-record:hover {
    background: var(--up);
    color: white;
}

.tracker-table-wrap {
    max-height: 320px;
    overflow-y: auto;
    margin: 0 var(--space-sm);
}

.tracker-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

.tracker-table th {
    position: sticky;
    top: 0;
    background: var(--bg-card);
    padding: 8px 6px;
    text-align: right;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.tracker-table th:first-child,
.tracker-table td:first-child {
    text-align: center;
}

.tracker-table td {
    padding: 6px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.tracker-table tr.latest {
    background: rgba(56, 189, 248, 0.1);
}

.tracker-table tr.latest td {
    font-weight: 600;
}

.tracker-table .time-cell {
    color: var(--text-secondary);
}

.tracker-table .price-cell {
    font-weight: 500;
}

.tracker-table .up {
    color: var(--up);
}

.tracker-table .down {
    color: var(--down);
}

.tracker-table .overbought {
    color: #f97316;
}

.tracker-table .oversold {
    color: var(--up);
}

.tracker-table .signal-cell {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.tracker-table .signal-cell.buy {
    background: var(--up-dim);
    color: var(--up);
}

.tracker-table .signal-cell.sell {
    background: var(--down-dim);
    color: var(--down);
}

                .tracker-table .signal-cell.observe {
    background: var(--warn-dim);
    color: var(--warn);
}

.tracker-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.tracker-info {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.btn-clear {
    padding: 4px 12px;
    font-size: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear:hover {
    border-color: var(--down);
    color: var(--down);
}

/* ---- Chart Enhancements ---- */
.chart-card {
    background: transparent;
    transition: all var(--transition-normal);
}

.chart-card:hover {
    background: transparent;
}

.chart-container canvas {
    transition: opacity 0.3s ease;
}

.chart-legend {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-right: 0;
}

/* Tooltip custom styles */
.chartjs-tooltip {
    backdrop-filter: blur(10px);
}

/* ---- Loading & Error ---- */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 11, 16, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.error-toast {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--down);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--down);
    font-size: 0.85rem;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    box-shadow: var(--shadow-lg);
}

.error-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Charts Section ---- */
.charts-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
}

.charts-row {
    display: flex;
    flex-direction: column;
}

/* 统一图表项（去掉独立卡片边框，形成整体感） */
.chart-sync-item {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
    padding: var(--space-md) 0;
    margin-bottom: 0;
    transition: all var(--transition-normal);
    position: relative;
    overflow: visible;
}

.chart-sync-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.chart-sync-item:hover {
    border-color: var(--border-subtle);
    background: transparent;
}

.chart-sync-item::before {
    display: none;
}
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.chart-sync-item:hover::before {
    opacity: 1;
}

/* 联动十字光标线 */
.sync-crosshair-v {
    position: absolute;
    width: 1px;
    background: rgba(56, 189, 248, 0.35);
    pointer-events: none;
    z-index: 200;
    top: 0;
    bottom: 0;
}

.sync-crosshair-line {
    position: absolute;
    height: 1px;
    background: rgba(56, 189, 248, 0.35);
    pointer-events: none;
    z-index: 200;
    left: 0;
    right: 0;
}

@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .charts-section {
        gap: var(--space-md);
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
        padding: var(--space-md);
    }

    .stat-card {
        padding: var(--space-md);
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .param-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.75rem;
    }

    .chart-container {
        height: 200px;
    }
}

/* ---- Cache Notice ---- */
.cache-notice {
    position: fixed;
    top: var(--space-xl);
    right: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-lg);
    color: var(--text-primary);
    font-size: 0.82rem;
    z-index: 9998;
    opacity: 0;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(56, 189, 248, 0.2);
}

.cache-notice.show {
    opacity: 1;
    transform: translateY(0);
}

.cache-notice.success {
    border-color: var(--up);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(52, 211, 153, 0.2);
}

.cache-icon {
    font-size: 1rem;
}

/* ---- Signal Notice (盘中信号提示 - 定时建议机制) ---- */
.signal-notice {
    position: fixed;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-card);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-xl);
    color: var(--text-primary);
    font-size: 0.9rem;
    z-index: 9998;
    opacity: 0;
    transition: all var(--transition-normal);
    pointer-events: none;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(56, 189, 248, 0.25);
    min-width: 320px;
    text-align: center;
}

.signal-notice.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.signal-notice.new-advice {
    animation: advicePulse 0.8s ease;
    border-color: var(--warn);
}

@keyframes advicePulse {
    0% { box-shadow: var(--shadow-lg), 0 0 40px rgba(251, 191, 36, 0.3); }
    50% { box-shadow: var(--shadow-lg), 0 0 80px rgba(251, 191, 36, 0.5); }
    100% { box-shadow: var(--shadow-lg), 0 0 40px rgba(56, 189, 248, 0.25); }
}

.signal-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.signal-phase {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.signal-phase.new {
    color: var(--warn);
    font-weight: 600;
}

.signal-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.countdown-icon {
    font-size: 1rem;
}

.countdown-time {
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.signal-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    font-size: 0.75rem;
    margin: 4px 0;
}

.signal-stats .stat {
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.signal-stats .stat.buy {
    color: var(--up);
    background: var(--up-dim);
}

.signal-stats .stat.sell {
    color: var(--down);
    background: var(--down-dim);
}

.signal-stats .stat.observe {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
}

.signal-realtime {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.signal-realtime .buy { color: var(--up); }
.signal-realtime .sell { color: var(--down); }
.signal-realtime .hold { color: var(--text-muted); }

.signal-action {
    font-weight: 700;
    font-size: 1.2rem;
    padding: 8px 20px;
    border-radius: var(--radius-md);
    margin: 6px 0;
}

.signal-action.buy {
    color: var(--up);
    background: var(--up-dim);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.signal-action.sell {
    color: var(--down);
    background: var(--down-dim);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.signal-action.observe {
    color: var(--warn);
    background: var(--warn-dim);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.action-text {
    display: block;
}

.signal-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
    .app-layout {
        grid-template-columns: 280px 1fr;
        padding: 0 var(--space-lg);
    }
}

@media (max-width: 900px) {
    .app-layout {
        grid-template-columns: 1fr;
        padding: 0 var(--space-md);
    }

    .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        min-height: auto;
        padding-right: 0;
        padding-bottom: var(--space-lg);
    }

    .sidebar::before {
        display: none;
    }

    .watchlist-body {
        max-height: 180px;
    }

    .main-content-fixed,
    .main-content-scroll {
        padding-left: 0;
        padding-right: var(--space-md);
    }

    .search-bar {
        width: 100%;
    }

    .app-header {
        flex-direction: column;
        align-items: stretch;
    }

    .param-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    body {
        padding: var(--space-sm);
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
        padding: var(--space-md);
    }

    .stat-card {
        padding: var(--space-md);
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .param-grid {
        grid-template-columns: 1fr;
    }

}

/* ---- Scrollbars ---- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Hide scrollbar for watchlist body */
.watchlist-body::-webkit-scrollbar {
    display: none;
}
.watchlist-body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Hide scrollbar for main content scroll area */
.main-content-scroll::-webkit-scrollbar {
    display: none;
}
.main-content-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* ---- Background Refresh Notice (后台刷新提示) ---- */
.bg-refresh-notice {
    position: fixed;
    top: 70px;
    right: var(--space-xl);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    opacity: 0;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    z-index: 1001;
    box-shadow: var(--shadow-md);
}

.bg-refresh-notice.show {
    opacity: 1;
    transform: translateY(0);
}

.bg-refresh-notice .bg-icon {
    font-size: 1rem;
}

/* ---- Suggestions Box ---- */
.suggestions-box {
    position: absolute;
    top: calc(100% + var(--space-sm));
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    max-height: 320px;
    overflow-y: auto;
    backdrop-filter: blur(20px);
}

.suggestions-box::-webkit-scrollbar {
    width: 4px;
}

.suggestions-box::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 2px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px var(--space-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    font-size: 0.85rem;
}

.suggestion-item:hover {
    background: var(--bg-elevated);
}

.si-code {
    color: var(--text-muted);
    font-size: 0.72rem;
    min-width: 60px;
    font-family: var(--font-mono);
}

.si-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.si-price {
    font-weight: 600;
    font-family: var(--font-mono);
}

.si-change {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 60px;
    text-align: right;
    font-family: var(--font-mono);
}

.si-change.up {
    color: var(--up);
}

.si-change.down {
    color: var(--down);
}

.suggestion-empty,
.suggestion-loading {
    padding: var(--space-sm) var(--space-md);
    color: var(--text-muted);
    font-size: 0.82rem;
    text-align: center;
}

/* ---- Strategy Toast Animations ---- */
@keyframes toastFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* ---- Canvas Width Adjustments ---- */
#rsiChartCanvas {
    width: 1349px !important;
}

#cumChartCanvas {
    width: 1336px !important;
    padding-left: 0px;
    padding-right: 45px;
}

#posChartCanvas {
    width: 1340px !important;
    padding-right: 48px;
}

/* ---- Watchlist Group Management ---- */

.wg-mgr-btn {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 14px; letter-spacing: 2px;
    padding: 0 4px; line-height: 1; border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}
.wg-mgr-btn:hover {
    color: var(--text-primary); background: var(--bg-elevated);
}

.wg-search-bar {
    position: relative; padding: 6px 12px;
}
.wg-search-input {
    width: 100%; padding: 6px 10px;
    border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
    background: var(--bg-elevated); color: var(--text-primary);
    font-size: 0.78rem; outline: none; box-sizing: border-box;
    transition: border-color var(--transition-fast);
}
.wg-search-input:focus { border-color: var(--accent-primary); }
.wg-search-input::placeholder { color: var(--text-muted); }

.watchlist-group {
    border-bottom: 1px solid var(--border-subtle);
}

.wg-header {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; cursor: pointer; user-select: none;
    transition: background var(--transition-fast);
}
.wg-header:hover { background: var(--bg-elevated); }
.wg-header.collapsed { border-bottom: none; }

.wg-toggle {
    font-size: 0.6rem; color: var(--text-muted);
    width: 14px; text-align: center; flex-shrink: 0;
}
.wg-name {
    font-size: 0.82rem; font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    flex: 1; min-width: 0;
}
.wg-count {
    font-size: 0.7rem; color: var(--text-muted);
    background: var(--bg-elevated); padding: 0 6px;
    border-radius: 8px; flex-shrink: 0; font-weight: 500;
}

.wg-body { overflow: hidden; }

.wg-no-match {
    padding: 8px 12px 8px 32px;
    font-size: 0.75rem; color: var(--text-muted); font-style: italic;
}

/* Management overlay */
.wg-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    z-index: 9999; display: flex; align-items: center;
    justify-content: center; backdrop-filter: blur(4px);
}
.wg-dialog {
    background: var(--bg-card); border: 1px solid var(--border-default);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
    width: 320px; max-width: 90vw;
}
.wg-dialog-hd {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-bottom: 1px solid var(--border-subtle);
    font-size: 0.92rem; font-weight: 600; color: var(--text-primary);
}
.wg-dialog-close {
    background: none; border: none; color: var(--text-muted);
    font-size: 1rem; cursor: pointer; padding: 2px 6px;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}
.wg-dialog-close:hover {
    color: var(--text-primary); background: var(--bg-elevated);
}
.wg-dialog-bd {
    padding: 10px 14px 14px; overflow-y: auto; max-height: 60vh;
}

.wg-gitem {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 8px; border-bottom: 1px solid var(--border-subtle);
}
.wg-gitem:last-child { border-bottom: none; }
.wg-gname {
    flex: 1; background: none; border: 1px solid transparent;
    color: var(--text-primary); font-size: 0.85rem;
    padding: 3px 4px; border-radius: var(--radius-sm);
    outline: none; min-width: 0;
}
.wg-gname:focus { border-color: var(--accent-primary); }
.wg-gname:disabled { opacity: 0.6; cursor: not-allowed; }
.wg-gcount {
    font-size: 0.72rem; color: var(--text-muted); white-space: nowrap;
}
.wg-gdel {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 0.9rem; padding: 2px 5px;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}
.wg-gdel:hover {
    color: var(--down); background: var(--bg-elevated);
}

.wg-btn {
    display: block; width: calc(100% - 28px); margin: 0 14px 14px;
    padding: 7px; background: none; border: 1px dashed var(--border-default);
    color: var(--text-secondary); font-size: 0.82rem;
    border-radius: var(--radius-md); cursor: pointer;
    transition: all var(--transition-fast);
}
.wg-btn:hover {
    border-color: var(--accent-primary); color: var(--accent-primary);
    background: var(--bg-elevated);
}
