:root {
  --navy: #1c2a78;
  --navy-deep: #16215f;
  --gold: #c6a04a;
  --line: #d9dee7;
  --blue: #1a5fb4;
  --pdf: #e23d32;
  --text: #243044;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--text);
}

button, input { font-family: inherit; }

.query-body,
.list-body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(80% 50% at 50% 12%, rgba(255,255,255,.72), transparent 60%),
    linear-gradient(180deg, #e7eef6 0%, #c5d6e8 42%, #8eafd0 100%);
}

.sheet {
  width: min(440px, 100%);
  min-height: 100vh;
  padding: 22px 20px 36px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--navy);
}

.mark {
  font-weight: 800;
  letter-spacing: .08em;
  font-size: 18px;
}

.brand-name { font-size: 14px; opacity: .8; }

.hero { margin-top: 54px; text-align: center; }

.hero h1,
.dialog h1 {
  margin: 0;
  color: var(--navy);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: .04em;
}

.en {
  margin: 8px 0 0;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: .12em;
  font-weight: 700;
}

.slogan {
  margin: 6px 0 0;
  color: #8b93a0;
  font-size: 14px;
}

.card, .login-card, .upload-card {
  margin-top: 22px;
  background: #fff;
  border-radius: 10px;
  padding: 22px 18px 18px;
  box-shadow: 0 10px 28px rgba(22, 36, 68, .16);
  text-align: left;
}

.field span, .upload-card label span, .login-card label span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: #667085;
}

.card input, .upload-card input, .login-card input[type="password"], .upload-card input[type="text"] {
  width: 100%;
  height: 46px;
  border: 1px solid #e4e7ee;
  border-radius: 23px;
  padding: 0 16px;
  font-size: 16px;
  outline: none;
  background: #fff;
}

.pick { position: relative; }
.pick-btn {
  display: inline-block;
  margin-top: 4px;
  border: 1px solid #d5dcf0;
  color: var(--navy);
  border-radius: 16px;
  padding: 6px 14px;
  cursor: pointer;
}
.pick input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.pick em {
  display: block;
  margin-top: 8px;
  color: #667085;
  font-style: normal;
  font-size: 13px;
  word-break: break-all;
}

.card input:focus, .upload-card input:focus, .login-card input:focus {
  border-color: #8ea0d6;
}

.card button, .upload-card button, .login-card button[type="submit"] {
  width: 100%;
  margin-top: 16px;
  height: 48px;
  border: 0;
  border-radius: 24px;
  background: var(--navy);
  color: #fff;
  font-size: 18px;
  letter-spacing: .12em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.card button:hover, .upload-card button:hover, .login-card button[type="submit"]:hover {
  background: var(--navy-deep);
}

.glass {
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.glass:after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  background: #fff;
  right: -6px;
  bottom: -1px;
  transform: rotate(40deg);
}

.hint, .notice {
  text-align: center;
  line-height: 1.7;
}

.hint {
  margin: 16px 0 0;
  color: #4d5b70;
  font-size: 13px;
}

.notice {
  margin: 36px 0 0;
  color: #1d2a44;
  font-size: 13px;
  font-weight: 700;
}

.error {
  margin: 12px 0 0;
  color: #c2412d;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  white-space: pre-line;
}

.list-sheet { padding-top: 16px; }

.back-home {
  margin-right: auto;
  color: var(--navy);
  font-size: 13px;
  text-decoration: none;
}

.dialog {
  margin-top: 18px;
  background: #fff;
  border: 3px solid #4d8fe0;
  border-radius: 8px;
  padding: 22px 16px 18px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(20, 40, 70, .12);
}

.dialog h1 { font-size: 22px; }

.code-line {
  margin: 8px 0 0;
  color: #667085;
  font-size: 14px;
}

.code-line strong { color: var(--navy); letter-spacing: .08em; }

.files {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  text-align: left;
  max-height: 52vh;
  overflow: auto;
}

.files li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 4px;
  border-bottom: 1px solid #f0f2f6;
}

.files li:last-child { border-bottom: 0; }

.num {
  width: 1.6em;
  flex: none;
  color: #344054;
}

.pdf-icon {
  flex: none;
  width: 22px;
  height: 26px;
  background: var(--pdf);
  color: #fff;
  font-size: 7px;
  font-weight: 800;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 3px;
  position: relative;
}

.pdf-icon:before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0 6px 6px 0;
  border-color: #ffd4d0 #fff;
}

.fname {
  color: var(--blue);
  text-decoration: none;
  word-break: break-all;
  font-size: 14px;
}

.fname:hover { text-decoration: underline; }

.row-dl {
  margin-left: auto;
  flex: none;
  color: var(--navy);
  text-decoration: none;
  font-size: 13px;
  border: 1px solid #d5dcf0;
  border-radius: 12px;
  padding: 3px 8px;
}

.empty {
  display: block;
  text-align: center;
  color: #667085;
  padding: 28px 8px;
}

.close-btn {
  display: inline-block;
  margin-top: 16px;
  background: #3b82f6;
  color: #fff;
  text-decoration: none;
  border-radius: 16px;
  padding: 6px 22px;
  font-size: 14px;
}

.viewer {
  position: fixed;
  inset: 0;
  background: #111827;
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.viewer[hidden] { display: none; }

.viewer-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #b42318;
  color: #fff;
}

.viewer-bar strong {
  flex: 1;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-bar button, .viewer-bar a {
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 14px;
  padding: 4px 10px;
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
}

.viewer iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #525659;
}

body.viewing { overflow: hidden; }

.admin-body {
  min-height: 100vh;
  background: #f3f5f8;
}

.admin {
  width: min(880px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: .16em;
  font-weight: 700;
}

.admin h1, .login-card h1 {
  margin: 6px 0 0;
  font-size: 28px;
  color: var(--navy);
}

.text-link { color: var(--blue); }

.upload-card label, .login-card label { display: block; margin-top: 14px; }

.upload-card .hint { text-align: left; }

.group {
  margin-top: 22px;
  background: #fff;
  border-radius: 10px;
  padding: 8px 16px 12px;
}

.group h2 {
  margin: 12px 0;
  font-size: 16px;
  color: var(--navy);
}

.group ul { list-style: none; margin: 0; padding: 0; }

.group li {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #eef1f5;
  font-size: 14px;
}

.group a { color: var(--blue); word-break: break-all; }

.group form { margin: 0; }

.group button {
  border: 0;
  background: transparent;
  color: #c2412d;
  cursor: pointer;
  padding: 0;
}

.empty-admin { color: #667085; }

.login-card { max-width: 420px; margin: 12vh auto 0; }

@media (max-width: 720px) {
  .group li { grid-template-columns: 1fr auto; }
  .group li span:nth-child(3) { display: none; }
}
