* { box-sizing: border-box; }

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

.hidden { display: none !important; }
.muted { color: #6b7280; font-weight: normal; }
.small { font-size: 12px; }
.ok { color: #0f7b3f; }
.err { color: #c0392b; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #1f2329;
  color: #fff;
}
.brand { font-weight: 600; letter-spacing: .5px; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

main { max-width: 900px; margin: 0 auto; padding: 20px 16px 60px; }

.card {
  background: #fff;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
}
.card h2 { margin: 0 0 14px; font-size: 16px; }
.card h3 { margin: 16px 0 8px; font-size: 14px; }

.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab {
  border: 1px solid #d0d3d9;
  background: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.tab.active { background: #1f2329; color: #fff; border-color: #1f2329; }

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; margin-bottom: 6px; font-size: 13px; color: #4e5969; }
.field em { font-style: normal; }

input[type="text"], textarea, select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #d0d3d9;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
textarea { resize: vertical; }
input[type="file"] { font-size: 13px; }

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row .field { flex: 1; margin-bottom: 0; }

.btn {
  border: 1px solid #d0d3d9;
  background: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  color: #1f2329;
  display: inline-block;
}
.btn:hover { border-color: #1f2329; }
.btn.primary { background: #1f2329; color: #fff; border-color: #1f2329; }
.btn.danger { color: #c0392b; border-color: #f0c4bf; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.link { background: none; border: none; color: #fff; text-decoration: underline; padding: 0 4px; }

.list { margin-top: 10px; }
.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f1f3;
}
.item:last-child { border-bottom: none; }
.item.clickable { cursor: pointer; }
.item.clickable:hover { background: #fafbfc; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 28px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef0f3;
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 12px;
}
.chip button { border: none; background: none; cursor: pointer; color: #6b7280; font-size: 14px; line-height: 1; }

.login { text-align: center; padding: 48px 24px; }
.login h2 { margin-bottom: 8px; }
.login .btn { margin-top: 16px; }

@media (max-width: 600px) {
  .item { flex-direction: column; align-items: flex-start; }
  .row { flex-direction: column; align-items: stretch; }
}
