/* 微光朋友圈 - 后台管理样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; background: #f0f2f5; color: #333; }

/* 登录页 */
.login-body { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.login-box { background: #fff; padding: 48px 40px; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.15); width: 100%; max-width: 400px; }
.login-logo { font-size: 28px; font-weight: 700; text-align: center; color: #333; margin-bottom: 8px; }
.login-sub { text-align: center; color: #999; font-size: 14px; margin-bottom: 32px; }
.login-box input { width: 100%; padding: 12px 16px; margin-bottom: 16px; border: 1px solid #e5e5e5; border-radius: 8px; font-size: 14px; outline: none; transition: border-color 0.2s; }
.login-box input:focus { border-color: #4BB0F8; }
.login-box button { width: 100%; padding: 12px; background: linear-gradient(135deg, #4BB0F8, #2E9BE8); color: #fff; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; transition: opacity 0.2s; }
.login-box button:hover { opacity: 0.9; }
.login-error { color: #ff4d4f; background: #fff2f0; padding: 10px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; text-align: center; }
.login-tip { text-align: center; color: #999; font-size: 12px; margin-top: 16px; }

/* 侧边栏 */
.admin-sidebar { position: fixed; left: 0; top: 52px; bottom: 0; width: 220px; background: #fff; border-right: 1px solid #e8e8e8; padding: 20px 0; z-index: 100; }
.sidebar-logo { font-size: 20px; font-weight: 700; padding: 0 24px 24px; color: #4BB0F8; border-bottom: 1px solid #f0f0f0; margin-bottom: 12px; }
.sidebar-item { display: flex; align-items: center; gap: 12px; padding: 14px 24px; color: #666; text-decoration: none; font-size: 14px; transition: all 0.2s; }
.sidebar-item:hover { background: #EAF4FD; color: #4BB0F8; }
.sidebar-item.active { background: #EAF4FD; color: #4BB0F8; font-weight: 600; }
.sidebar-icon { font-size: 18px; width: 24px; text-align: center; }

/* 顶栏 */
.admin-topbar { position: fixed; top: 0; left: 0; right: 0; height: 52px; background: #fff; border-bottom: 1px solid #e8e8e8; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; z-index: 200; }
.topbar-brand { font-size: 18px; font-weight: 700; color: #4BB0F8; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-site { font-size: 14px; color: #333; text-decoration: none; padding: 6px 14px; border-radius: 8px; background: #EAF4FD; color: #4BB0F8; transition: all .2s; }
.topbar-site:hover { background: #CFE9FC; }
.topbar-logout { font-size: 14px; color: #666; text-decoration: none; padding: 6px 14px; border-radius: 8px; border: 1px solid #e5e5e5; transition: all .2s; }
.topbar-logout:hover { background: #fff2f0; color: #ff4d4f; border-color: #ffccc7; }

/* 主内容区 */
.admin-main { margin-left: 220px; margin-top: 52px; padding: 32px; max-width: 1200px; }
.admin-main h1 { font-size: 24px; margin-bottom: 24px; font-weight: 600; }

/* 统计卡片 */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }
.stat-card { background: #fff; padding: 24px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); text-align: center; transition: transform 0.2s; }
.stat-card:hover { transform: translateY(-2px); }
.stat-icon { font-size: 32px; margin-bottom: 8px; }
.stat-num { font-size: 32px; font-weight: 700; color: #333; margin-bottom: 4px; }
.stat-label { font-size: 14px; color: #999; }

/* 卡片 */
.admin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.admin-card { background: #fff; padding: 24px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.admin-card h3 { font-size: 16px; margin-bottom: 16px; font-weight: 600; color: #333; }

/* 表格 */
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; padding: 12px; border-bottom: 2px solid #f0f0f0; color: #666; font-weight: 600; background: #fafafa; }
.admin-table td { padding: 12px; border-bottom: 1px solid #f0f0f0; color: #333; }
.admin-table tr:hover td { background: #fafafa; }
.admin-table a { color: #576b95; text-decoration: none; }
.admin-table a:hover { text-decoration: underline; }
.link-danger { color: #ff4d4f !important; }
.link-edit { color: #4BB0F8 !important; margin-right: 10px; }
.edit-form { max-width: 720px; }
.edit-form textarea, .edit-form select { width: 100%; padding: 10px 12px; border: 1px solid #e5e5e5; border-radius: 6px; font-size: 14px; outline: none; font-family: inherit; box-sizing: border-box; }
.edit-form textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.edit-form .btn-secondary { display: inline-block; margin-left: 8px; text-decoration: none; padding: 10px 24px; background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; color: #666; font-size: 14px; }

/* 筛选 */
.filter-bar { margin-bottom: 16px; }
.filter-form { display: flex; gap: 12px; align-items: center; }
.filter-form input, .filter-form select { padding: 8px 12px; border: 1px solid #e5e5e5; border-radius: 6px; font-size: 14px; outline: none; }
.filter-form button { padding: 8px 16px; background: #4BB0F8; color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.batch-bar { margin-bottom: 12px; display: flex; gap: 8px; }
.batch-bar select { padding: 6px 12px; border: 1px solid #e5e5e5; border-radius: 6px; }
.batch-bar button { padding: 6px 16px; background: #ff4d4f; color: #fff; border: none; border-radius: 6px; cursor: pointer; }

/* 分页 */
.pagination { margin-top: 20px; display: flex; gap: 8px; }
.pagination a { padding: 6px 12px; background: #fff; border: 1px solid #e5e5e5; border-radius: 6px; color: #333; text-decoration: none; font-size: 14px; }
.pagination a.active { background: #4BB0F8; color: #fff; border-color: #4BB0F8; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group select { width: 100%; max-width: 400px; padding: 10px 12px; border: 1px solid #e5e5e5; border-radius: 6px; font-size: 14px; outline: none; }
.form-group input:focus { border-color: #4BB0F8; }
.btn-primary { padding: 10px 24px; background: linear-gradient(135deg, #4BB0F8, #2E9BE8); color: #fff; border: none; border-radius: 8px; font-size: 14px; cursor: pointer; }
.btn-primary:hover { opacity: 0.9; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #EAF4FD; color: #4BB0F8; border: 1px solid #AAD9F8; }

/* ===== 设置页页签（Tab） ===== */
.settings-tabs { display: flex; gap: 4px; border-bottom: 2px solid #e8e8e8; margin-bottom: 24px; flex-wrap: wrap; }
.settings-tab { padding: 10px 20px; font-size: 15px; color: #666; text-decoration: none; border-radius: 8px 8px 0 0; cursor: pointer; transition: all .2s; border: none; background: none; font-family: inherit; }
.settings-tab:hover { color: #4BB0F8; background: #f5f8fc; }
.settings-tab.active { color: #4BB0F8; font-weight: 600; background: #EAF4FD; border-bottom: 2px solid #4BB0F8; margin-bottom: -2px; }
.settings-panel { display: none; }
.settings-panel.active { display: block; }

/* 系统信息 */
.sys-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sys-info div { display: flex; justify-content: space-between; padding: 12px; background: #fafafa; border-radius: 8px; font-size: 14px; }

@media (max-width: 768px) {
  .admin-sidebar { width: 64px; top: 52px; }
  .sidebar-logo { font-size: 14px; padding: 0 8px 16px; }
  .sidebar-item { padding: 14px 8px; justify-content: center; }
  .sidebar-item span:last-child { display: none; }
  .admin-main { margin-left: 64px; margin-top: 52px; padding: 16px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .admin-row { grid-template-columns: 1fr; }
  .sys-info { grid-template-columns: 1fr; }
  .settings-tabs { gap: 2px; }
  .settings-tab { padding: 8px 12px; font-size: 13px; }
}
