:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2329;
  --muted: #86909c;
  --accent: #4f6ef2;
  --border: #e5e8ef;
  --shadow: 0 2px 10px rgba(31, 45, 61, 0.06);
  --err: #e5484d;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh;
}

.container { max-width: 760px; margin: 0 auto; padding: 0 20px; width: 100%; }

.topbar {
  background: linear-gradient(135deg, var(--accent), #7b5cf0);
  color: #fff; font-size: 18px; font-weight: 700;
  padding: 14px 0; box-shadow: var(--shadow);
}
.bar-inner { display: flex; justify-content: space-between; align-items: center; }
.back { color: #fff; font-size: 13px; font-weight: 400; text-decoration: none; opacity: .9; }
.back:hover { opacity: 1; }

main { padding: 20px 0 40px; }

.box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.box h2 { font-size: 17px; margin-bottom: 16px; }

.gate-row { display: flex; gap: 10px; }
.gate-row input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; outline: none;
}
.gate-row input:focus { border-color: var(--accent); }

.err { color: var(--err); font-size: 13px; margin-top: 10px; }

.toolbar { display: flex; gap: 10px; margin-bottom: 16px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  padding: 9px 18px; border-radius: 10px; font-size: 14px;
  cursor: pointer; border: none; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: #eef1ff; color: var(--accent); }
.btn-danger { background: #fdecec; color: var(--err); }

/* 应用列表 */
.alist { display: flex; flex-direction: column; gap: 12px; }
.app-row {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow);
}
.app-ico { font-size: 28px; width: 44px; text-align: center; flex: none; }
.app-info { flex: 1; min-width: 0; }
.app-t { font-weight: 600; font-size: 15px; }
.app-s { font-size: 12px; color: var(--muted); margin-top: 3px; word-break: break-all; }
.app-ops { display: flex; gap: 8px; flex: none; }

/* 表单 */
.frow { margin-bottom: 14px; }
.frow label { display: block; font-size: 13px; color: #4e5969; margin-bottom: 6px; }
.frow input, .frow select, .frow textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; outline: none; font-family: inherit;
  background: #fff;
}
.frow input:focus, .frow select:focus, .frow textarea:focus { border-color: var(--accent); }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.btns { display: flex; gap: 10px; margin-top: 6px; }

/* ---------------------------------------------------------------- 详情页字段 */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) {
  .grid2 { grid-template-columns: 1fr; }
}

.tip {
  font-size: 12px;
  color: #86909c;
  margin: -4px 0 12px;
  line-height: 1.6;
}
.tip code {
  background: #f2f3f5;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11.5px;
}

#f-safe { width: 100%; }

/* 后台列表的图标框：图片铺满 */
.app-ico { overflow: hidden; }
.app-ico .app-ico-img { border-radius: inherit; }
