/* ========================================
   后台管理系统样式
   ======================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif; background: #f0f2f5; color: #333; font-size: 14px; }

/* 登录页 */
.login-wrapper { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-box { width: 400px; background: #fff; border-radius: 8px; padding: 40px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); }
.login-box h2 { text-align: center; margin-bottom: 30px; color: #333; font-size: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; color: #555; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; transition: border 0.3s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #667eea; outline: none; box-shadow: 0 0 0 2px rgba(102,126,234,0.2); }
.btn { display: inline-block; padding: 10px 24px; border: none; border-radius: 4px; font-size: 14px; cursor: pointer; text-decoration: none; transition: 0.3s; }
.btn-primary { background: #667eea; color: #fff; }
.btn-primary:hover { background: #5a6fd6; }
.btn-success { background: #52c41a; color: #fff; }
.btn-success:hover { background: #49b018; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-danger:hover { background: #e04345; }
.btn-warning { background: #faad14; color: #fff; }
.btn-warning:hover { background: #e09d12; }
.btn-default { background: #fff; color: #333; border: 1px solid #d9d9d9; }
.btn-default:hover { border-color: #667eea; color: #667eea; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-block { width: 100%; }
.btn + .btn { margin-left: 6px; }

/* 布局 */
.admin-wrapper { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #001529; color: #fff; flex-shrink: 0; }
.sidebar .logo { padding: 20px; text-align: center; font-size: 20px; font-weight: bold; border-bottom: 1px solid rgba(255,255,255,0.1); color: #fff; }
.sidebar .user-info { padding: 15px 20px; font-size: 13px; color: rgba(255,255,255,0.65); border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar .user-info strong { color: #fff; }
.sidebar nav { padding: 10px 0; }
.sidebar nav a { display: block; padding: 12px 24px; color: rgba(255,255,255,0.65); text-decoration: none; transition: 0.3s; font-size: 14px; }
.sidebar nav a:hover, .sidebar nav a.active { color: #fff; background: #1890ff; }
.main-content { flex: 1; display: flex; flex-direction: column; }
.main-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.08); }
.main-header h3 { font-size: 16px; }
.main-header .header-right { display: flex; align-items: center; gap: 15px; }
.main-body { padding: 24px; flex: 1; }

/* 卡片/面板 */
.panel { background: #fff; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 20px; }
.panel-header { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.panel-header h4 { font-size: 15px; }
.panel-body { padding: 20px; }

/* 表格 */
table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #f0f0f0; }
table th { background: #fafafa; font-weight: 600; color: #555; font-size: 13px; }
table tr:hover { background: #fafafa; }

/* 搜索栏 */
.search-bar { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 20px; }
.search-bar .form-group { margin-bottom: 0; }
.search-bar input { width: 200px; }

/* 分页 */
.pagination { margin-top: 20px; text-align: center; }
.pagination a, .pagination span { display: inline-block; padding: 6px 12px; margin: 0 2px; border: 1px solid #d9d9d9; border-radius: 4px; text-decoration: none; color: #333; font-size: 13px; }
.pagination a:hover { border-color: #667eea; color: #667eea; }
.pagination span.current { background: #667eea; color: #fff; border-color: #667eea; }
.pagination span.info { border: none; color: #999; }

/* 提示信息 */
.alert { padding: 12px 20px; margin-bottom: 16px; border-radius: 4px; }
.alert-success { background: #f6ffed; border: 1px solid #b7eb8f; color: #52c41a; }
.alert-error { background: #fff2f0; border: 1px solid #ffccc7; color: #ff4d4f; }

/* 弹窗 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.45); z-index: 1000; justify-content: center; align-items: center; }
.modal-overlay.show { display: flex; }
.modal-box { background: #fff; border-radius: 8px; width: 500px; max-height: 80vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.modal-header { padding: 16px 24px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.modal-header h4 { font-size: 16px; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #999; padding: 0 4px; }
.modal-body { padding: 24px; }
.modal-footer { padding: 12px 24px; border-top: 1px solid #f0f0f0; text-align: right; }

/* 复选框组 */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-group label { display: flex; align-items: center; gap: 4px; font-size: 13px; cursor: pointer; padding: 4px 8px; border: 1px solid #f0f0f0; border-radius: 4px; }
.checkbox-group label:hover { border-color: #667eea; }
.checkbox-group h5 { width: 100%; margin: 8px 0 4px; color: #555; font-size: 14px; border-bottom: 1px solid #f0f0f0; padding-bottom: 4px; }

/* 翻译管理特殊样式 */
.translation-grid td input { width: 100%; padding: 6px 8px; border: 1px solid #d9d9d9; border-radius: 3px; font-size: 13px; }
.translation-grid td input:focus { border-color: #667eea; outline: none; }

/* Dashboard 统计卡片 */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }
.stat-card { background: #fff; padding: 24px; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.stat-card .stat-value { font-size: 32px; font-weight: bold; color: #1890ff; }
.stat-card .stat-label { font-size: 14px; color: #999; margin-top: 4px; }

/* 响应式 */
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar .logo, .sidebar nav a { font-size: 12px; padding: 12px 8px; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .login-box { width: 90%; }
}
