/* ========== 芯闪科技 IoT 平台 样式 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: #f0f2f5; }

/* ====== 登录页 ====== */
.login-page { position: fixed; inset: 0; z-index: 9999; }
.login-bg {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.login-bg-shapes { position: absolute; inset: 0; }
.shape { position: absolute; border-radius: 50%; opacity: 0.1; background: #fff; }
.shape-1 { width: 500px; height: 500px; top: -100px; right: -100px; }
.shape-2 { width: 300px; height: 300px; bottom: -50px; left: -50px; }
.shape-3 { width: 150px; height: 150px; top: 40%; left: 10%; }
.login-card {
    background: #fff; border-radius: 16px; padding: 40px; width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15); z-index: 1; text-align: center;
}
.login-logo { margin-bottom: 28px; }
.login-logo h1 { font-size: 22px; color: #1d2129; margin-top: 12px; font-weight: 600; }
.login-logo p { font-size: 13px; color: #86909c; margin-top: 4px; }
.login-input { margin-bottom: 16px; }
.login-input .el-input__inner { border-radius: 8px; height: 44px; }
.login-btn { width: 100%; border-radius: 8px; height: 44px; font-size: 15px; letter-spacing: 4px; }
.login-version { margin-top: 20px; font-size: 12px; color: #c9cdd4; }

/* ====== 侧边栏 ====== */
.app-aside { background: #001529 !important; display: flex; flex-direction: column; }
.app-logo {
    height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px;
    color: #fff; font-size: 17px; font-weight: 600; letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.app-aside .el-menu { border-right: none; flex: 1; }
.app-aside .el-menu-item:hover { background: rgba(255,255,255,0.04) !important; }
.app-aside .el-menu-item.is-active { background: #409EFF !important; }
.aside-footer { padding: 12px 20px; border-top: 1px solid rgba(255,255,255,0.06); }
.aside-footer a { color: #ffffff73; font-size: 12px; text-decoration: none; }
.aside-footer a:hover { color: #fff; }

/* ====== 顶栏 ====== */
.app-header {
    background: #fff; display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px !important; box-shadow: 0 1px 4px rgba(0,0,0,0.04); z-index: 10;
}
.header-title { font-size: 15px; font-weight: 500; color: #1d2129; }
.header-right { display: flex; align-items: center; gap: 10px; }
.header-user { color: #4e5969; font-size: 13px; }

/* ====== 主内容 ====== */
.app-main { background: #f2f3f5; padding: 20px; overflow-y: auto; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mb-16 { margin-bottom: 16px; }

/* ====== 统计卡片 ====== */
.stat-card { border-radius: 8px; transition: transform 0.2s; }
.stat-card:hover { transform: translateY(-2px); }
.stat-inner { display: flex; align-items: center; }
.stat-icon {
    width: 54px; height: 54px; border-radius: 14px; display: flex;
    align-items: center; justify-content: center; margin-right: 16px; font-size: 26px; color: #fff;
}
.stat-num { font-size: 26px; font-weight: 700; color: #1d2129; line-height: 1.3; }
.stat-label { font-size: 13px; color: #86909c; }

/* ====== 日志流 ====== */
.log-stream {
    height: 360px; overflow-y: auto; background: #1a1e2b; border-radius: 8px;
    padding: 14px; font-family: "JetBrains Mono", "Consolas", monospace; font-size: 12px;
}
.log-entry { padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,0.04); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.log-time { color: #6a9b6c; font-size: 11px; min-width: 72px; }
.log-source { color: #6fa8dc; font-size: 11px; }
.log-topic { color: #e0a43c; font-size: 11px; }
.log-msg { color: #cdd6e0; font-size: 11px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-empty { color: #555; text-align: center; padding: 60px 0; font-size: 14px; }
.dir-tag { font-size: 10px !important; padding: 0 4px !important; height: 18px !important; line-height: 18px !important; }

/* ====== 日志列表 ====== */
.log-list { max-height: 600px; overflow-y: auto; }
.log-item { padding: 7px 10px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.log-item:hover { background: #f7f8fa; }
.log-content { color: #4e5969; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-badge { font-size: 11px !important; }

/* ====== 通用卡片 ====== */
.card-header { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 500; }

/* ====== 测试结果 ====== */
.test-result { background: #f7f8fa; padding: 12px; border-radius: 6px; }
.test-result pre { font-size: 12px; color: #4e5969; white-space: pre-wrap; word-break: break-all; }

/* ====== 协议参考 ====== */
.ref-content { font-size: 13px; line-height: 1.8; color: #4e5969; }
.ref-content code { background: #f0f2f5; padding: 2px 6px; border-radius: 4px; color: #409EFF; font-size: 12px; }
.ref-pre { background: #1a1e2b; color: #a8d8a8; padding: 14px; border-radius: 8px; overflow-x: auto; font-size: 12px; line-height: 1.7; }

/* ====== 滚动条 ====== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c9cdd4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a8abb2; }
