:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --accent: #e74f4c;
  --accent-hover: #ed8280;
  --border: rgba(226, 232, 240, 0.85);
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 20px 45px rgba(15, 23, 42, 0.10);
  --radius: 18px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

/* 页面整体背景 */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(59, 130, 246, .12), transparent 38%),
    radial-gradient(circle at 90% 10%, rgba(139, 92, 246, .10), transparent 35%),
    #f8fafc;
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
}

/* 背景网格 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(15, 23, 42, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .025) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 页面容器 ---------- */
.soft-page {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 20px 80px;
  overflow-x: hidden;
  width: 100%;
}

/* 柔光装饰 */
.soft-page::before {
  content: "";
  position: absolute;
  width: 800px; height: 800px;
  left: -350px; top: -300px;
  background: radial-gradient(circle, rgba(59, 130, 246, .10), transparent 70%);
  filter: blur(80px);
  z-index: -1;
}
.soft-page::after {
  content: "";
  position: absolute;
  width: 700px; height: 700px;
  right: -350px; top: -250px;
  background: radial-gradient(circle, rgba(139, 92, 246, .08), transparent 70%);
  filter: blur(90px);
  z-index: -1;
}

/* ---------- 顶部 Hero ---------- */
.soft-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 380px;
  margin-bottom: 25px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.soft-hero h1 {
  margin: 0 0 20px;
  font-size: 52px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #0f172a, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.soft-hero .sub {
  max-width: 680px;
  margin: 0 0 30px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
}

.hero-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  max-width: 700px;
  margin-top: 35px;
}

.hero-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .65);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, .8);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
  cursor: default;
}
.hero-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, .10);
  border-color: rgba(37, 99, 235, .25);
  background: rgba(255, 255, 255, .9);
}

.hero-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: white;
  overflow: hidden;
}

.hero-icon img {
  width: 36px; height: 36px;
  object-fit: contain;
  display: block;
}

.hero-item strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.hero-item span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted-light);
}

/* 右侧动画装饰 */
.hero-animation {
  position: absolute;
  right: 30px; top: 30px;
  width: 360px; height: 360px;
}

.main-device {
  position: absolute;
  left: 90px; top: 90px;
  width: 170px; height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 35px;
  background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(241,245,249,.8));
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(37, 99, 235, .15);
  animation: deviceFloat 5s infinite;
}

.device-top {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--muted-light);
}

.device-icon {
  width: 70px; height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 22px;
  background: white;
}

.device-icon img {
  width: 100%; height: 100%;
  object-fit: contain;
}

.device-text {
  margin-top: 5px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(37, 99, 235, .18);
}

.orbit-one {
  width: 300px; height: 300px;
  left: 25px; top: 25px;
  animation: rotate 18s linear infinite;
}

.orbit-two {
  width: 240px; height: 240px;
  left: 55px; top: 55px;
  animation: rotate 12s linear infinite reverse;
}

.float-card {
  position: absolute;
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(15px);
  box-shadow: 0 15px 40px rgba(15, 23, 42, .08);
  font-size: 13px;
  color: #334155;
}

.float-card span { color: var(--brand); margin-right: 5px; }

.card-a { left: 0; top: 90px; }
.card-b { right: 0; top: 160px; }
.card-c { left: 70px; bottom: 10px; }

@keyframes rotate { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes deviceFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- 搜索 & 分类工具条 ---------- */
.toolbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(10px);
  padding: 16px 0 20px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 14px;
  margin-bottom: 16px;
}
.search-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.search {
  flex: 0 1 320px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: var(--shadow);
}
.search input { border: none; outline: none; flex: 1; font-size: 14px; background: transparent; color: var(--text); }
.search svg { flex: none; color: var(--muted); }
.catnav { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; justify-content: flex-end; }
.catnav a {
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255,255,255,.8); border: 1px solid var(--border);
  font-size: 13px; color: var(--muted);
  transition: all 0.15s ease;
}
.catnav a:hover, .catnav a.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- 分类标题 ---------- */
.soft-section { margin-bottom: 35px; scroll-margin-top: 130px; margin-top: 24px; }
.soft-section h2 {
  position: relative;
  padding-left: 18px;
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.soft-section h2::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 24px;
  border-radius: 20px;
  background: linear-gradient(#2563eb, #8b5cf6);
}

/* ---------- 软件网格 ---------- */
.soft-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

/* ---------- 软件卡片 ---------- */
.soft-card {
  height: 160px;
  display: flex;
  flex-direction: column;
  padding: 14px;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(226, 232, 240, .85);
  box-shadow: var(--shadow);
  transition: .3s;
}
.soft-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.soft-top {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  flex-shrink: 0;
  overflow: hidden;
}

.soft-logo {
  width: 44px; height: 44px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.soft-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.logo-error { display: none; font-size: 22px; }

.soft-info {
  min-width: 0;
  width: calc(100% - 56px);
  padding-top: 1px;
  overflow: hidden;
  position: relative;
}
.soft-info h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 22px;
  color: var(--text);
  white-space: nowrap;
}
.soft-info span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 18px;
  color: var(--muted-light);
  white-space: nowrap;
}

