:root {
  --green: #07c160;
  --green-dark: #06a050;
  --bg: #f5f6f7;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #8a8a8a;
  --border: #ececec;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
  padding-bottom: 24px;
}
.topbar {
  background: var(--green); color: #fff; padding: 16px 18px; font-size: 18px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar a { color: #fff; text-decoration: none; font-size: 14px; opacity: .9; }
.container { padding: 16px; max-width: 560px; margin: 0 auto; }
.card { background: var(--card); border-radius: 12px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.hint { color: var(--muted); font-size: 13px; text-align: center; margin: 8px 0 16px; }
.btn {
  display: inline-block; border: none; border-radius: 10px; padding: 12px 16px; font-size: 15px;
  font-weight: 600; cursor: pointer; text-align: center; width: 100%;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:active { background: var(--green-dark); }
.btn-ghost { background: #f0f0f0; color: #333; }
.btn-danger { background: #fa5151; color: #fff; }
.btn-row { display: flex; gap: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: none; }
.tag { display: inline-block; background: #e8f7ee; color: var(--green); border-radius: 6px; padding: 2px 8px; font-size: 12px; }
.status-available { color: var(--green); }
.status-borrowed { color: #fa5151; }
input[type=text], input[type=number], input[type=date], select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 15px; margin: 6px 0; background: #fff;
}
.qr-img { width: 240px; height: 240px; display: block; margin: 12px auto; border: 1px solid var(--border); border-radius: 8px; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 13px; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: #fff; border-radius: 14px; padding: 18px; width: 80%; max-width: 320px; }
.modal-title { font-weight: 600; margin-bottom: 10px; }
.modal-input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 15px; }
.modal-actions { display: flex; gap: 10px; margin-top: 14px; }
.toast { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 99; }
.nav { display: flex; gap: 10px; margin-top: 8px; }
.nav a { flex: 1; text-align: center; text-decoration: none; color: var(--green); background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px; font-size: 13px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.chip-btn {
  border: 1px solid var(--border); background: #fff; color: #555; border-radius: 15px;
  padding: 4px 14px; font-size: 13px; cursor: pointer;
}
.chip-btn.on { background: var(--green); border-color: var(--green); color: #fff; }
