/* ============================================================
   全局科技渐变卡片UI体系
   配色：深蓝 / 极光蓝 / 渐变紫 / 微光透明
   ============================================================ */
:root {
  --bg-deep: #070b1a;
  --bg-panel: rgba(20, 28, 56, .72);
  --bg-card: rgba(255, 255, 255, .04);
  --bg-card-hover: rgba(64, 120, 255, .10);
  --line: rgba(120, 160, 255, .16);
  --line-strong: rgba(96, 165, 250, .45);
  --txt: #e8edff;
  --txt-dim: #93a0c4;
  --txt-faint: #66729a;
  --blue: #3b82f6;
  --aurora: #22d3ee;
  --purple: #8b5cf6;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --grad-main: linear-gradient(135deg, #1d4ed8 0%, #4f46e5 55%, #7c3aed 100%);
  --grad-aurora: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --glow: 0 0 24px rgba(59, 130, 246, .35);
  --radius: 14px;
}

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

html, body { height: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  color: var(--txt);
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(59, 130, 246, .22), transparent 60%),
    radial-gradient(1000px 500px at 95% 0%, rgba(139, 92, 246, .20), transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(34, 211, 238, .12), transparent 60%),
    var(--bg-deep);
  background-attachment: fixed;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--aurora); text-decoration: none; transition: .2s; }
a:hover { color: #7dd3fc; text-shadow: 0 0 12px rgba(34, 211, 238, .5); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: border-color .25s, box-shadow .25s, transform .25s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(59,130,246,.5), transparent 40%, rgba(139,92,246,.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; opacity: .7;
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--glow), 0 8px 32px rgba(0,0,0,.4); }

.card-title {
  font-size: 16px; font-weight: 600; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.card-title::before {
  content: ""; width: 4px; height: 18px; border-radius: 2px;
  background: var(--grad-aurora); box-shadow: 0 0 10px rgba(34,211,238,.7);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, rgba(59,130,246,.18), rgba(139,92,246,.18));
  color: var(--txt); font-size: 14px; cursor: pointer;
  transition: .22s; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--grad-main); border-color: transparent; box-shadow: var(--glow); transform: translateY(-1px); color: #fff; }
