/* StellarGuard 新版布局样式 - 紫色渐变风格 */
:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: rgba(139,92,246,0.1);
    --primary-gradient: linear-gradient(135deg, #667eea, #764ba2);
    --sidebar-bg: #1e293b;
    --sidebar-width: 200px;
    --header-height: 56px;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #334155;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif; background: var(--bg-dark); color: var(--text); min-height: 100vh; }

/* 顶部导航 */
.header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-height); background: var(--sidebar-bg); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; z-index: 100; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 700; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-decoration: none; }
.logo-img { width: 36px !important; height: 36px !important; max-width: 36px !important; max-height: 36px !important; object-fit: contain; flex-shrink: 0; }
.logo i { font-size: 1.3rem; }
.header-right { display: flex; align-items: center; gap: 16px; }
.header-right a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; display: flex; align-items: center; gap: 4px; }
.header-right a:hover { color: var(--text); }
.user-info { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 0.85rem; padding: 6px 12px; background: var(--primary-light); border-radius: 6px; }
.user-info i { color: var(--primary); }

/* 左侧导航 */
.sidebar { position: fixed; top: var(--header-height); left: 0; width: var(--sidebar-width); height: calc(100vh - var(--header-height)); background: var(--sidebar-bg); border-right: 1px solid var(--border); overflow-y: auto; z-index: 90; }
.nav-section { padding: 12px 0; }
.nav-title { padding: 8px 16px; font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: var(--text-muted); text-decoration: none; font-size: 0.85rem; transition: all 0.15s; border-left: 3px solid transparent; }
.nav-item:hover { background: var(--primary-light); color: var(--text); }
.nav-item.active { background: var(--primary-light); color: var(--primary); border-left-color: var(--primary); font-weight: 500; }
.nav-item i { font-size: 1rem; width: 18px; text-align: center; }


/* 主内容区 */
.main { margin-left: var(--sidebar-width); margin-top: var(--header-height); min-height: calc(100vh - var(--header-height)); padding: 20px; }
.page-header { margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; }
.page-title { font-size: 1.25rem; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.page-title i { color: var(--primary); }

/* 卡片 */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; }
.card-body { padding: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-title i { color: var(--primary); }

/* 上传区域 */
.upload-zone { border: 2px dashed var(--border); border-radius: 10px; padding: 40px; text-align: center; cursor: pointer; transition: all 0.2s; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--primary); background: var(--primary-light); }
.upload-zone i.upload-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 12px; display: block; }
.upload-zone h3 { font-size: 1rem; margin-bottom: 6px; }
.upload-zone p { color: var(--text-muted); font-size: 0.85rem; }

/* 文件信息 */
.file-info { display: none; background: var(--primary-light); border: 1px solid rgba(139,92,246,0.3); border-radius: 8px; padding: 14px; margin-top: 14px; }
.file-info.show { display: flex; align-items: center; gap: 12px; }
.file-icon { width: 40px; height: 40px; background: var(--primary-gradient); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; }
.file-details { flex: 1; }
.file-name { font-weight: 500; font-size: 0.9rem; margin-bottom: 2px; }
.file-size { font-size: 0.8rem; color: var(--text-muted); }
.file-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.1rem; padding: 6px; }
.file-remove:hover { color: var(--danger); }

/* 加固选项 */
.options-section { margin-top: 16px; }
.options-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 10px; color: var(--text-muted); }
.options-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.opt-item { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; transition: all 0.15s; }
.opt-item:hover { border-color: var(--primary); }
.opt-item.disabled { opacity: 0.6; cursor: default; }
.opt-item input { accent-color: var(--primary); margin-top: 2px; }
.opt-info .opt-label { font-size: 0.85rem; font-weight: 500; }
.opt-info .opt-desc { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.opt-tag { font-size: 0.65rem; padding: 2px 5px; border-radius: 3px; margin-left: 4px; }
.opt-tag.slow { background: rgba(245,158,11,0.2); color: var(--warning); }
.opt-tag.default { background: var(--primary-light); color: var(--primary); }


/* 按钮 */
.btn { padding: 10px 20px; border-radius: 6px; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.15s; border: none; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary { background: var(--primary-gradient); color: #fff; }
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-danger { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* 进度条 */
.progress-section { display: none; margin-top: 16px; }
.progress-section.show { display: block; }
.progress-bar-bg { height: 6px; background: var(--border); border-radius: 6px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--primary-gradient); border-radius: 6px; width: 0%; transition: width 0.3s; }
.progress-info { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.8rem; color: var(--text-muted); }

/* 结果提示 */
.result-section { display: none; text-align: center; padding: 24px; border-radius: 8px; margin-top: 16px; }
.result-section.show { display: block; }
.result-section.success { background: var(--primary-light); border: 1px solid rgba(139,92,246,0.3); }
.result-section.error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); }
.result-section i { font-size: 2rem; margin-bottom: 10px; }
.result-section.success i { color: var(--primary); }
.result-section.error i { color: var(--danger); }
.result-section h3 { font-size: 1rem; margin-bottom: 6px; }
.result-section p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 14px; }

/* 表格 */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 500; font-size: 0.8rem; background: rgba(0,0,0,0.2); }
tr:hover { background: rgba(255,255,255,0.02); }
.badge { padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 500; }
.badge-success { background: var(--primary-light); color: var(--primary); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-secondary { background: rgba(148,163,184,0.15); color: var(--text-muted); }

/* 空状态 */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state i { font-size: 3rem; opacity: 0.3; margin-bottom: 12px; }
.empty-state p { margin-bottom: 16px; }

/* 提示框 */
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.alert-info { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3); color: #60a5fa; }
.alert-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: #fbbf24; }
.alert a { color: inherit; text-decoration: underline; }

/* 统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* 移动端 */
.menu-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.3rem; cursor: pointer; padding: 4px; }
.sidebar-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 85; }
.sidebar-overlay.show { display: block; }
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.25s; }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; padding: 16px; }
    .menu-toggle { display: block; }
    .options-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .header-right a span { display: none; }
}
@media (max-width: 480px) {
    .options-grid { grid-template-columns: 1fr; }
}