/* =========================================
   全局设计系统 (Design System)
   极简深空灰配色、高级毛玻璃、金融级高对比
   ========================================= */

:root {
    /* 默认深色主题 (Dark Mode) */
    --bg-color: #0b0c10;
    --card-bg: #1f2833;
    --card-bg-hover: #2b3746;
    --text-primary: #ffffff;
    --text-secondary: #8b9bb4;
    --text-muted: #5e6c84;
    --color-profit: #00ffaa;
    --color-loss: #ef5350;
    --color-accent: #66fcf1;
    --border-color: rgba(255, 255, 255, 0.05);
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.4);
    --transition-speed: 0.3s;
    --radius-lg: 20px;
    --radius-md: 12px;
    --glass-bg: rgba(11, 12, 16, 0.7);
    --tag-percent-color: #ffffff; /* 深色模式保持纯白 */
}

[data-theme="light"] {
    /* 浅色主题 (Light Mode) */
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --card-bg-hover: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --color-profit: #059669; /* 深一点的绿 */
    --color-loss: #dc2626;   /* 深一点的红 */
    --color-accent: #0891b2; /* 深一点的青 */
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(240, 242, 245, 0.8);
    --tag-percent-color: var(--text-primary); /* 浅色模式自适应深色 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background-color var(--transition-speed);
    min-height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 768px; /* 移动端优先，限制最大宽度 */
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* =========================================
   Typography (排版与文字)
   ========================================= */
.text-profit { color: var(--color-profit) !important; }
.text-loss { color: var(--color-loss) !important; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; }

/* =========================================
   Header (毛玻璃头部导航)
   ========================================= */
.glass-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 24px 20px 0;
}

.header-title h1 {
    font-size: 26px;
    background: linear-gradient(135deg, #fff 0%, #8b9bb4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-title .subtitle {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-top: 4px;
    display: block;
}

.nav-tabs {
    display: flex;
    justify-content: space-between; /* 左右两端对齐 */
    align-items: center;
    gap: 10px;
    margin-top: 24px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    padding-bottom: 12px;
    position: relative;
    cursor: pointer;
    transition: color var(--transition-speed);
}

.tab-btn.active {
    color: var(--text-primary);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width var(--transition-speed) ease;
    border-radius: 2px 2px 0 0;
}

.tab-btn.active::after {
    width: 100%;
}

.badge {
    background: var(--color-loss);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
    vertical-align: middle;
}

.theme-toggle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 18px;
}

[data-theme="light"] .theme-toggle {
    background: transparent;
}

.theme-toggle:active {
    transform: scale(0.9);
}

/* =========================================
   Page Views & General Layout
   ========================================= */
.content-area {
    padding: 20px;
}

.page-view {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.page-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 500;
    padding-left: 4px;
}

/* =========================================
   自定义时间筛选器 (Date Picker)
   ========================================= */
.date-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    background-color: var(--card-bg);
    padding: 4px 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.date-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    flex: 1;
    width: 100%;
}

/* 适配暗色模式日历图标 */
.date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.6;
    cursor: pointer;
}

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

.filter-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #00f2ff, #006aff);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.1s;
    box-shadow: 0 4px 12px rgba(0, 242, 255, 0.3);
    user-select: none;
    -webkit-user-select: none;
}

/* 强制按下态 (用于 JS 触发) */
.filter-btn.btn-pressed, .filter-btn:active {
    transform: scale(0.92) !important;
    opacity: 0.7 !important;
    box-shadow: 0 2px 6px rgba(0, 242, 255, 0.2);
}

.filter-btn:disabled {
    background: #444;
    color: #777;
    cursor: not-allowed;
    box-shadow: none;
}

/* =========================================
   Metrics Grid (指标方块)
   ========================================= */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.metric-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 90px;
}

.metric-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.metric-value .unit {
    font-size: 12px;
    font-weight: 500;
    margin-left: 2px;
    color: var(--text-secondary);
}

/* =========================================
   Charts
   ========================================= */
.chart-card {
    margin-bottom: 24px;
}

.card-header h2 {
    font-size: 16px;
    color: var(--text-primary);
}

.card-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.chart-container {
    width: 100%;
    height: 250px;
    margin-top: 16px;
}

.mt-4 { margin-top: 24px; }

/* =========================================
   打标池 (Trade Pool) - 4大标签按钮
   ========================================= */
.pool-header {
    margin-bottom: 24px;
}

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

.trade-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 12px;
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: var(--shadow-soft);
}

