/**
 * 阳光学情分析报告 - 全局样式
 * 品牌色：#e94560 (红) / #7b2cbf (紫)
 * 圆角：8-16px / 阴影：柔和 / 响应式：移动端适配
 */

/* ========== 基础重置 ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #333; background: #f5f6fa; line-height: 1.6; }
a { color: #e94560; text-decoration: none; }
a:hover { text-decoration: underline; }
input, select, textarea, button { font-family: inherit; font-size: 14px; }

/* ========== 布局 ========== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.main-content { padding: 24px 0; min-height: calc(100vh - 60px); }

/* ========== 卡片 ========== */
.card { background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); padding: 24px; margin-bottom: 20px; }
.card-header { font-size: 18px; font-weight: 600; color: #222; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; }

/* ========== 按钮 ========== */
.btn { display: inline-block; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: all 0.2s; text-decoration: none; }
.btn-primary { background: #e94560; color: #fff; }
.btn-primary:hover { background: #d63e56; text-decoration: none; color: #fff; }
.btn-secondary { background: #7b2cbf; color: #fff; }
.btn-secondary:hover { background: #6a24a8; text-decoration: none; color: #fff; }
.btn-outline { background: transparent; color: #e94560; border: 1px solid #e94560; }
.btn-outline:hover { background: #e94560; color: #fff; text-decoration: none; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-danger:hover { background: #c82333; text-decoration: none; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ========== 表单 ========== */
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; color: #555; }
.form-input { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; transition: border-color 0.2s; }
.form-input:focus { outline: none; border-color: #e94560; box-shadow: 0 0 0 3px rgba(233,69,96,0.1); }
.form-select { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; background: #fff; }
.form-error { color: #dc3545; font-size: 13px; margin-top: 4px; }

/* ========== 表格 ========== */
.table-wrapper { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { background: #f8f9fa; padding: 12px 16px; text-align: left; font-weight: 600; color: #555; border-bottom: 2px solid #eee; }
.table td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; }
.table tr:hover td { background: #f8f9fa; }

/* ========== 提示信息 ========== */
.alert { padding: 14px 20px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ========== 徽章 ========== */
.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info { background: #d1ecf1; color: #0c5460; }

/* ========== 网格 ========== */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .container { padding: 0 12px; }
    .card { padding: 16px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    nav { flex-wrap: wrap; height: auto; padding: 12px; }
    nav > div { margin-top: 8px; }
}

/* ========== 动画 ========== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.3s ease-out; }

/* ========== 登录/注册页 ========== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e94560 0%, #7b2cbf 100%); }
.auth-card { background: #fff; border-radius: 16px; padding: 40px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
.auth-title { font-size: 24px; font-weight: 700; color: #222; margin-bottom: 8px; }
.auth-subtitle { font-size: 14px; color: #888; margin-bottom: 28px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: #888; }
