/* 知识库上传入口样式 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Segoe UI", Roboto, sans-serif;
  background: #f4f8ef; color: #2c3b23;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; }

/* ---------- 口令门 ---------- */
.gate {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #e8f5dc 0%, #f4f8ef 55%, #eef6e6 100%);
  padding: 20px;
}
.gate-card {
  width: 100%; max-width: 360px; background: #fff; border-radius: 22px;
  padding: 30px 24px 24px; box-shadow: 0 18px 50px rgba(60, 90, 45, .14);
  text-align: center;
}
.gate-card h1 { margin: 0 0 6px; font-size: 21px; color: #3d5a2e; }
.gate-card .sub { margin: 0 0 22px; font-size: 13px; color: #8a9a80; }
.gate-card input {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 2px solid #e0ecd8;
  font-size: 16px; outline: none; background: #fbfdf9; margin-bottom: 12px;
  font-family: inherit;
}
.gate-card input:focus { border-color: #8cc43f; background: #fff; }
.primary {
  width: 100%; padding: 14px; border-radius: 13px; background: #8cc43f; color: #fff;
  font-size: 16px; font-weight: 700; box-shadow: 0 4px 14px rgba(140, 196, 63, .38);
}
.primary:active { transform: scale(.98); }
.primary:disabled { background: #c8d6bd; box-shadow: none; }
.err { margin: 10px 0 0; font-size: 13px; color: #e0564a; min-height: 18px; }

/* ---------- 顶栏 ---------- */
header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px); border-bottom: 2px solid #d9ead0;
}
.brand { font-weight: 800; font-size: 16px; color: #4b8a2f; }
.hdr-right { display: flex; align-items: center; gap: 10px; }
.chip {
  font-size: 12px; color: #6c7f62; background: #eef6e6;
  padding: 4px 10px; border-radius: 20px;
}
.ghost {
  background: #eef6e6; color: #4b8a2f; font-size: 13px; font-weight: 600;
  padding: 7px 13px; border-radius: 20px;
}
.ghost:active { transform: scale(.96); }

/* ---------- 主体 ---------- */
main { max-width: 820px; margin: 0 auto; padding: 16px 14px 60px; }
.card {
  background: #fff; border-radius: 18px; padding: 18px 16px;
  box-shadow: 0 3px 14px rgba(80, 110, 60, .07); margin-bottom: 16px;
}
.card h2 { margin: 0 0 14px; font-size: 15px; color: #4b8a2f; }

/* 拖拽区 */
.drop {
  border: 2.5px dashed #cbe3b6; border-radius: 16px; padding: 26px 16px;
  text-align: center; background: #fbfdf8; transition: all .18s; cursor: pointer;
}
.drop.over { border-color: #8cc43f; background: #f2fae9; transform: scale(1.01); }
.drop-icon { font-size: 34px; margin-bottom: 8px; }
.drop-main { font-size: 14px; font-weight: 600; color: #4d6142; margin-bottom: 6px; }
.drop-sub { font-size: 11.5px; color: #92a288; line-height: 1.6; }

/* 表单 */
.row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.fld { flex: 1; min-width: 140px; display: block; }
.fld > span { display: block; font-size: 11.5px; color: #6c7f62; margin-bottom: 6px; font-weight: 600; }
.fld input {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 2px solid #e6f0de;
  font-size: 14px; outline: none; background: #fbfdf9; font-family: inherit;
}
.fld input:focus { border-color: #8cc43f; background: #fff; }

/* 待上传队列 */
.queue { margin-top: 14px; }
.qrow {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  background: #f7fbf3; border-radius: 10px; margin-bottom: 6px; font-size: 13px;
}
.qname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qsize { color: #8fa385; font-size: 11.5px; flex: none; }
.qx {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: #e8e8e8; color: #777; font-size: 13px; line-height: 22px; text-align: center;
}
.qx:active { background: #d6d6d6; }

#btn-up { margin-top: 12px; }

/* 进度 */
.progress { margin-top: 14px; }
.bar { height: 8px; background: #eaf3e2; border-radius: 6px; overflow: hidden; }
#bar-in { height: 100%; width: 0; background: linear-gradient(90deg, #9ed457, #7db83a); transition: width .2s; }
.prog-text { font-size: 12px; color: #7d8f73; margin-top: 8px; }

/* 文件列表 */
.list { display: flex; flex-direction: column; gap: 8px; }
.empty { font-size: 13px; color: #9aa898; text-align: center; padding: 20px 0; margin: 0; }
.item {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  background: #f9fcf6; border-radius: 12px; border: 1px solid #eef5e7;
}
.i-main { flex: 1; min-width: 0; }
.i-name {
  font-size: 13.5px; font-weight: 600; color: #34462b;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.i-meta { font-size: 11.5px; color: #94a48a; margin-top: 3px; }
.i-act { display: flex; gap: 6px; flex: none; }
.dl, .del {
  font-size: 12px; padding: 6px 11px; border-radius: 9px; text-decoration: none;
  font-weight: 600;
}
.dl { background: #eaf5df; color: #4b8a2f; }
.dl:active { background: #dcedcb; }
.del { background: #fdecea; color: #d9534f; }
.del:active { background: #fbd9d7; }

/* 吐司 */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 16px);
  background: rgba(45, 60, 38, .95); color: #fff; font-size: 13px;
  padding: 11px 20px; border-radius: 22px; opacity: 0; pointer-events: none;
  transition: all .26s; z-index: 200; max-width: 86vw; text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 420px) {
  .card { padding: 15px 13px; }
  .drop { padding: 22px 12px; }
  .i-act { flex-direction: column; }
}