.trade-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.trade-symbol {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trade-type {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.type-buy { background: rgba(38, 166, 154, 0.2); color: var(--color-profit); }
.type-sell { background: rgba(239, 83, 80, 0.2); color: var(--color-loss); }

.trade-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.trade-pnl {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 18px;
    font-weight: 700;
}

/* 打标区域 */
.tag-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tag-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tag-row-title {
    font-size: 12px;
    color: var(--text-secondary);
    width: 45px;
    flex-shrink: 0;
    font-weight: 500;
}

.tag-actions {
    display: flex;
    gap: 8px;
    flex: 1;
}

.action-btn {
    flex: 1;
    padding: 10px 4px;
    border-radius: 8px;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.emotion-btn {
    background: rgba(239, 83, 80, 0.1);
    color: var(--color-loss);
    border: 1px solid rgba(239, 83, 80, 0.3);
}

.emotion-btn:active { background: rgba(239, 83, 80, 0.4); }

.system-btn {
    background: rgba(102, 252, 241, 0.1);
    color: var(--color-accent);
    border: 1px solid rgba(102, 252, 241, 0.3);
}

.system-btn:active { background: rgba(102, 252, 241, 0.4); }

/* =========================================
   盘面战力对比 (直觉化图表配套)
   ========================================= */
.session-quick-stats {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background: transparent;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.q-stat {
    font-size: 13px;
    color: #8b9bb4;
}

.q-stat b {
    color: var(--text-primary);
    margin-left: 5px;
    font-family: 'Inter', monospace;
}

/* 调整头部导航区内的日期选择器间距 */
header .date-filter-bar {
    margin-top: 20px;
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

/* =========================================
   交易明细流水 (History List)
   ========================================= */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform var(--transition-speed);
}

.history-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-asset {
    display: flex;
    align-items: center;
    gap: 10px;
}

.asset-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.history-pnl {
    font-size: 20px;
    font-weight: 800;
    font-family: 'Inter', monospace;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.meta-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-col:nth-child(2) { align-items: center; }
.meta-col:nth-child(3) { align-items: flex-end; }

.meta-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.meta-value {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: 'Inter', monospace;
    font-weight: 600;
}

.history-tag {
    display: flex;
    align-items: center;
    margin-top: 4px;
}

.tag-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 16px;
    display: inline-block;
    border: 1px solid transparent;
}

.tag-sys {
    background: rgba(102, 252, 241, 0.1);
    color: var(--color-accent);
    border-color: rgba(102, 252, 241, 0.2);
}

.tag-emo {
    background: rgba(239, 83, 80, 0.1);
    color: var(--color-loss);
    border-color: rgba(239, 83, 80, 0.2);
}

.tag-none {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.1);
    font-style: italic;
}

.untagged-card {
    border-color: rgba(255, 255, 255, 0.1);
    opacity: 0.85;
}
/* =========================================
   交易系统一致性看板样式
   ========================================= */
.tag-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 10px;
}

.tag-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px;
    transition: transform 0.2s;
}

.tag-stat-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.05);
}

.tag-stat-card.t-out {
    border-left: 4px solid #ef5350;
    background: rgba(239, 83, 80, 0.05);
}

.tag-stat-card.t-in {
    border-left: 4px solid #00ffaa;
}

