/* 表情包小程序管理后台 样式 */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: #333;
  background: #f5f6f8;
}

a { color: #ff9800; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 顶栏 */
.topbar {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 24px;
  background: #23262e;
  color: #fff;
}
.brand { font-size: 16px; font-weight: 600; margin-right: 32px; }
.nav { display: flex; gap: 6px; flex: 1; }
.nav a {
  padding: 8px 14px;
  color: #c8cbd2;
  border-radius: 6px;
}
.nav a:hover { background: #333741; color: #fff; text-decoration: none; }
.nav a.active { background: #ff9800; color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.admin-name { color: #9aa0aa; }
.logout { color: #c8cbd2; }

/* 页面主体 */
.wrap {
  max-width: 1200px;
  margin: 24px auto 60px;
  padding: 0 24px;
}
.page-title { font-size: 20px; font-weight: 600; margin-bottom: 16px; }
.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title-row .page-title { margin-bottom: 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 按钮 */
.btn {
  display: inline-block;
  padding: 8px 16px;
  font-size: 14px;
  color: #333;
  background: #fff;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.2;
}
.btn:hover { border-color: #ff9800; color: #ff9800; text-decoration: none; }
.btn.primary { background: #ff9800; border-color: #ff9800; color: #fff; }
.btn.primary:hover { background: #ef8c00; color: #fff; }
.btn.block { display: block; width: 100%; text-align: center; }

/* 卡片 */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.card-num { font-size: 28px; font-weight: 700; color: #ff9800; }
.card-label { margin-top: 6px; color: #888; }

/* 面板 */
.panel {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.panel-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }

/* 搜索栏 */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-bar input {
  flex: 1;
  min-width: 220px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  font-size: 14px;
}
.total { color: #888; margin-left: auto; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #f0f1f3;
  vertical-align: middle;
}
.table th { color: #888; font-weight: 500; background: #fafbfc; }
.table tr:hover td { background: #fffdf8; }
.table .ops { width: 130px; white-space: nowrap; }
.table .empty { text-align: center; color: #aaa; padding: 30px 0; }
.mono { font-family: Consolas, Monaco, monospace; font-size: 13px; }

/* 行内操作 */
.inline { display: inline; }
.link {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  color: #ff9800;
  cursor: pointer;
  font-family: inherit;
}
.link:hover { text-decoration: underline; }
.link.danger { color: #e5484d; margin-left: 10px; }

/* 分页 */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  color: #888;
}
.pager a {
  padding: 6px 14px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  color: #333;
  background: #fff;
}
.pager a:hover { border-color: #ff9800; color: #ff9800; text-decoration: none; }

/* 表单 */
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; color: #555; }
.form input[type="text"],
.form input[type="password"],
.form textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
.form textarea { font-family: Consolas, Monaco, monospace; font-size: 13px; line-height: 1.6; resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: #ff9800; }
.form input:disabled { background: #f5f6f8; color: #999; }
.form .checkbox { flex-direction: row; align-items: center; gap: 8px; }
.form .checkbox input { width: auto; }
.form-actions { display: flex; align-items: center; gap: 12px; }

/* 提示 */
.flash {
  padding: 10px 16px;
  margin-bottom: 16px;
  background: #eefaf1;
  border: 1px solid #c6f0d2;
  color: #1f7a3d;
  border-radius: 8px;
}
.error {
  padding: 10px 16px;
  margin-bottom: 16px;
  background: #fdecec;
  border: 1px solid #f5c2c4;
  color: #c92a2a;
  border-radius: 8px;
}
.hint { color: #999; font-size: 13px; }

/* 头像 / 预览 */
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #eee; }
.preview {
  display: inline-block;
  padding: 8px;
  background: #fafbfc;
  border: 1px dashed #dcdfe6;
  border-radius: 8px;
}
.preview img { display: block; max-width: 260px; max-height: 260px; border-radius: 6px; }

/* 壁纸网格 */
.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.wallpaper-item {
  border: 1px solid #f0f1f3;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.wallpaper-thumb {
  height: 220px;
  background: #f5f6f8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wallpaper-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wallpaper-meta { padding: 10px 12px 0; }
.wallpaper-ops { padding: 8px 12px 12px; }
.ellipsis {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #666;
}

/* 快捷入口 */
.quick-links { display: flex; gap: 12px; flex-wrap: wrap; }

/* 登录页 */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #23262e;
}
.login-box {
  width: 360px;
  padding: 32px;
  background: #fff;
  border-radius: 12px;
}
.login-box h1 { margin: 0 0 8px; font-size: 20px; }
.login-tip { margin: 0 0 20px; color: #888; }
.login-box form { display: flex; flex-direction: column; gap: 14px; }
.login-box label { display: flex; flex-direction: column; gap: 6px; color: #555; }
.login-box input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  font-size: 14px;
}
.login-box input:focus { outline: none; border-color: #ff9800; }

@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .wallpaper-grid { grid-template-columns: repeat(2, 1fr); }
  .nav a { padding: 8px 10px; }
}
