/* base.css — 列表页与编辑页共用的基础样式 */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f2f3f5;
  color: #1f2329;
  font-size: 14px;
}

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

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* 顶栏 */
.app-header { background: #1f2329; color: #fff; }
.app-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 52px; gap: 12px;
}
.app-header h1 { font-size: 16px; margin: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-header h1 a { color: #fff; }
.header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.header-left .btn {
  flex: none;
  background: rgba(255, 255, 255, 0.12); color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.header-left .btn:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.header-actions .btn {
  background: rgba(255, 255, 255, 0.12); color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.header-actions .btn:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 6px 14px; font-size: 13px; line-height: 1.5;
  border: 1px solid #d0d3d6; border-radius: 6px;
  background: #fff; color: #1f2329; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: #07c160; color: #07c160; }
.btn.primary { background: #07c160; border-color: #07c160; color: #fff; }
.btn.primary:hover { background: #06ad56; color: #fff; }
.btn.danger { color: #e64340; border-color: #e64340; background: #fff; }
.btn.danger:hover { background: #e64340; color: #fff; }
.btn.mini { padding: 2px 8px; font-size: 12px; border-radius: 5px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 表单控件 */
input[type="text"], input[type="search"], select, textarea {
  font: inherit; color: inherit; padding: 7px 10px;
  border: 1px solid #d0d3d6; border-radius: 6px; background: #fff; outline: none;
}
input[type="text"]:focus, select:focus, textarea:focus { border-color: #07c160; }
input.invalid { border-color: #e64340 !important; }

.add-bar { display: flex; gap: 8px; margin: 12px 0; }
.add-bar input { flex: 1; }

/* 卡片列表 */
.list-head { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.list-head h2 { font-size: 18px; margin: 0; }
.card-list { margin: 4px 0 40px; }
.card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 14px 16px; margin-top: 10px;
}
.card .card-title { font-size: 15px; font-weight: 600; }
.card .card-title.link { cursor: pointer; }
.card .card-title.link:hover { color: #07c160; }
.card .card-meta { color: #8a9099; font-size: 12px; margin-top: 4px; }
.card .card-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

.empty-tip { color: #8a9099; text-align: center; padding: 40px 0; }
.back-link { display: inline-block; margin-top: 16px; color: #5a6068; }
.muted { color: #8a9099; }

/* 头像 */
.avatar {
  border-radius: 4px; object-fit: cover; flex: none;
  display: inline-block; text-align: center; color: #fff; overflow: hidden;
}
.avatar-fallback { user-select: none; }