.t-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.t-main {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.t-pnl {
    font-size: 18px;
    font-family: 'Inter', monospace;
    font-weight: 700;
}

.t-wr {
    font-size: 12px;
    color: #8b9bb4;
}

.t-count {
    font-size: 11px;
    color: var(--text-muted);
}

/* 打标卡片按钮调优 */
.danger-btn {
    background: rgba(239, 83, 80, 0.1);
    color: #ef5350;
    border: 1px solid rgba(239, 83, 80, 0.3);
}

.danger-btn:hover {
    background: #ef5350;
    color: #fff;
}
/* 打标卡片重构样式 */
.trade-vol, .history-vol {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: #8b9bb4;
    margin-left: 8px;
    font-family: 'Inter', monospace;
}

.trade-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.trade-mini-details {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 4px 0;
    margin-bottom: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mini-item {
    color: var(--color-accent); /* 时间现在是高亮色 */
}

.mini-item span {
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 4px;
    border-radius: 3px;
    margin-right: 4px;
    color: var(--text-primary);
    font-weight: 700;
}

.mini-item i.p {
    color: #5e6c84; /* 价格现在是辅助色 */
    font-style: normal;
    margin-left: 3px;
}

.tag-row-top {
    width: 100%;
    margin-bottom: 10px;
}

.washout-toggle {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    color: #8b9bb4;
    padding: 8px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    text-align: center;
}

.washout-toggle.active {
    background: rgba(239, 83, 80, 0.15);
    border: 1px solid #ef5350;
    color: #ef5350;
    font-weight: bold;
}

.tag-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}

.tag-buttons-grid .action-btn {
    padding: 10px 5px;
    font-size: 12px;
    border-radius: 8px;
    text-align: center;
}

/* 高密度历史流水样式 - 强制单行 */
.history-card-compact {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    gap: 8px;
    white-space: nowrap;
}

.history-card-compact:hover {
    background: rgba(255, 255, 255, 0.03);
}

.history-card-compact.untagged {
    border-left: 3px solid #ef5350;
}

.h-col {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.h-asset {
    width: 135px;
    gap: 6px;
}

.h-type {
    font-size: 9px;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 900;
    min-width: 14px;
    text-align: center;
}

.h-name-box {
    display: flex;
    flex-direction: column;
}

.h-symbol {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1;
}

.h-vol {
    font-size: 10px;
    color: #5e6c84;
    margin-left: 2px;
}

.h-prices {
    font-size: 10px;
    color: #5e6c84;
    font-family: 'Inter', monospace;
    margin-top: 1px;
}

.h-time {
    width: 125px;
    font-size: 11px;
    color: #8b9bb4;
    font-family: 'Inter', monospace;
    justify-content: center;
}

.h-tags {
    flex-grow: 1;
    display: flex;
    gap: 4px;
    overflow: hidden;
    flex-wrap: nowrap !important;
}

.mini-tag {
    font-size: 9px;
    padding: 0 5px;
    background: rgba(0, 255, 170, 0.08);
    color: #00ffaa;
    border-radius: 3px;
    border: 1px solid rgba(0, 255, 170, 0.1);
}

.mini-tag.none {
    background: rgba(239, 83, 80, 0.06);
    color: #ef5350;
    border-color: rgba(239, 83, 80, 0.1);
}

.h-pnl {
    width: 85px;
    justify-content: flex-end;
    font-family: 'Inter', monospace;
    font-weight: 700;
    font-size: 14px;
}/* =========================================
   详情弹窗 (Double Click Modal)
   针对手机端优化的全屏/底部抽屉式设计
   ========================================= */
.detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(180deg, #1c222d 0%, #151921 100%);
    width: 100%;
    max-width: 600px;
    border-radius: 32px 32px 0 0;
    padding: 30px 24px;
    max-height: 85vh;
    overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -15px 50px rgba(0,0,0,0.6);
    position: relative;
}

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

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(90deg, #66fcf1, #45a29e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 高级关闭按钮 */
.close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #8b9bb4;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.close-btn:hover {
    background: rgba(239, 83, 80, 0.15);
    color: #ef5350;
    transform: rotate(90deg);
    border-color: rgba(239, 83, 80, 0.3);
}


.formula-box {
    background: rgba(102, 252, 241, 0.05);
    border: 1px solid rgba(102, 252, 241, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.formula-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.formula-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-accent);
    font-family: 'Inter', monospace;
}

.list-header {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 10px;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.03);
}

.detail-item.win { border-left: 3px solid var(--color-profit); background: rgba(0, 255, 170, 0.03); }
.detail-item.loss { border-left: 3px solid var(--color-loss); background: rgba(239, 83, 80, 0.03); }

.item-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.item-symbol {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.item-ticket {
    font-size: 10px;
    color: var(--text-muted);
    font-family: monospace;
}

.item-pnl {
    font-size: 15px;
    font-weight: 800;
    font-family: 'Inter', monospace;
}

/* 增强首页卡片交互反馈（不改变外观） */
.metric-card {
    cursor: pointer;
    transition: transform 0.1s ease, background-color 0.2s ease;
    user-select: none;
}

.metric-card:active {
    transform: scale(0.96);
    background-color: var(--card-bg-hover);
}


/* REVERT TO COMPACT UI */
.history-item-new { 
    display: block;
    background: rgba(255, 255, 255, 0.01); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.04); 
    overflow: hidden; 
    transition: background 0.2s;
}
.history-item-new.untagged {
    border-left: 3px solid #ef5350;
}
.history-item-new:hover {
    background: rgba(255, 255, 255, 0.03);
}
.h-main-row { 
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    padding: 8px 10px;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    width: 100%;
}
.h-col { flex-shrink: 0; display: flex; align-items: center; }
.h-asset { 
    min-width: 110px; /* 保证最小宽度 */
    gap: 4px;
}
.h-symbol { 
    font-size: clamp(12px, 3.5vw, 14px); /* 自适应字号 */
    font-weight: 600;
}
.h-vol { 
    font-size: clamp(10px, 3vw, 12px); 
    color: #8b9bb4; 
    background: rgba(255,255,255,0.05);
    padding: 0 4px;
    border-radius: 3px;
}
.h-time { flex: 0 1 auto; font-size: 11px; color: var(--color-accent); overflow: hidden; }
.h-tags { flex: 1; display: flex; justify-content: center; min-width: 60px; }
.h-pnl { 
    margin-left: auto; /* 暴力右对齐 */
    width: 70px; 
    text-align: right; 
    font-weight: 800;
    font-size: 14px;
}

.h-edit-area { 
    display: none; /* 默认隐藏 */
    overflow: hidden; 
    background: transparent;
}
.history-item-new.expanded .h-edit-area { 
    display: block; /* 瞬间显示 */
    padding: 12px; 
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