.scroll-window {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
.scroll-window.need-scroll { cursor: pointer; }
.scroll-window.need-scroll:hover h3,
.scroll-window.need-scroll:hover span {
  animation: text-scroll var(--scroll-time) linear forwards;
}

@keyframes text-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(var(--scroll-distance)); }
}

.soft-info h3, .soft-info span, .soft-tags { white-space: nowrap; }

.soft-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  margin-top: 14px;
  margin-bottom: 8px;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}

.tag {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  line-height: 18px;
}

.soft-download {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(226, 232, 240, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: none;
  flex-shrink: 0;
  margin-left: auto;
}
.btn-download:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-download svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.btn-download:disabled, .btn-download.disabled { background: #cbd5e1; cursor: default; transform: none; }

/* ---------- 倒计时标签 ---------- */
.countdown {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25);
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 下载弹窗 ---------- */
.download-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modalFadeIn 0.25s ease;
}
.download-modal-overlay.active { display: flex; }
.download-modal {
  max-width: 440px;
  width: min(440px, calc(100vw - 32px));
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 28px 28px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
  animation: modalSlideUp 0.3s ease;
  position: relative;
  box-sizing: border-box;
}
.modal-close-btn {
  position: absolute;
  top: 16px; right: 20px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--muted-light);
  cursor: pointer;
  transition: 0.2s;
  line-height: 1;
}
.modal-close-btn:hover { color: var(--text); transform: rotate(90deg); }
.modal-header { margin-bottom: 20px; }
.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.modal-body { display: flex; flex-direction: column; gap: 10px; }

.modal-disk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 14px;
  background: #f8fafc;
  transition: 0.2s;
  border: 1px solid transparent;
}
.modal-disk-item:hover { background: #f1f5f9; border-color: #e2e8f0; }
.modal-disk-item .disk-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
}
.modal-disk-item .disk-label .disk-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.modal-disk-item .disk-label img {
  width: 28px; height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 2px;
}
.modal-disk-item .disk-label .badge {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #e2e8f0;
  padding: 0 10px;
  border-radius: 12px;
  line-height: 20px;
}
.modal-disk-item .disk-label .badge.recommend { background: #dbeafe; color: var(--brand); }
.modal-disk-item .btn-go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 14px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
  flex-shrink: 0;
}
.modal-disk-item .btn-go:hover { background: var(--accent-hover); transform: translateY(-1px); }
.modal-disk-item .btn-go.outline { background: transparent; color: #64748b; border: 1px solid #e2e8f0; }
.modal-disk-item .btn-go.outline:hover { background: #f8fafc; border-color: #cbd5e1; }
.modal-disk-item .btn-go svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }

.modal-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
}
.modal-footer a {
  font-size: 13px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.modal-footer a:hover { color: var(--brand-dark); text-decoration: underline; }

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(20px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---------- 右侧悬浮工具 ---------- */
.side-tools {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
.side-btn {
  width: 48px;
  min-height: 48px;
  border: none;
  background: #e74f4c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  padding: 8px 4px;
}
.side-btn + .side-btn { border-top: 1px solid rgba(255, 255, 255, 0.2); }
.side-btn:hover { background: #c53030; }
.side-btn svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2; }
.side-btn.side-text {
  writing-mode: vertical-rl;
  letter-spacing: 2px;
  font-size: 13px;
  font-weight: 500;
}

/* ---------- 求软件/留言弹窗 ---------- */
.request-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modalFadeIn 0.25s ease;
}
.request-overlay.active { display: flex; }
.request-modal {
  max-width: 440px;
  width: min(440px, calc(100vw - 32px));
  background: #ffffff;
  border-radius: 24px;
  padding: 28px 24px 24px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
  animation: modalSlideUp 0.3s ease;
  position: relative;
  box-sizing: border-box;
}
.request-modal .field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.request-modal .field label { font-size: 13px; color: var(--muted); }
.request-modal .field input,
.request-modal .field textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
}
.request-modal .field input:focus,
.request-modal .field textarea:focus { border-color: var(--brand); }
.request-modal .field textarea { resize: vertical; min-height: 80px; }
.request-modal .btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 14px;
  cursor: pointer;
}
.request-modal .btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- 空状态 / 页脚 ---------- */
.empty { text-align: center; color: var(--muted); padding: 50px 0; font-size: 15px; }
.footer {
  margin-top: 60px; padding: 30px 0;
  border-top: 1px solid var(--border);
  text-align: center; color: var(--muted); font-size: 13px;
}

