:root { --primary: #3b82f6; --primary-hover: #2563eb; --bg: #f8fafc; --card: #ffffff; --text-main: #1e293b; --text-sub: #64748b; --border: #e2e8f0; }
        body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text-main); margin: 0; overflow-x: hidden; padding-bottom: 80px; }
        .nav { background: var(--card); padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
        .logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
        .nav-right { display: flex; align-items: center; gap: 10px; }
        
        .tag-balance { background: #eff6ff; color: #1e40af; padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 700; border: 1px solid #bfdbfe; cursor: pointer; }
        .tag-logs, .btn-logout { background: #f1f5f9; color: #475569; padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 700; border: 1px solid #cbd5e1; cursor: pointer; }
        .btn-logout { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
        
        .layout { display: flex; padding: 25px; gap: 25px; max-width: 1550px; margin: 0 auto; min-height: 85vh; }
        
        .sidebar { width: 320px; background: var(--card); padding: 25px 20px; border-radius: 12px; border: 1px solid var(--border); height: fit-content; box-shadow: 0 1px 3px rgba(0,0,0,0.05); transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; flex-shrink: 0; position: relative; }
        .sidebar.collapsed { width: 64px; padding: 25px 0; cursor: pointer; border-color: #bfdbfe; background: #f8fafc; }
        .sidebar.collapsed:hover { background: #eff6ff; border-color: var(--primary); box-shadow: 0 4px 12px rgba(59,130,246,0.1); }
        
        .sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; width: 280px; white-space: nowrap; padding: 0 5px;}
        .sidebar-content { width: 280px; display: flex; flex-direction: column; transition: opacity 0.2s; opacity: 1; padding: 0 5px; }
        
        .sidebar.collapsed .sidebar-header, 
        .sidebar.collapsed .sidebar-content { opacity: 0; pointer-events: none; display: none; }
        
        .sidebar-icon-only { display: none; text-align: center; color: var(--primary); flex-direction: column; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; width: 100%;}
        .sidebar.collapsed .sidebar-icon-only { display: flex; }
        
        .sidebar-toggle-btn { background: transparent; border: none; color: var(--text-sub); cursor: pointer; padding: 6px; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
        .sidebar-toggle-btn:hover { background: #f1f5f9; color: var(--primary); }

        .main { flex: 1; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
        
        .summary-cards { display: flex; gap: 20px; }
        .stat-card { flex: 1; background: var(--card); padding: 20px 25px; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
        .stat-card h3 { margin: 0 0 10px 0; font-size: 13px; color: var(--text-sub); font-weight: 600; }
        .stat-card .value { font-size: 28px; font-weight: 800; color: var(--text-main); font-family: monospace;}
        .usdt-text { color: #059669 !important; }

        .table-card { background: var(--card); padding: 25px; border-radius: 12px 12px 0 0; border: 1px solid var(--border); border-bottom: none; overflow-x: auto; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
        
        .toolbar { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; background: #ffffff; padding: 16px 20px; border-radius: 8px; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
        .toolbar-row { display: flex; justify-content: space-between; align-items: center; width: 100%; flex-wrap: wrap; gap: 12px; }
        .toolbar-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
        .toolbar-divider { width: 1px; height: 20px; background: #cbd5e1; margin: 0 4px; }
        
        .toolbar .control-item { height: 36px !important; margin: 0 !important; padding: 0 12px; font-size: 13px; border-radius: 6px; border: 1px solid #bfdbfe; background: white; box-sizing: border-box; outline: none; transition: all 0.2s; color: var(--primary); font-weight: 500; }
        .toolbar .control-item::placeholder { color: #93c5fd; font-weight: 400; }
        .toolbar .control-item:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59,130,246,0.1); }
        
        .search-wrapper { position: relative; display: inline-flex; align-items: center; height: 36px; }
        .search-icon { position: absolute; left: 10px; color: var(--primary); pointer-events: none; opacity: 0.7; }
        .toolbar .control-item.with-icon { padding-left: 32px; width: 190px; }

        .btn-tool { height: 36px !important; margin: 0 !important; padding: 0 16px; font-size: 13px; font-weight: 600; border-radius: 6px; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; border: 1px solid transparent; box-sizing: border-box; }
        .btn-tool svg { flex-shrink: 0; }
        
        .btn-primary-solid { background: var(--primary); color: white; border-color: var(--primary); }
        .btn-primary-solid:hover { background: var(--primary-hover); border-color: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 6px rgba(59,130,246,0.2); }
        
        .btn-outline-primary { background: white; color: var(--primary); border: 1px solid #bfdbfe; }
        .btn-outline-primary:hover { background: #eff6ff; border-color: var(--primary); }

        table { width: 100%; border-collapse: collapse; min-width: 950px; }
        th { text-align: left; padding: 12px; border-bottom: 2px solid var(--border); color: var(--text-sub); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
        td { padding: 14px 12px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
        tr:hover td { background-color: #f8fafc; }
        
        .pagination { display: flex; justify-content: space-between; align-items: center; padding: 15px 25px; background: var(--card); border: 1px solid var(--border); border-radius: 0 0 12px 12px; border-top: none; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
        .addr-font { font-family: 'Courier New', Courier, monospace; color: var(--text-sub); background: #f1f5f9; padding: 4px 6px; border-radius: 4px; font-size: 12px; letter-spacing: 0.5px; }
        input[type="text"], input[type="number"], input[type="password"], textarea, select { width: 100%; padding: 12px; margin: 0 0 15px 0; border: 1px solid var(--border); border-radius: 6px; box-sizing: border-box; outline: none; }
        input[type="text"]:focus, input[type="number"]:focus, input[type="password"]:focus, textarea:focus { border-color: var(--primary); }
        input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
        
        .btn { width: 100%; padding: 12px; background: var(--primary); color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 14px; transition: 0.2s; }
        .btn:hover { background: var(--primary-hover); }
        .btn:disabled { background: #94a3b8; cursor: not-allowed; }
        .btn-sm { width: auto; padding: 6px 12px; font-size: 12px; border-radius: 4px; }
        .btn-outline { background: white; color: var(--primary); border: 1px solid var(--primary); }
        .btn-outline:hover { background: #eff6ff; color: var(--primary-hover); border-color: var(--primary-hover); }
        
        .modal { position: fixed; inset: 0; background: rgba(15,23,42,0.6); display: flex; justify-content: center; align-items: center; z-index: 1000; backdrop-filter: blur(2px); }
        .modal-content { background: white; border-radius: 12px; border: 1px solid var(--border); width: 450px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04); }
        .modal-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: #f8fafc; }
        .modal-body { padding: 20px; overflow-y: auto; background: white; }
        
        .tab-group { display: flex; gap: 8px; margin-bottom: 15px; background: #f1f5f9; padding: 4px; border-radius: 8px; }
        .tab-btn { flex: 1; padding: 8px; text-align: center; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 13px; color: #475569; transition: 0.2s;}
        .tab-btn:hover { color: var(--text-main); }
        .tab-btn.active { background: white; color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

        .badge-energy { background: #dcfce7; color: #166534; padding: 3px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; margin-left: 8px; border: 1px solid #bbf7d0; display: inline-block;}

        .dash-board { display: flex; gap: 15px; margin-bottom: 20px; }
        .dash-box { flex: 1; background: white; padding: 18px; border-radius: 10px; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
        .dash-box h4 { margin: 0 0 12px 0; font-size: 13px; color: var(--text-sub); border-bottom: 1px solid var(--border); padding-bottom: 8px; font-weight: 600; }
        .dash-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
        .dash-val-in { color: #059669; font-weight: 600; font-family: monospace; font-size: 14px;}
        .dash-val-out { color: #ef4444; font-weight: 600; font-family: monospace; font-size: 14px;}
        .dash-val-diff { font-size: 16px; font-weight: 700; font-family: monospace; }
        .diff-positive { color: #059669; }
        .diff-negative { color: #ef4444; }

        /* 🚀 修改：把批量操作条层级提到 2000，悬浮在最最上方 */
        #selectionBar { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: #1e293b; color: white; padding: 12px 24px; border-radius: 50px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); display: none; align-items: center; gap: 15px; z-index: 2000; transition: all 0.3s ease; border: 1px solid #334155; }
        #selectionBar span { font-size: 14px; font-weight: 500; margin-right: 10px; }
        #selectionBar button { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.1); color: white; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-size: 13px; font-weight: 600; transition: 0.2s; display: inline-flex; align-items: center; gap: 6px; }
        #selectionBar button:hover { background: rgba(255,255,255,0.2); transform: translateY(-1px); }
        .bar-btn-clear { color: #fca5a5 !important; border-color: rgba(248,113,113,0.2) !important; }
        .bar-btn-clear:hover { background: rgba(248,113,113,0.15) !important; }
        .bar-btn-energy { background: rgba(16,185,129,0.2) !important; border-color: rgba(16,185,129,0.4) !important; color: #6ee7b7 !important; }
        .bar-btn-energy:hover { background: rgba(16,185,129,0.3) !important; }
        .bar-btn-trx { background: rgba(245,158,11,0.2) !important; border-color: rgba(245,158,11,0.4) !important; color: #fcd34d !important; }
        .bar-btn-trx:hover { background: rgba(245,158,11,0.3) !important; }

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

        .snapshot-container {
            max-height: 400px;
            overflow-y: auto;
            background: #f8fafc;
            border-radius: 6px;
            border: 1px inset #e2e8f0;
            padding: 10px;
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
            animation: slideDown 0.3s ease-out;
        }
        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-5px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .snapshot-table { width: 100%; border-collapse: collapse; }
        .snapshot-table th { background: #e2e8f0; color: #475569; padding: 8px 12px; font-size: 11px; border-bottom: none; }
        .snapshot-table td { padding: 8px 12px; border-bottom: 1px solid #e2e8f0; font-size: 12px; }