* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; background:#f0f2f5; color:#333; line-height:1.6; }
a { color:#1890ff; text-decoration:none; }
a:hover { color:#40a9ff; }

/* 登录页 */
.login-body { display:flex; justify-content:center; align-items:center; min-height:100vh; background:linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-container { background:#fff; border-radius:12px; padding:40px; width:380px; max-width:90vw; box-shadow:0 8px 32px rgba(0,0,0,0.15); }
.login-header { text-align:center; margin-bottom:30px; }
.login-header h1 { font-size:22px; color:#333; margin-bottom:8px; }
.login-header p { font-size:13px; color:#999; }
.login-form .form-group { margin-bottom:18px; }
.login-form label { display:block; font-size:13px; color:#666; margin-bottom:6px; }
.login-form input[type="text"], .login-form input[type="password"] { width:100%; padding:10px 12px; border:1px solid #d9d9d9; border-radius:6px; font-size:14px; transition:border-color .3s; }
.login-form input:focus { outline:none; border-color:#1890ff; box-shadow:0 0 0 2px rgba(24,144,255,0.2); }

/* ===== 全局布局 ===== */
.app-layout { display:flex; min-height:100vh; }

/* ===== 左侧栏 ===== */
.sidebar {
    position: fixed;
    left: 0; top: 0;
    width: 200px;
    height: 100vh;
    background: #001529;
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow-y: auto;
}
.sidebar-brand {
    padding: 20px 16px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
}
.sidebar-user {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1890ff, #52c41a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; color: #fff; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-status { font-size: 11px; color: #52c41a; display: flex; align-items: center; gap: 4px; }
.user-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #52c41a; display: inline-block; }

/* 菜单分组 */
.menu-group { margin-bottom: 2px; }
.menu-group.on .menu-title { background: rgba(255,255,255,0.06); }
.menu-title {
    display: flex;
    align-items: center;
    padding: 11px 16px;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}
.menu-title:hover { background: rgba(255,255,255,0.06); }
.menu-icon { font-size: 15px; margin-right: 8px; width: 20px; text-align: center; }
.menu-arrow { margin-left: auto; font-size: 11px; transition: transform 0.2s; color: rgba(255,255,255,0.4); }
.menu-group.on .menu-arrow { transform: rotate(90deg); color: rgba(255,255,255,0.7); }

/* 菜单项 */
.menu-items { display: none; background: rgba(0,0,0,0.15); }
.menu-group.on .menu-items { display: block; }
.menu-items a {
    display: block;
    padding: 10px 16px 10px 44px;
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    font-weight: 400;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.menu-items a:hover { color: #fff; background: rgba(255,255,255,0.04); }
.menu-items a.active { color: #fff; background: #1890ff; border-left-color: #fff; font-weight: 500; }

/* 底部退出 */
.sidebar-footer { margin-top: auto; padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.btn-logout {
    display: block;
    text-align: center;
    padding: 7px 14px;
    background: rgba(255,77,79,0.15);
    color: #ff7875;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.2s;
}
.btn-logout:hover { background: rgba(255,77,79,0.3); color: #ff4d4f; }

/* ===== 右侧内容区 ===== */
.right-main {
    margin-left: 200px;
    width: calc(100% - 200px);
    min-height: 100vh;
    background: #f0f2f5;
}
.content-iframe {
    width: 100%;
    height: 100vh;
    border: none;
    display: block;
}

/* ===== 子页面通用样式 ===== */
.container-full { max-width: 100%; margin: 0; padding: 24px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-header h2 { font-size: 20px; color: #333; margin: 0; }
.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.card-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #f0f0f0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #f0f0f0; }
th { background: #fafafa; font-weight: 600; color: #666; font-size: 12px; }
tr:hover { background: #f5f8ff; }

/* 统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 8px; padding: 20px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.stat-card .num { font-size: 28px; font-weight: 700; color: #1890ff; }
.stat-card .label { font-size: 12px; color: #999; margin-top: 4px; }
.stat-card.warn .num { color: #fa8c16; }
.stat-card.danger .num { color: #f5222d; }

/* 优先级/状态标签 */
.priority { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; color: #fff; margin-right: 4px; }
.priority-1 { background: #f5222d; }
.priority-2 { background: #fa541c; }
.priority-3 { background: #fa8c16; }
.priority-4 { background: #52c41a; }
.priority-5 { background: #8c8c8c; }
.status { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; }
.status-0 { background: #e6f7ff; color: #1890ff; }
.status-1 { background: #f6ffed; color: #52c41a; }
.status-2 { background: #fff7e6; color: #fa8c16; }
.status-3 { background: #f5f5f5; color: #8c8c8c; }

/* 进度条 */
.progress-bar { background: #f0f0f0; border-radius: 4px; height: 8px; overflow: hidden; width: 100px; display: inline-block; vertical-align: middle; }
.progress-bar .fill { height: 100%; background: linear-gradient(90deg, #1890ff, #52c41a); border-radius: 4px; }

/* 按钮 */
.btn { display: inline-block; padding: 8px 16px; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; transition: all 0.3s; }
.btn-primary { background: #1890ff; color: #fff; }
.btn-primary:hover { background: #40a9ff; }
.btn-success { background: #52c41a; color: #fff; }
.btn-success:hover { background: #73d13d; }
.btn-warning { background: #faad14; color: #fff; }
.btn-warning:hover { background: #ffc53d; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-danger:hover { background: #ff7875; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* 表单 */
.form-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; align-items: flex-end; }
.form-row label { display: block; font-size: 12px; color: #666; margin-bottom: 4px; }
.form-row input, .form-row select, .form-row textarea { padding: 8px 10px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 13px; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: #1890ff; }

/* 右侧滑出面板 */
.slide-panel-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); z-index: 300; }
.slide-panel-overlay.show { display: block; }
.slide-panel { position: fixed; top: 0; right: 0; width: 80%; max-width: 1200px; height: 100%; background: #f5f7fa; box-shadow: -4px 0 30px rgba(0,0,0,0.2); overflow-y: auto; animation: slideInRight 0.3s ease; z-index: 301; }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
.slide-panel-header { position: sticky; top: 0; background: #fff; padding: 0 24px; height: 56px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e8e8e8; z-index: 10; }
.slide-panel-header h3 { font-size: 16px; margin: 0; color: #333; }
.slide-panel-close { width: 36px; height: 36px; border: none; background: transparent; font-size: 22px; cursor: pointer; color: #666; border-radius: 6px; }
.slide-panel-close:hover { background: #f0f0f0; }
.slide-panel-body { padding: 24px; max-width: 1000px; margin: 0 auto; }
.slide-panel-body .form-row { background: #fff; padding: 16px; border-radius: 8px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.slide-panel-body .form-row label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; font-weight: 500; }
.slide-panel-body .form-row input, .slide-panel-body .form-row select, .slide-panel-body .form-row textarea { padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; }
.slide-panel-body .form-row input:focus, .slide-panel-body .form-row select:focus, .slide-panel-body .form-row textarea:focus { outline: none; border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,0.1); }
.slide-panel-footer { position: sticky; bottom: 0; background: #fff; padding: 16px 24px; border-top: 1px solid #e8e8e8; display: flex; justify-content: flex-end; gap: 12px; }

.empty { text-align: center; padding: 40px; color: #999; }

/* 响应式 */
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar-brand, .user-info, .menu-title span, .menu-arrow, .menu-items a span { display: none; }
    .sidebar-user { justify-content: center; padding: 12px 8px; }
    .menu-title { justify-content: center; padding: 12px 8px; }
    .menu-icon { margin-right: 0; }
    .menu-items a { padding: 10px 8px; text-align: center; }
    .right-main { margin-left: 60px; width: calc(100% - 60px); }
    .slide-panel { width: 100%; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