/* Toast */
.toast {
  position: fixed; left: 50%; top: 20px; transform: translateX(-50%);
  background: #1f2933; color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 14px; z-index: 1010; opacity: 0; transition: opacity 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* ---------- 响应式 ---------- */
@media(max-width: 1100px) {
  .soft-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-animation { opacity: .45; }
}

@media(max-width: 860px) {
  .soft-page { padding: 30px 15px 60px; }
  .soft-hero { min-height: auto; }
  .soft-hero h1 { font-size: 34px; }
  .hero-animation { display: none; }
  .hero-feature-grid { grid-template-columns: 1fr; }
  .soft-grid { grid-template-columns: 1fr; }
  .soft-card { height: 160px; }
  .toolbar { padding: 12px 0 18px; border-radius: 14px; top: 8px; margin: 0 8px; }
  .search { flex: 1 1 100%; max-width: none; }
  .catnav { justify-content: flex-start; width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; -ms-overflow-style: none; }
  .catnav::-webkit-scrollbar { display: none; }
  .catnav a { white-space: nowrap; }
  .side-tools {
    right: 10px; bottom: 20px; top: auto;
    transform: none;
    flex-direction: row;
    border-radius: 999px;
  }
  .side-btn { width: 44px; min-height: 44px; }
  .side-btn + .side-btn { border-top: none; border-left: 1px solid rgba(255,255,255,0.2); }
  .side-btn.side-text { writing-mode: horizontal-tb; letter-spacing: 0; }
}

@media(max-width: 480px) {
  .soft-hero h1 { font-size: 28px; }
  .download-modal { padding: 24px 18px; }
  .modal-disk-item { flex-wrap: nowrap; gap: 8px; padding: 10px 12px; }
  .modal-disk-item .disk-label { min-width: 0; }
  .modal-disk-item .disk-label img { width: 24px; height: 24px; }
  .modal-disk-item .disk-label span:not(.badge) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .modal-disk-item .btn-go { flex: 0 0 auto; padding: 0 10px; height: 26px; font-size: 11px; }
  .soft-download { gap: 8px; }
  .countdown { font-size: 10px; padding: 2px 6px; }
  .footer { font-size: 12px; }
}

/* ---------- 后台管理页样式 ---------- */
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 28px 20px 80px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-head h1 { font-size: 22px; margin: 0; }
.btn { border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 8px 14px; border-radius: 9px; font-size: 14px; cursor: pointer; transition: all .15s; }
.btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-dark); color: #fff; }
.btn.danger { color: #d9534f; border-color: #f0c7c5; }
.btn.danger:hover { background: #fdeceb; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 22px; }
.panel h3 { margin: 0 0 14px; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cat-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: var(--brand-dark);
  padding: 5px 10px; border-radius: 999px; font-size: 13px; }
.cat-chip .cat-ops { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; }
.cat-chip button { border: none; background: transparent; color: inherit; cursor: pointer; font-size: 13px; line-height: 1; padding: 2px 4px; border-radius: 4px; }
.cat-chip button:hover { background: rgba(37,99,235,0.12); }
.row { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field textarea, .field select {
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; font-size: 14px; font-family: inherit; background: var(--surface); color: var(--text); }
.field textarea { resize: vertical; min-height: 60px; }
.dl-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; margin-bottom: 8px; }
.dl-row label { display: flex; align-items: center; justify-content: space-between; }
.dl-row .rec-lbl { font-size: 12px; color: var(--text); display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.dl-row .rec-lbl input { width: 14px; height: 14px; }
.icon-row { display: grid; grid-template-columns: 80px 1fr; gap: 12px; align-items: end; }
.icon-preview { width: 80px; height: 80px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.icon-preview img { width: 64px; height: 64px; object-fit: contain; }
.icon-inputs { display: flex; flex-direction: column; gap: 8px; }
.icon-inputs small { font-size: 12px; color: var(--muted); }
.toggle-section { margin-top: 6px; }
.toggle-btn { font-size: 12px; color: var(--brand); background: transparent; border: none; cursor: pointer; padding: 0; }
.toggle-btn:hover { text-decoration: underline; }
.collapse { display: none; }
.collapse.show { display: block; }
.more-dl-hint { font-size: 12px; color: var(--muted); margin-left: 8px; }
.icon-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  margin-top: 8px;
}
.icon-gallery .icon-grid-item { width: 56px; height: 56px; border-radius: 10px; border: 2px solid transparent; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; }
.icon-gallery .icon-grid-item:hover, .icon-gallery .icon-grid-item.selected { border-color: var(--brand); }
.icon-gallery .icon-grid-item img { width: 40px; height: 40px; object-fit: contain; }
.icon-gallery-empty { font-size: 12px; color: var(--muted); padding: 6px 2px; }

/* 居中删除弹窗 */
.confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1100;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease;
}
.confirm-overlay.show { display: flex; }
.confirm-box {
  background: var(--surface);
  border-radius: 18px;
  width: 100%; max-width: 400px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.15);
  animation: modalSlideUp 0.2s ease;
}
.confirm-box h4 { margin: 0 0 12px; font-size: 17px; }
.confirm-box p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.confirm-box .actions { display: flex; justify-content: flex-end; gap: 10px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
.mini-icon { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; vertical-align: middle; }
.ops { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-bar button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; cursor: pointer; }
.filter-bar button.active, .filter-bar button:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.category-select { font-size: 13px; padding: 5px 8px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); max-width: 120px; }
.admin-tag { font-size: 11px; color: var(--brand); background: var(--brand-soft); padding: 2px 8px; border-radius: 6px; display: inline-block; margin: 1px; }
.status-toggle { cursor: pointer; user-select: none; padding: 4px 8px; border-radius: 8px; transition: background .15s; white-space: nowrap; }
.status-toggle:hover { background: var(--brand-soft); }

/* 后台软件列表：固定列宽 + 横向滚动，防止错位换行 */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.software-table { table-layout: fixed; min-width: 840px; }
.software-table th, .software-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 列宽精确定义（PC 最佳）：选择40 / ☰40 / 图标55 / 名称250 / 分类110 / 标签自适应 / 状态90 / 操作130 */
.software-table th:nth-child(1), .software-table td:nth-child(1) { width: 40px; }   /* 选择 */
.software-table th:nth-child(2), .software-table td:nth-child(2) { width: 40px; }   /* 拖拽 ☰ */
.software-table th:nth-child(3), .software-table td:nth-child(3) { width: 55px; }   /* 图标 */
.software-table th:nth-child(4), .software-table td:nth-child(4) { width: 250px; }  /* 名称（固定，不撑满） */
.software-table th:nth-child(5), .software-table td:nth-child(5) { width: 110px; }  /* 分类 */
.software-table th:nth-child(6), .software-table td:nth-child(6) { width: auto; min-width: 120px; } /* 标签（自适应占满剩余） */
.software-table th:nth-child(7), .software-table td:nth-child(7) { width: 90px; }   /* 状态 */
.software-table th:nth-child(8), .software-table td:nth-child(8) { width: 130px; }  /* 操作 */
.software-table td:nth-child(4) > span { display: inline; }
.software-table .ops { flex-wrap: nowrap; gap: 6px; }
.software-table .ops .btn { padding: 6px 10px; }
.drag-handle { cursor: grab; color: var(--muted-light); padding: 0 4px; font-size: 16px; }
.drag-handle:active { cursor: grabbing; }
tr.dragging { opacity: .5; background: var(--brand-soft); }
tr.drop-before { box-shadow: inset 0 2px 0 var(--brand); }
tr.drop-after { box-shadow: inset 0 -2px 0 var(--brand); }

/* 遮罩与弹窗 */
.overlay { position: fixed; inset: 0; background: rgba(20,30,25,.45); display: none; align-items: center; justify-content: center; padding: 60px 16px; z-index: 100; overflow: auto; }
.overlay.show { display: flex; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 620px; padding: 24px; position: relative; }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--bg); color: var(--muted); font-size: 22px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #e2e8f0; color: var(--text); }
.modal h3 { margin: 0 28px 18px 0; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.login-box { max-width: 380px; margin: 0; }
.login-box .field { margin-bottom: 14px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

@media (max-width: 640px) {
  .admin-wrap { padding: 18px 14px 60px; }
  .row { grid-template-columns: 1fr; }
  .dl-row { grid-template-columns: 1fr; align-items: stretch; }
  .icon-row { grid-template-columns: 70px 1fr; }
  .icon-preview { width: 70px; height: 70px; }
  table { font-size: 12px; }
  th, td { padding: 8px 5px; }
  .ops { gap: 5px; }
  .ops .btn { padding: 6px 9px; font-size: 12px; }
  .modal { padding: 18px; }
  .confirm-box { padding: 20px; }
}
