* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif; background: #f0f2f5; color: #333; }

/* 登录页 */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: #fff; padding: 48px 40px; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,0.08); text-align: center; width: 380px; }
.login-box h1 { font-size: 22px; margin-bottom: 8px; color: #1a1a1a; }
.login-subtitle { color: #999; margin-bottom: 28px; font-size: 14px; }
.login-box input { width: 100%; padding: 12px 16px; border: 1px solid #d9d9d9; border-radius: 8px; font-size: 15px; margin-bottom: 16px; outline: none; transition: border-color .2s; }
.login-box input:focus { border-color: #4a90d9; }
.login-box button { width: 100%; padding: 12px; background: #4a90d9; color: #fff; border: none; border-radius: 8px; font-size: 15px; cursor: pointer; transition: background .2s; }
.login-box button:hover { background: #357abd; }
.error { color: #e74c3c; margin-top: 12px; font-size: 14px; }

/* 主布局 */
.app-header { background: #fff; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 1px 4px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 100; }
.app-header h1 { font-size: 18px; font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 16px; }
.stats-bar { font-size: 13px; color: #666; }
.stats-bar span { margin: 0 6px; padding: 2px 10px; background: #e8f4fd; border-radius: 12px; color: #4a90d9; font-weight: 500; }
.btn-export { padding: 8px 18px; background: #52c41a; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500; }
.btn-export:hover { background: #49b016; }
.btn-logout { padding: 8px 14px; background: none; border: 1px solid #d9d9d9; border-radius: 6px; cursor: pointer; font-size: 13px; color: #666; }
.btn-logout:hover { border-color: #999; color: #333; }

/* 标签导航 */
.tab-nav { display: flex; background: #fff; padding: 0 24px; border-bottom: 1px solid #e8e8e8; }
.tab-nav button { padding: 14px 24px; background: none; border: none; border-bottom: 2px solid transparent; font-size: 15px; cursor: pointer; color: #666; transition: all .2s; }
.tab-nav button.active { color: #4a90d9; border-bottom-color: #4a90d9; font-weight: 500; }
.tab-nav button:hover { color: #4a90d9; }

/* 内容区 */
.tab-content { max-width: 1100px; margin: 24px auto; padding: 0 24px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* 表单样式 */
.form-card { background: #fff; border-radius: 10px; padding: 28px; box-shadow: 0 1px 6px rgba(0,0,0,0.04); margin-bottom: 20px; }
.form-card h2 { font-size: 17px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: #555; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px 14px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; outline: none; transition: border-color .2s; font-family: inherit; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: #4a90d9; }
.form-group textarea { min-height: 80px; resize: vertical; }
.form-group .hint { font-size: 12px; color: #999; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* 标签输入 */
.tag-input-wrap { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 6px; min-height: 42px; align-items: center; cursor: text; }
.tag-input-wrap:focus-within { border-color: #4a90d9; }
.tag { display: inline-flex; align-items: center; background: #e8f4fd; color: #4a90d9; padding: 4px 10px; border-radius: 4px; font-size: 13px; }
.tag .tag-remove { margin-left: 6px; cursor: pointer; font-weight: bold; color: #999; }
.tag .tag-remove:hover { color: #e74c3c; }
.tag-input-wrap input { border: none !important; padding: 4px !important; flex: 1; min-width: 80px; outline: none !important; font-size: 14px; }

/* 复选框组 */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 12px; }
.checkbox-group label { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 400; cursor: pointer; }
.checkbox-group input[type="checkbox"] { width: 16px; height: 16px; accent-color: #4a90d9; }

/* 按钮 */
.btn { padding: 10px 24px; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; font-weight: 500; transition: all .2s; }
.btn-primary { background: #4a90d9; color: #fff; }
.btn-primary:hover { background: #357abd; }
.btn-danger { background: #fff; color: #e74c3c; border: 1px solid #e74c3c; }
.btn-danger:hover { background: #e74c3c; color: #fff; }
.btn-ghost { background: #fff; color: #4a90d9; border: 1px solid #4a90d9; }
.btn-ghost:hover { background: #e8f4fd; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.form-actions { display: flex; gap: 12px; margin-top: 20px; }

/* 列表项 */
.list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.list-header h2 { font-size: 17px; }
.item-card { background: #fff; border-radius: 10px; padding: 20px 24px; box-shadow: 0 1px 6px rgba(0,0,0,0.04); margin-bottom: 14px; transition: box-shadow .2s; }
.item-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.item-card h3 { font-size: 15px; margin-bottom: 8px; color: #1a1a1a; }
.item-card .meta { font-size: 13px; color: #999; margin-bottom: 6px; }
.item-card .desc { font-size: 14px; color: #555; line-height: 1.6; }
.item-card .card-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-blue { background: #e8f4fd; color: #4a90d9; }
.badge-green { background: #e6f7e6; color: #52c41a; }
.badge-orange { background: #fff7e6; color: #fa8c16; }

/* 模态框 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 200; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 28px; width: 90%; max-width: 700px; max-height: 85vh; overflow-y: auto; box-shadow: 0 8px 40px rgba(0,0,0,0.15); }
.modal h2 { margin-bottom: 20px; font-size: 18px; }
.modal-close { float: right; background: none; border: none; font-size: 20px; cursor: pointer; color: #999; padding: 4px 8px; }
.modal-close:hover { color: #333; }

/* 空状态 */
.empty { text-align: center; padding: 48px 20px; color: #999; }
.empty p { margin-bottom: 16px; font-size: 15px; }

/* Toast */
.toast { position: fixed; top: 20px; right: 20px; padding: 12px 24px; background: #52c41a; color: #fff; border-radius: 8px; font-size: 14px; z-index: 300; animation: slideIn .3s ease; }
.toast.error { background: #e74c3c; }
@keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* 响应式 */
@media (max-width: 768px) {
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .tab-nav button { padding: 12px 14px; font-size: 14px; }
  .tab-content { padding: 0 12px; }
  .modal { width: 95%; padding: 20px; }
}
