* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f4f6f9; color: #1f2430; line-height: 1.5;
}
header {
  background: #fff; padding: 16px 24px; border-bottom: 1px solid #e4e8ef;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
header h1 { font-size: 18px; }
.status-bar { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #5b6472; }
button {
  background: #2b6cf6; color: #fff; border: none; padding: 7px 14px;
  border-radius: 6px; cursor: pointer; font-size: 13px;
}
button:hover { background: #1f5ae0; }
main { max-width: 1080px; margin: 24px auto; padding: 0 16px; display: grid; gap: 20px; }
.panel { background: #fff; border: 1px solid #e4e8ef; border-radius: 10px; padding: 18px 20px; }
.panel h2 { font-size: 15px; margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid #eef1f5; }
th { color: #7a8494; font-weight: 600; }
td .link { color: #2b6cf6; cursor: pointer; margin-right: 10px; }
#historyList { list-style: none; font-size: 13px; }
#historyList li { padding: 7px 0; border-bottom: 1px solid #eef1f5; color: #47505f; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 4px; margin-right: 6px; }
.tag.new { background: #e6f7ec; color: #1a9c52; }
.tag.updated { background: #fff2e0; color: #d98b12; }
.hidden { display: none !important; }
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.modal-box {
  background: #fff; border-radius: 10px; width: 100%; max-width: 760px;
  max-height: 85vh; display: flex; flex-direction: column; overflow: hidden;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid #eef1f5;
}
.modal-head button { background: transparent; color: #888; font-size: 22px; padding: 0 6px; }
#viewerBody, #configBody { padding: 16px 18px; overflow: auto; }
#viewerBody pre {
  background: #f7f8fa; padding: 12px; border-radius: 6px; font-size: 12px;
  white-space: pre-wrap; word-break: break-word; margin: 6px 0 16px;
}
.entry-name { font-weight: 600; font-size: 13px; margin-top: 10px; color: #2b3140; }
#configBody label { display: block; font-size: 13px; margin: 12px 0 4px; color: #47505f; }
#configBody textarea, #configBody input {
  width: 100%; padding: 8px; border: 1px solid #d5dae2; border-radius: 6px; font-size: 13px;
}
#configBody textarea { min-height: 80px; font-family: monospace; }
.hint { font-size: 12px; color: #8a93a2; margin-top: 4px; }
.wrow, .brow {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 10px; border: 1px solid #eef1f5; border-radius: 6px; margin: 6px 0; font-size: 13px;
}
.brow .link { cursor: pointer; color: #2b6cf6; }
.curdir { background: #f7f9fc; }
button.mini { padding: 3px 10px; font-size: 12px; }
button.danger { background: #e5533c; }
button.danger:hover { background: #cf4429; }
.crumbs { font-size: 13px; margin: 6px 0; color: #5b6472; }
.crumb { cursor: pointer; color: #2b6cf6; }
#browseBox { max-height: 220px; overflow: auto; border: 1px solid #eef1f5; border-radius: 6px; padding: 8px; margin-top: 8px; }
.addshare { display: flex; gap: 6px; margin-top: 6px; align-items: center; }
.addshare input { flex: 1; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-box {
  background: #fff; border: 1px solid #e4e8ef; border-radius: 12px;
  padding: 32px 28px; width: 320px; text-align: center;
}
.login-box h1 { font-size: 18px; margin-bottom: 6px; }
.login-box input {
  width: 100%; padding: 10px; margin: 14px 0; border: 1px solid #d5dae2;
  border-radius: 6px; font-size: 14px;
}
.login-box button { width: 100%; padding: 10px; font-size: 14px; }
.login-msg { color: #e5533c; font-size: 13px; margin-top: 10px; min-height: 18px; }
.apikey-box {
  background: #f7f9fc; border: 1px solid #eef1f5; border-radius: 6px;
  padding: 8px 10px; font-family: monospace; font-size: 12px; word-break: break-all; margin-top: 6px;
}
