* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", "Microsoft YaHei", sans-serif; background: #f2f4f7; color: #23282d; }
.hidden { display: none !important; }
header { display: flex; align-items: center; gap: 16px; background: #1f2937; color: #fff; padding: 12px 24px; }
.logo { font-weight: 700; font-size: 18px; }
.who { margin-left: auto; opacity: .85; }
.tabs { display: flex; gap: 4px; background: #fff; border-bottom: 1px solid #e2e6ea; padding: 0 16px; }
.tabs button { border: none; background: none; padding: 12px 18px; font-size: 15px; cursor: pointer; border-bottom: 3px solid transparent; }
.tabs button.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 600; }
.tab { padding: 20px 24px; max-width: 1280px; margin: 0 auto; }
.card { background: #fff; border-radius: 10px; padding: 18px 20px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card h2 { margin: 0 0 14px; font-size: 16px; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 10px 0; }
.form-row label { display: flex; flex-direction: column; font-size: 13px; gap: 4px; color: #556; }
input, textarea { padding: 8px 10px; border: 1px solid #cbd2d9; border-radius: 6px; font-size: 14px; }
input:focus, textarea:focus { outline: 2px solid #93c5fd; border-color: #2563eb; }
textarea { width: 100%; font-family: Consolas, monospace; }
button { background: #2563eb; color: #fff; border: none; padding: 9px 18px; border-radius: 6px; font-size: 14px; cursor: pointer; }
button:hover { background: #1d4ed8; }
button.ghost { background: #eef1f5; color: #334; }
button.ghost:hover { background: #dde3ea; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #edf0f3; vertical-align: top; }
th { color: #667; font-weight: 600; background: #f8fafc; }
td code, .kv code { font-family: Consolas, monospace; font-size: 12px; word-break: break-all; background: #f5f7fa; padding: 2px 4px; border-radius: 4px; }
.muted { color: #778; font-size: 13px; }
.err { color: #dc2626; min-height: 18px; font-size: 14px; }
.result { background: #f0f7ff; border: 1px solid #bfdbfe; padding: 12px; border-radius: 8px; margin-top: 12px; }
.result-inline { color: #14532d; font-size: 14px; }
.pager { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: #fff; padding: 36px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.1); display: flex; flex-direction: column; gap: 14px; width: 340px; }
.login-card h1 { font-size: 20px; margin: 0 0 8px; text-align: center; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 10px 22px; border-radius: 8px; font-size: 14px; z-index: 99; }
progress { width: 100%; height: 10px; }
.expire-soon { color: #b45309; }
.expired { color: #dc2626; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
a.btn { display: inline-block; background: #2563eb; color: #fff; padding: 7px 14px; border-radius: 6px; text-decoration: none; font-size: 13px; }
a.btn.ghost { background: #eef1f5; color: #334; }
.c-cipher code { display: block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ver-input { width: 120px; }
@media (max-width: 768px) {
  header { padding: 10px 14px; gap: 10px; }
  .logo { font-size: 16px; }
  .tabs { position: sticky; top: 0; z-index: 10; overflow-x: auto; padding: 0 8px; justify-content: flex-start; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
  .tabs button { flex: 0 0 auto; padding: 12px 14px; font-size: 14px; }
  .tab { padding: 14px 12px; }
  .card { padding: 14px 14px; margin-bottom: 14px; border-radius: 8px; }
  .form-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .form-row label { font-size: 14px; }
  .form-row input[type=text], .form-row input:not([type=file]), .form-row button, .pager button, a.btn { min-height: 42px; }
  input[type=file] { width: 100%; font-size: 13px; padding: 10px; }
  input, textarea { font-size: 16px; }
  .ver-input { width: 100%; }
  .login-card { width: auto; margin: 16px; padding: 26px 20px; }
  .login-wrap { min-height: 100dvh; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
  .login-card input { font-size: 16px; min-height: 44px; }
  .toast { left: 16px; right: 16px; transform: none; bottom: calc(16px + env(safe-area-inset-bottom)); text-align: center; }

  table { font-size: 13px; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tr { background: #fff; border: 1px solid #edf0f3; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
  td { padding: 3px 0; border: none; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
  td::before { content: attr(data-label); color: #889; font-size: 12px; flex: 0 0 auto; }
  td:not([data-label]) { justify-content: flex-start; }
  td.hide-sm { display: none; }
  td.c-cipher code { max-width: 68%; white-space: normal; word-break: break-all; }
  td.c-act { justify-content: flex-end; gap: 8px; padding-top: 8px; }
  td.c-act::before { content: none; }
  .pager { justify-content: center; }
}