.btn-primary { background: var(--grad-main); border-color: transparent; }
.btn-primary:hover { box-shadow: 0 0 28px rgba(99,102,241,.6); }
.btn-aurora { background: var(--grad-aurora); border-color: transparent; color: #04121f; font-weight: 600; }
.btn-aurora:hover { box-shadow: 0 0 28px rgba(34,211,238,.55); color: #04121f; }
.btn-danger { border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.12); }
.btn-danger:hover { background: linear-gradient(135deg,#dc2626,#b91c1c); border-color: transparent; box-shadow: 0 0 20px rgba(239,68,68,.5); }
.btn-sm { padding: 5px 12px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- 高亮数字（访问统计等） ---------- */
.visit-num { color: var(--aurora); font-weight: 700; font-style: normal; text-shadow: 0 0 12px rgba(34, 211, 238, .55); }

/* ---------- 表单 ---------- */
.form-row { display: flex; align-items: flex-start; margin-bottom: 16px; gap: 14px; }
.form-label { width: 110px; flex-shrink: 0; text-align: right; color: var(--txt-dim); padding-top: 9px; font-size: 13.5px; }
.form-label .req { color: var(--red); margin-right: 3px; }
.form-ctrl { flex: 1; }
input[type=text], input[type=password], input[type=date], input[type=datetime-local],
input[type=number], input[type=tel], input[type=email], select, textarea {
  width: 100%; padding: 9px 13px; border-radius: 10px;
  background: rgba(8, 14, 34, .7); border: 1px solid var(--line);
  color: var(--txt); font-size: 14px; outline: none; transition: .2s;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,.18), 0 0 16px rgba(59,130,246,.25);
  background: rgba(10, 18, 42, .9);
}
textarea { min-height: 88px; resize: vertical; }
select option { background: #111a36; color: var(--txt); }
.form-tip { color: var(--txt-faint); font-size: 12px; margin-top: 5px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  background: rgba(59, 130, 246, .12); color: #b9c8f5; font-weight: 600;
  padding: 12px 14px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--line-strong);
}
.data-table td { padding: 11px 14px; border-bottom: 1px solid rgba(120,160,255,.08); color: var(--txt); }
.data-table tbody tr { transition: .18s; }
.data-table tbody tr:hover { background: var(--bg-card-hover); }
.data-table .uid-link { font-family: "Consolas", monospace; color: var(--aurora); }
.data-table .empty { text-align: center; color: var(--txt-faint); padding: 40px 0; }

/* ---------- 状态徽章 ---------- */
.badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.6;
  border: 1px solid currentColor;
}
.badge::before { content: "●"; margin-right: 5px; font-size: 9px; vertical-align: 1px; }

/* ---------- 搜索栏 ---------- */
.search-bar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; align-items: center; }
.search-bar input, .search-bar select { width: auto; min-width: 170px; }
.search-bar .spacer { flex: 1; }

/* ---------- 分页 ---------- */
.pager { margin-top: 18px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pager a {
  padding: 6px 13px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); color: var(--txt-dim); font-size: 13px;
}
.pager a:hover { border-color: var(--line-strong); color: var(--txt); }
.pager a.on { background: var(--grad-main); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.pager .pg-info { margin-left: auto; color: var(--txt-faint); font-size: 12.5px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(4, 8, 20, .72);
  backdrop-filter: blur(6px); z-index: 999; display: none;
  align-items: center; justify-content: center;
}
.modal-mask.show { display: flex; }
.modal {
  width: 90%; max-width: 520px; max-height: 86vh; overflow-y: auto;
  background: linear-gradient(160deg, rgba(24,34,68,.96), rgba(14,20,44,.96));
  border: 1px solid var(--line-strong); border-radius: 16px;
  padding: 26px; box-shadow: 0 20px 80px rgba(0,0,0,.6), var(--glow);
}
.modal-title { font-size: 17px; font-weight: 600; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; }
.modal-close { cursor: pointer; color: var(--txt-faint); font-size: 22px; line-height: 1; }
.modal-close:hover { color: var(--red); }

/* ---------- 提示消息 ---------- */
.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-80px);
  padding: 12px 26px; border-radius: 12px; z-index: 2000;
  background: linear-gradient(135deg, rgba(34,197,94,.9), rgba(22,163,74,.9));
  color: #fff; font-size: 14px; box-shadow: 0 10px 40px rgba(34,197,94,.4);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.3);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: linear-gradient(135deg, rgba(239,68,68,.92), rgba(185,28,28,.92)); box-shadow: 0 10px 40px rgba(239,68,68,.4); }

/* ---------- 统计卡片 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { padding: 20px; }
.stat-card .stat-num { font-size: 30px; font-weight: 700; margin: 8px 0 2px;
  background: var(--grad-aurora); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card .stat-label { color: var(--txt-dim); font-size: 13px; }
.stat-card .stat-icon { float: right; font-size: 26px; opacity: .85; }

/* ---------- 详情描述列表 ---------- */
.desc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0; }
.desc-item { display: flex; padding: 12px 14px; border-bottom: 1px solid rgba(120,160,255,.08); }
.desc-item .d-label { width: 100px; flex-shrink: 0; color: var(--txt-faint); }
.desc-item .d-value { color: var(--txt); word-break: break-all; }
.desc-item.full { grid-column: 1 / -1; }

/* ---------- 工具栏 ---------- */
.page-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.page-title { font-size: 20px; font-weight: 700; }
.page-title small { color: var(--txt-faint); font-size: 13px; font-weight: 400; margin-left: 10px; }

/* 二维码块 */
.qr-box { text-align: center; padding: 16px; }
.qr-box canvas, .qr-box img { border-radius: 10px; background: #fff; padding: 10px; }

/* 响应式 */
@media (max-width: 768px) {
  .form-label { width: 88px; }
  .search-bar input, .search-bar select { min-width: 130px; }
}
