* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif; background: #f0f2f5; color: #333; min-height: 100vh; }
a { text-decoration: none; color: #1890ff; }

/* Header */
.header { background: linear-gradient(135deg, #1a365d 0%, #2563eb 100%); color: white; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 2px 8px rgba(0,0,0,0.15); position: fixed; top: 0; left: 0; right: 0; z-index: 1000; }
.header .logo { font-size: 18px; font-weight: bold; display: flex; align-items: center; gap: 10px; }
.header .user-info { display: flex; align-items: center; gap: 16px; }
.header .user-info .badge { background: #ff4d4f; color: white; border-radius: 10px; padding: 0 6px; font-size: 12px; min-width: 18px; text-align: center; }
.header button { background: rgba(255,255,255,0.2); color: white; border: 1px solid rgba(255,255,255,0.3); padding: 6px 16px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.header button:hover { background: rgba(255,255,255,0.3); }

/* Layout */
.layout { display: flex; margin-top: 56px; min-height: calc(100vh - 56px); }
.sidebar { width: 220px; background: #fff; border-right: 1px solid #e8e8e8; padding: 12px 0; position: fixed; top: 56px; bottom: 0; overflow-y: auto; z-index: 999; }
.sidebar .menu-group { padding: 4px 0; }
.sidebar .menu-title { padding: 8px 20px; font-size: 12px; color: #999; font-weight: bold; text-transform: uppercase; }
.sidebar .menu-item { padding: 10px 20px; display: block; color: #555; font-size: 14px; cursor: pointer; border-left: 3px solid transparent; transition: all 0.2s; }
.sidebar .menu-item:hover { background: #e6f7ff; color: #1890ff; border-left-color: #1890ff; }
.sidebar .menu-item.active { background: #e6f7ff; color: #1890ff; border-left-color: #1890ff; font-weight: bold; }
.main { flex: 1; margin-left: 220px; padding: 20px; }

/* Cards */
.card { background: white; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); padding: 20px; margin-bottom: 16px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-header h3 { font-size: 16px; color: #1a365d; }
.card-header h3:before { content: ''; display: inline-block; width: 4px; height: 16px; background: #1890ff; margin-right: 8px; border-radius: 2px; vertical-align: middle; }

/* Buttons */
.btn { display: inline-block; padding: 8px 20px; border-radius: 4px; border: none; cursor: pointer; font-size: 14px; transition: all 0.2s; }
.btn-primary { background: #1890ff; color: white; }
.btn-primary:hover { background: #40a9ff; }
.btn-success { background: #52c41a; color: white; }
.btn-success:hover { background: #73d13d; }
.btn-danger { background: #ff4d4f; color: white; }
.btn-danger:hover { background: #ff7875; }
.btn-warning { background: #faad14; color: white; }
.btn-default { background: #f0f0f0; color: #555; border: 1px solid #d9d9d9; }
.btn-default:hover { background: #e6e6e6; }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-group { display: flex; gap: 8px; }

/* Tables */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th { background: #fafafa; padding: 10px 12px; text-align: left; font-size: 13px; color: #666; border-bottom: 2px solid #e8e8e8; white-space: nowrap; }
table td { padding: 8px 12px; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
table tr:hover { background: #fafafa; }
table tr.selected { background: #e6f7ff; }
table tr.abnormal { background: #fff7e6; }
table tr.passed { background: #f6ffed; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 4px; font-size: 13px; color: #666; font-weight: bold; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; transition: border 0.2s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #1890ff; outline: none; box-shadow: 0 0 0 2px rgba(24,144,255,0.2); }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

/* Modal */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 2000; justify-content: center; align-items: center; }
.modal-overlay.show { display: flex; }
.modal { background: white; border-radius: 8px; padding: 24px; max-width: 600px; width: 90%; max-height: 80vh; overflow-y: auto; box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.modal h3 { margin-bottom: 16px; font-size: 16px; color: #1a365d; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* Tabs */
.tabs { display: flex; border-bottom: 2px solid #e8e8e8; margin-bottom: 16px; }
.tab { padding: 8px 20px; cursor: pointer; font-size: 14px; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.tab.active { color: #1890ff; border-bottom-color: #1890ff; }
.tab:hover { color: #1890ff; }

/* Stats */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: white; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.stat-card .stat-value { font-size: 28px; font-weight: bold; color: #1a365d; }
.stat-card .stat-label { font-size: 13px; color: #999; margin-top: 4px; }
.stat-card.blue { border-left: 4px solid #1890ff; }
.stat-card.green { border-left: 4px solid #52c41a; }
.stat-card.orange { border-left: 4px solid #faad14; }
.stat-card.red { border-left: 4px solid #ff4d4f; }

/* Alerts */
.alert { padding: 10px 16px; border-radius: 4px; margin-bottom: 12px; font-size: 13px; }
.alert-success { background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; }
.alert-error { background: #fff2f0; border: 1px solid #ffccc7; color: #cf1322; }
.alert-info { background: #e6f7ff; border: 1px solid #91d5ff; color: #096dd9; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 16px; }
.pagination button { padding: 6px 12px; border: 1px solid #d9d9d9; background: white; border-radius: 4px; cursor: pointer; font-size: 13px; }
.pagination button.active { background: #1890ff; color: white; border-color: #1890ff; }
.pagination button:hover:not(.active) { border-color: #1890ff; color: #1890ff; }

/* Tags */
.tag { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 12px; }
.tag-success { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.tag-warning { background: #fffbe6; color: #faad14; border: 1px solid #ffe58f; }
.tag-danger { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffccc7; }
.tag-info { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }
.tag-default { background: #fafafa; color: #999; border: 1px solid #d9d9d9; }

/* Chart container */
.chart-container { width: 100%; height: 300px; margin-bottom: 20px; }
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar .menu-item { padding: 10px 8px; text-align: center; font-size: 12px; }
    .main { margin-left: 60px; }
    .chart-row { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
}

/* Login page */
.login-container { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #1a365d 0%, #2563eb 100%); }
.login-box { background: white; border-radius: 12px; padding: 40px; width: 400px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.login-box h2 { text-align: center; margin-bottom: 8px; color: #1a365d; font-size: 24px; }
.login-box .subtitle { text-align: center; color: #999; margin-bottom: 32px; font-size: 14px; }
.login-box .btn { width: 100%; padding: 10px; font-size: 16px; margin-top: 8px; }

/* Search bar */
.search-bar { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-end; flex-wrap: wrap; }
.search-bar .form-group { margin-bottom: 0; min-width: 150px; }

/* Highlight */
.highlight-row { background: #fff7e6 !important; }
.passed-row { background: #f6ffed !important; }

/* Print */
@media print {
    .header, .sidebar, .btn, .search-bar { display: none !important; }
    .layout { margin: 0; }
    .main { margin-left: 0; }
}

/* Empty state */
.empty-state { text-align: center; padding: 40px; color: #999; }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

/* Steps */
.steps { display: flex; margin-bottom: 24px; }
.step { flex: 1; text-align: center; padding: 12px; position: relative; }
.step .step-circle { width: 30px; height: 30px; border-radius: 50%; background: #f0f0f0; color: #999; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: bold; }
.step.active .step-circle { background: #1890ff; color: white; }
.step.done .step-circle { background: #52c41a; color: white; }
.step .step-label { font-size: 12px; color: #999; margin-top: 4px; }
.step.active .step-label { color: #1890ff; font-weight: bold; }
.step.done .step-label { color: #52c41a; }
.step:after { content: ''; position: absolute; top: 15px; right: -50%; width: 100%; height: 2px; background: #f0f0f0; z-index: -1; }
.step:last-child:after { display: none; }
.step.done:after { background: #52c41a; }
