*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue",sans-serif;background:#f5f5f5}
.login-box{width:90%;max-width:320px;margin:80px auto;background:#fff;padding:20px;border-radius:8px}
.login-box h2{text-align:center;margin-bottom:20px}
.login-box input{width:100%;height:40px;margin-bottom:12px;padding:0 10px;border:1px solid #ddd;border-radius:4px}
.login-box button{width:100%;height:40px;background:#07c160;color:#fff;border:none;border-radius:4px;font-size:16px}

.container{display:flex;flex-direction:column;height:100vh}
.header{background:#ededed;padding:10px;border-bottom:1px solid #ddd}
.header .row{display:flex;justify-content:space-between;font-size:14px;margin-bottom:4px}
.header .row span{color:#666}
.header .row b{color:#333}
.header .row .red{color:#ff0000}
.header .row .green{color:#00aa00}
#statBtn{border:1px solid #ddd;background:#fff;border-radius:3px}

.history{flex:1;overflow-y:auto;padding:10px;background:#f5f5f5}
.send-box{background:#f5f5f5;padding:8px;border-top:1px solid #ddd;display:flex}
.send-box input{flex:1;height:36px;border:1px solid #ddd;border-radius:4px;padding:0 10px;margin-right:8px}
.send-box button{width:60px;height:36px;background:#07c160;color:#fff;border:none;border-radius:4px}
.send-box #pasteBtn{width:60px;height:36px;background:#fff;color:#333;border:1px solid #ddd;border-radius:4px;margin-right:8px}

.admin-nav{background:#fff;border-bottom:1px solid #ddd;display:flex}
.admin-nav a{flex:1;text-align:center;padding:12px 0;color:#333;text-decoration:none}
.admin-nav a.active{color:#07c160;border-bottom:2px solid #07c160}
.admin-body{padding:10px}
.card{background:#fff;margin-bottom:10px;padding:12px;border-radius:4px}
.card h3{font-size:16px;margin-bottom:8px}
.card table{width:100%;font-size:14px;border-collapse:collapse}
.card th,.card td{padding:6px;border-bottom:1px solid #eee;text-align:left}
.card input[type="date"],.card input[type="number"],.card input[type="text"]{height:32px;border:1px solid #ddd;border-radius:4px;padding:0 8px}
.card button{height:32px;padding:0 12px;background:#07c160;color:#fff;border:none;border-radius:4px}

/* 每条注单样式 */
.msg-item{display:flex;align-items:flex-start;background:#fff;margin-bottom:8px;padding:8px;border-radius:4px;position:relative}
.msg-stat{flex-shrink:0;width:75px;font-size:12px;color:#666;line-height:1.4;padding-right:8px;border-right:1px solid #eee}
.msg-stat .profit{font-weight:bold}
.msg-stat .profit.up{color:#ff0000}
.msg-stat .profit.down{color:#00aa00}
.msg-body{flex:1;padding-left:8px;min-width:0}
.msg-body .time{font-size:12px;color:#999}
.msg-body .content{font-size:15px;margin:4px 0;word-break:break-all;white-space:pre-wrap}
.msg-body .op{position:absolute;right:8px;top:8px}
.msg-body .op button{font-size:12px;margin-left:4px;padding:2px 6px;background:#eee;color:#333;border:none;border-radius:3px}
.msg-body .op button:active{background:#ddd}

/* 统计弹窗 */
.modal{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,0.5);z-index:999;display:flex;align-items:center;justify-content:center}
.modal-box{width:90%;max-width:400px;max-height:80vh;background:#fff;border-radius:8px;display:flex;flex-direction:column}
.modal-title{padding:12px 16px;border-bottom:1px solid #eee;font-size:16px;font-weight:bold;display:flex;justify-content:space-between;align-items:center}
.modal-close{font-size:24px;color:#999;cursor:pointer;line-height:1}
.modal-body{flex:1;overflow-y:auto;padding:0 16px 16px}
#statTable{width:100%;border-collapse:collapse;font-size:14px}
#statTable th,#statTable td{padding:8px;border-bottom:1px solid #f0f0f0;text-align:center}
#statTable th{background:#f8f8f8;position:sticky;top:0;cursor:pointer;user-select:none}
#statTable th:active{background:#eee}