/* VGo 应用库 · 三分类 + 口令解锁 */
body.apps-body { background: #f3f5f4; background-image: radial-gradient(1100px 480px at 85% -10%, rgba(13, 90, 75, .10), transparent 60%), radial-gradient(900px 420px at -10% 8%, rgba(234, 100, 55, .07), transparent 55%); }
.apps-main { padding-bottom: 40px; }

.hero { padding: 26px 0 18px; }
.hero h2 { margin: 0; font-size: clamp(24px, 4.4vw, 36px); letter-spacing: -.6px; font-weight: 800; }
.hero h2 em { font-style: normal; color: var(--accent); }
.hero p { margin: 10px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.7; max-width: 34em; }
.hero p b { color: var(--ink); }

.cat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px; }
.cat-card {
  position: relative; text-align: left; border: 1px solid var(--line); background: #fff;
  border-radius: 20px; padding: 18px; cursor: pointer; box-shadow: var(--shadow-1);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  display: flex; flex-direction: column; gap: 10px; min-height: 148px;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -24px rgba(21, 35, 31, .45); border-color: #d8cbb6; }
.cat-card:active { transform: scale(.99); }
.cat-card .ico { font-size: 30px; line-height: 1; }
.cat-card h3 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
.cat-card .meta { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.cat-card .count { font-weight: 700; color: var(--ink); }
.cat-card .lock {
  position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 4px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px;
  font-size: 11.5px; font-weight: 700; color: var(--muted);
}
.cat-card .lock svg { width: 12px; height: 12px; }
.cat-card.unlocked { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(15, 90, 75, .12), var(--shadow-1); }
.cat-card.unlocked .lock { background: var(--teal); border-color: var(--teal); color: #fff; }

.items-area { margin-top: 26px; display: flex; flex-direction: column; gap: 22px; }
.cat-section h3 { margin: 0 0 10px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.cat-section h3 .ico { font-size: 18px; }
.cat-section h3 small { color: var(--muted); font-weight: 500; font-size: 12px; }

.item-list { display: flex; flex-direction: column; gap: 8px; }
.item-row {
  display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 11px 14px; box-shadow: var(--shadow-1);
}
.item-row .q {
  width: 40px; height: 44px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: var(--bg-soft); color: var(--ink-2); font-weight: 800; font-size: 10.5px; letter-spacing: .3px;
}
.item-row .t { flex: 1; min-width: 0; }
.item-row .t b { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-row .t span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.item-row .acts { display: flex; gap: 6px; flex: none; }
.btn-sm {
  border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 7px 11px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
}
.btn-sm.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-sm.primary:hover { background: #d9562c; }
.btn-sm svg { width: 13px; height: 13px; }

.empty-box { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 13.5px; background: #fff; border: 1px dashed var(--line); border-radius: 14px; }

.unlock-panel { width: min(420px, 100%); }
.unlock-panel .field input { font-size: 16px; }
.err { min-height: 18px; color: var(--danger); font-size: 12.5px; margin-top: 8px; }

@media (max-width: 760px) {
  .cat-cards { grid-template-columns: 1fr; gap: 10px; }
  .cat-card { min-height: 0; padding: 15px; border-radius: 16px; }
  .cat-card .ico { font-size: 26px; }
  .cat-card h3 { font-size: 16px; }
  .hero { padding: 18px 0 12px; }
  .item-row { padding: 10px 12px; gap: 10px; }
  .item-row .acts .btn-sm.preview { display: none; }
}

/* ---------- 管理后台 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  width: min(400px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 22px;
  padding: 30px 28px 24px; box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 13px;
}
.login-card h1 { margin: 0; font-size: 21px; }
.login-card > p { margin: -4px 0 6px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.login-card > p b { color: var(--ink); }
.login-error { min-height: 18px; color: var(--danger); font-size: 13px; text-align: center; }
.login-back { text-align: center; font-size: 13px; color: var(--muted); text-decoration: none; }

.admin-top { background: rgba(243, 245, 244, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.admin-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 20px; }
.admin-main { padding: 20px 20px 60px; display: flex; flex-direction: column; gap: 14px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-1); padding: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 16px; }
.panel-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.field > span i { font-style: normal; font-weight: 500; color: var(--muted); }
.field input, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 11px; background: #fff;
  padding: 10px 12px; font-size: 14px; outline: 0;
}
.field input:focus, .field select:focus { border-color: #cfbfa6; box-shadow: 0 0 0 4px rgba(234, 100, 55, .1); }

.upload-line { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.upload-line input[type=file] { flex: 1; min-width: 200px; font-size: 13px; }
.upload-status { font-size: 12.5px; color: var(--muted); }
.progress { margin-top: 12px; }
.progress-bar { height: 8px; background: #eee6d8; border-radius: 99px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #f09a6f); transition: width .2s; }

.pwd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pwd-grid .field span { display: flex; align-items: center; gap: 6px; }
.hint { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.confirm-text { margin: 0; font-size: 14px; line-height: 1.75; }
.btn.block { width: 100%; justify-content: center; }

@media (max-width: 720px) {
  .form-grid, .pwd-grid { grid-template-columns: 1fr; }
  .admin-main { padding: 14px; }
  .panel { padding: 15px; }
}
