* { 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; }

/* ===== 全局布局 ===== */
.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-toggle {
    position: fixed; left: 192px; top: 12px; width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.08); border-radius: 4px; cursor: pointer;
    color: rgba(255,255,255,0.6); font-size: 11px; z-index: 210; transition: all 0.3s ease;
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.15); color: #fff; }
.sidebar-brand {
    padding: 14px 16px 18px; font-size: 16px; font-weight: 700; color: #fff;
    text-align: center; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user {
    display: flex; align-items: center; justify-content: center;
    padding: 10px 16px; gap: 10px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.user-name { font-size: 13px; color: #fff; font-weight: 500; }
.user-status { font-size: 11px; color: #52c41a; display: flex; align-items: center; gap: 4px; }
.user-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #52c41a; }
.btn-logout-small {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; background: rgba(255,77,79,0.12); color: #ff7875;
    border-radius: 4px; font-size: 14px; transition: all 0.2s;
}
.btn-logout-small:hover { background: rgba(255,77,79,0.3); color: #ff4d4f; }
.sidebar-nav { padding: 8px 0; display: flex; flex-direction: column; }

/* 旧版 .sidebar-nav 全局网格已移除，改用 .nav-group + .nav-grid 布局 */

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

/* ===== 子页面通用 ===== */
.container-full { max-width: 98%; margin: 0 auto; padding: 24px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.page-header h2 { font-size: 20px; color: #333; }
.page-header h1 { font-size: 20px; color: #333; }
.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.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; }
.project-link { font-weight: 500; }

/* 统计卡片 */
.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; }
.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; }
.status-4 { background: #fafafa; color: #999; }

/* 进度条 */
.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-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 6px;
    font-size: 14px; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,0.1);
}
.form-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.form-row label { display: block; font-size: 12px; color: #666; margin-bottom: 4px; }
.form-row input, .form-row select { padding: 8px 10px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 13px; }
.req { color: #ff4d4f; }

/* 滑出面板 */
.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: 80vw; max-width: 80vw; 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; }
.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; }
.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; }

/* 折叠状态 */
.sidebar.collapsed { width: 0; overflow: hidden; transition: width 0.3s ease; }
.sidebar.collapsed ~ .sidebar-toggle { left: 8px; background: #001529; border-radius: 4px; box-shadow: 2px 0 8px rgba(0,0,0,0.3); }
.sidebar.collapsed ~ .sidebar-toggle .toggle-icon { transform: rotate(180deg); }
.right-main.expanded { margin-left: 0; width: 100%; transition: all 0.3s ease; }

@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar-brand, .sidebar-user, .sidebar-nav .nav-item span { display: none; }
    .right-main { margin-left: 60px; width: calc(100% - 60px); }
    .slide-panel { width: 100%; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 导航分组样式 */
.nav-group { margin-bottom: 4px; }
.nav-group-title {
    padding: 8px 20px 4px;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    user-select: none;
}

/* 菜单网格 - 每行两个 */
.nav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.nav-grid .nav-item { 
    display: block; 
    padding: 10px 12px; 
    color: rgba(255,255,255,0.75); 
    font-size: 13px; 
    text-decoration: none; 
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-grid .nav-item:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-grid .nav-item.active { color: #fff; background: #1890ff; border-left-color: #fff; font-weight: 500; }

/* 顶部名称不换行 */
.sidebar-brand {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


