/* ===== AI 个人信息工作台 — 白色科技风 ===== */
:root {
  --bg: #f5f7fa;
  --bg-card: #ffffff;
  --primary: #1890ff;
  --primary-dark: #096dd9;
  --primary-light: #e6f7ff;
  --text: #1a1a2e;
  --text-secondary: #595959;
  --text-muted: #8c8c8c;
  --border: #e8e8e8;
  --success: #52c41a;
  --warning: #faad14;
  --error: #ff4d4f;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 16px rgba(24, 144, 255, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== 布局 ===== */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; background: var(--bg-card); border-right: 1px solid var(--border);
  padding: 20px 0; position: fixed; height: 100vh; overflow-y: auto; z-index: 100;
}
.sidebar-logo {
  padding: 0 24px 20px; font-size: 16px; font-weight: 700; color: var(--primary);
  border-bottom: 1px solid var(--border); margin-bottom: 12px; white-space: nowrap;
}
.sidebar-section { padding: 8px 0; }
.sidebar-section-title { padding: 4px 24px; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.sidebar a {
  display: block; padding: 10px 24px; color: var(--text-secondary); text-decoration: none;
  transition: all 0.2s; font-size: 13px;
}
.sidebar a:hover { background: var(--primary-light); color: var(--primary); }
.sidebar a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; border-right: 3px solid var(--primary); }

.main-content { flex: 1; margin-left: 220px; padding: 24px 32px; max-width: 1200px; }

/* ===== 页头 ===== */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-title { font-size: 20px; font-weight: 700; }
.page-actions { display: flex; gap: 12px; }

/* ===== 卡片 ===== */
.card {
  background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 16px; transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-hover); }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.card-title { font-size: 15px; font-weight: 600; color: var(--text); }
.card-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.card-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.6; }
.card-footer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* 标签 */
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500;
}
.tag-primary { background: var(--primary-light); color: var(--primary); }
.tag-success { background: #f6ffed; color: var(--success); }
.tag-warning { background: #fffbe6; color: var(--warning); }
.tag-muted { background: #f5f5f5; color: var(--text-muted); }

/* ===== 按钮 ===== */
.btn {
  padding: 6px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 13px;
  transition: all 0.2s; display: inline-flex; align-items: center; gap: 4px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: transparent; border: 1px solid var(--error); color: var(--error); }
.btn-danger:hover { background: var(--error); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 4px;
  font-size: 13px; transition: border-color 0.2s; background: #fff;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--primary); }
.form-textarea { resize: vertical; min-height: 100px; font-family: inherit; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== 表格 ===== */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
th { background: #fafafa; font-weight: 600; color: var(--text-secondary); }
tr:hover { background: #fafafa; }

/* ===== 提示 ===== */
.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; font-size: 13px; }
.alert-info { background: var(--primary-light); color: var(--primary); }
.alert-success { background: #f6ffed; color: var(--success); }
.alert-error { background: #fff2f0; color: var(--error); }
.alert-warning { background: #fffbe6; color: var(--warning); }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }

/* ===== 加载 ===== */
.loading { text-align: center; padding: 40px; color: var(--text-muted); }
.spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 模态框 ===== */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.45); z-index: 1000; display: none; justify-content: center; align-items: center; }
.modal-overlay.show { display: flex; }
.modal { background: #fff; border-radius: 8px; padding: 24px; max-width: 800px; width: 90%; max-height: 85vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { cursor: pointer; font-size: 20px; color: var(--text-muted); background: none; border: none; }

/* ===== 登录页 ===== */
.login-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #e6f7ff 0%, #f5f7fa 100%); }
.login-box { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 8px 32px rgba(24,144,255,0.12); width: 380px; }
.login-title { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 8px; color: var(--text); }
.login-subtitle { font-size: 13px; text-align: center; color: var(--text-muted); margin-bottom: 28px; }
.login-form .form-group { margin-bottom: 20px; }

/* 选题材料样式 */
.material-section { margin-bottom: 20px; }
.material-section h3 { font-size: 14px; color: var(--primary); margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.material-content { font-size: 13px; color: var(--text-secondary); line-height: 1.8; white-space: pre-wrap; }
.search-result-item { padding: 10px; border: 1px solid var(--border); border-radius: 4px; margin-bottom: 8px; }
.search-result-item a { color: var(--primary); text-decoration: none; }
.search-result-item a:hover { text-decoration: underline; }

/* 统计数字 */
.stats-row { display: flex; gap: 16px; margin-bottom: 20px; }
.stat-card { flex: 1; background: #fff; border-radius: 8px; padding: 16px; box-shadow: var(--shadow); text-align: center; }
.stat-number { font-size: 24px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
