* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #1890ff;
    --primary-light: #e6f7ff;
    --success: #52c41a;
    --danger: #f5222d;
    --warning: #faad14;
    --text: #333;
    --text-light: #999;
    --border: #e8e8e8;
    --bg: #f0f2f5;
}
body { font-family: -apple-system, 'Microsoft YaHei', sans-serif; font-size: 14px; color: var(--text); background: var(--bg); }
.login-page { display: flex; justify-content: center; align-items: center; height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-box { background: white; padding: 40px; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); width: 360px; text-align: center; }
.login-box h1 { margin-bottom: 24px; color: var(--primary); font-size: 22px; }
.login-box input { width: 100%; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px; }
.login-box button { width: 100%; padding: 10px; background: var(--primary); color: white; border: none; border-radius: 4px; font-size: 14px; cursor: pointer; }
.login-box button:hover { opacity: 0.9; }

#mainPage { display: flex; height: 100vh; }
.sidebar { width: 220px; background: #001529; color: rgba(255,255,255,0.85); overflow-y: auto; flex-shrink: 0; }
.sidebar-header { padding: 16px 20px; font-size: 16px; font-weight: bold; border-bottom: 1px solid rgba(255,255,255,0.1); }
.nav-section { padding: 8px 0; }
.nav-title { padding: 4px 20px; font-size: 12px; color: rgba(255,255,255,0.4); text-transform: uppercase; }
.nav-item { display: block; padding: 8px 20px; color: rgba(255,255,255,0.85); text-decoration: none; cursor: pointer; border: none; background: none; width: 100%; text-align: left; font-size: 14px; }
.nav-item:hover, .nav-item.active { background: var(--primary); color: white; }
.nav-icon { margin-right: 6px; font-size: 10px; }

.content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.top-bar { background: white; border-bottom: 1px solid var(--border); height: 40px; display: flex; align-items: center; padding: 0 12px; }
.tabs { display: flex; gap: 2px; }
.tab { padding: 6px 16px; background: var(--bg); border-radius: 4px 4px 0 0; cursor: pointer; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.tab.active { background: var(--primary); color: white; }
.tab-close { cursor: pointer; opacity: 0.6; }
.tab-close:hover { opacity: 1; }

.page-content { flex: 1; overflow-y: auto; padding: 16px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.page-title { font-size: 20px; font-weight: 600; }
.btn { padding: 6px 16px; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; font-size: 14px; background: white; }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-danger { color: var(--danger); border-color: var(--danger); }

.search-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.search-bar input, .search-bar select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 13px; }

.table-wrap { background: white; border-radius: 4px; overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 8px 10px; border: 1px solid var(--border); text-align: left; }
.data-table th { background: #fafafa; font-weight: 600; white-space: nowrap; }
.data-table tr:hover { background: var(--primary-light); }
.data-table tfoot td { font-weight: bold; background: #f0f5ff; }

.form-row { display: flex; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.form-group { flex: 1; min-width: 200px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 500; }
.form-group input, .form-group select { width: 100%; padding: 6px 10px; border: 1px solid var(--border); border-radius: 4px; }
.form-group input:focus, .form-group select:focus { border-color: var(--primary); outline: none; }

.empty-state { text-align: center; padding: 40px; color: var(--text-light); }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 13px; padding: 0 4px; }
.btn-link:hover { text-decoration: underline; }
.danger { color: var(--danger); }
.status-tag { padding: 2px 8px; border-radius: 3px; font-size: 12px; }
.status-draft { background: #fff7e6; color: #d48806; }
.status-audited { background: #f6ffed; color: #389e0d; }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal { background: white; border-radius: 8px; padding: 24px; width: 80%; max-width: 800px; max-height: 80vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-title { font-size: 18px; font-weight: 600; }
.modal-close { font-size: 24px; cursor: pointer; }

.toast { position: fixed; top: 60px; right: 20px; padding: 10px 20px; border-radius: 4px; color: white; font-size: 14px; z-index: 2000; animation: fadeIn 0.3s; }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 16px; }
.pagination button { padding: 4px 10px; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; background: white; }
.pagination button.active { background: var(--primary); color: white; }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }
