/* ============================================================
   私有网盘 · 样式表
   深色玻璃拟态 + 柔和渐变，桌面/手机自适应
   ============================================================ */

:root {
  --bg: #080b14;
  --bg-2: #0d1220;
  --card: rgba(255, 255, 255, 0.045);
  --card-2: rgba(255, 255, 255, 0.07);
  --stroke: rgba(255, 255, 255, 0.09);
  --stroke-strong: rgba(255, 255, 255, 0.16);
  --text: #e9edfb;
  --muted: #8b94b1;
  --muted-2: #6b7492;
  --accent: #6d5efc;
  --accent-2: #22d3ee;
  --accent-3: #a78bfa;
  --danger: #ff6b81;
  --ok: #34d399;
  --warn: #fbbf24;
  --grad: linear-gradient(135deg, #6d5efc 0%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(109, 94, 252, .22), rgba(34, 211, 238, .18));
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 18px 50px -22px rgba(0, 0, 0, .9);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --nav-h: 68px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* hidden 属性必须优先于任何 display 设置 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 15% -10%, #161c34 0%, transparent 60%),
              radial-gradient(900px 700px at 110% 10%, #10233a 0%, transparent 55%),
              var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- 背景光斑 ---------- */
.bg-deco { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; }
.orb-1 { width: 46vmax; height: 46vmax; left: -14vmax; top: -16vmax; background: #4c3df0; animation: float1 22s var(--ease-soft) infinite alternate; }
.orb-2 { width: 38vmax; height: 38vmax; right: -12vmax; top: 6vmax; background: #0e7490; animation: float2 26s var(--ease-soft) infinite alternate; }
.orb-3 { width: 30vmax; height: 30vmax; left: 40%; bottom: -18vmax; background: #7c3aed; opacity: .3; animation: float3 30s var(--ease-soft) infinite alternate; }
@keyframes float1 { to { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); } }
@keyframes float2 { to { transform: translate3d(-5vmax, 6vmax, 0) scale(1.08); } }
@keyframes float3 { to { transform: translate3d(4vmax, -5vmax, 0) scale(1.15); } }

/* ---------- 布局骨架 ---------- */
#app {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 20px calc(var(--nav-h) + 34px);
}

.view { display: none; }
.view.is-active { display: block; animation: viewIn .46s var(--ease) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px) scale(.995); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px 0 18px;
  background: linear-gradient(to bottom, rgba(8, 11, 20, .92) 55%, rgba(8, 11, 20, 0));
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: .5px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 10px;
  background: var(--grad);
  box-shadow: 0 8px 22px -8px rgba(109, 94, 252, .9), inset 0 0 0 1px rgba(255, 255, 255, .18);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 8px;
  border: 2px solid rgba(255, 255, 255, .92); border-radius: 4px;
  border-bottom-color: transparent;
}
.brand-text { font-size: 17px; }
.brand-text em { font-style: normal; font-size: 10px; letter-spacing: 2.2px; color: var(--muted-2); margin-left: 7px; }

.tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.search {
  display: flex; align-items: center; gap: 9px;
  height: 42px; padding: 0 12px 0 14px;
  background: var(--card); border: 1px solid var(--stroke);
  border-radius: 999px; transition: border-color .3s, background .3s, box-shadow .35s var(--ease);
  min-width: 260px;
}
.search:focus-within {
  border-color: rgba(109, 94, 252, .65);
  background: rgba(109, 94, 252, .1);
  box-shadow: 0 0 0 4px rgba(109, 94, 252, .12);
}
.search svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; transition: stroke .3s; }
.search:focus-within svg { stroke: var(--accent-3); }
.search input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  color: var(--text); font-size: 14px; font-family: inherit;
}
.search input::placeholder { color: var(--muted-2); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear {
  border: 0; background: rgba(255, 255, 255, .09); color: var(--muted);
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1;
  font-size: 14px; display: none; align-items: center; justify-content: center;
  transition: background .25s, color .25s;
}
.search-clear:hover { background: rgba(255, 255, 255, .18); color: var(--text); }
.search.has-value .search-clear { display: flex; }

.select-wrap { position: relative; display: flex; align-items: center; }
.select-wrap select {
  appearance: none; -webkit-appearance: none;
  height: 42px; padding: 0 38px 0 16px;
  background: var(--card); border: 1px solid var(--stroke); border-radius: 999px;
  color: var(--text); font-size: 13.5px; font-family: inherit; cursor: pointer;
  outline: none; transition: border-color .3s, background .3s, box-shadow .3s;
}
.select-wrap select:hover { background: var(--card-2); }
.select-wrap select:focus { border-color: rgba(109, 94, 252, .6); box-shadow: 0 0 0 4px rgba(109, 94, 252, .1); }
.select-wrap option { background: #121729; color: var(--text); }
.select-arrow { position: absolute; right: 14px; width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }

/* ---------- 卡片网格 ---------- */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}

.card {
  position: relative;
  padding: 20px 20px 16px;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  cursor: pointer;
  overflow: hidden;
  transform: translateY(0);
  transition: transform .45s var(--ease), border-color .35s, background .35s, box-shadow .45s var(--ease);
  animation: cardIn .55s var(--ease) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--grad-soft); opacity: 0;
  transition: opacity .45s var(--ease);
  pointer-events: none;
}
.card::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .34), transparent);
  opacity: 0; transition: opacity .4s;
}
.card:hover { transform: translateY(-5px); border-color: var(--stroke-strong); box-shadow: var(--shadow); }
.card:hover::before, .card:hover::after { opacity: 1; }
.card:active { transform: translateY(-1px) scale(.995); }

.card-top { display: flex; align-items: flex-start; gap: 12px; }
.file-icon {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(109, 94, 252, .32), rgba(34, 211, 238, .18));
  border: 1px solid rgba(255, 255, 255, .1);
  font-size: 10.5px; font-weight: 700; letter-spacing: .4px; color: #cfd6ff;
  text-transform: uppercase;
  transition: transform .45s var(--ease);
}
.card:hover .file-icon { transform: scale(1.06) rotate(-3deg); }

.card-headings { min-width: 0; flex: 1; }
.card-title {
  font-size: 15.5px; font-weight: 650; line-height: 1.35;
  margin: 3px 0 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-desc {
  margin: 7px 0 0; font-size: 12.8px; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lock-tag {
  position: absolute; top: 16px; right: 16px;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; color: #ffd27a;
  background: rgba(251, 191, 36, .12); border: 1px solid rgba(251, 191, 36, .28);
  padding: 3px 8px; border-radius: 999px;
}
.code-tag {
  display: inline-block; margin-top: 9px;
  font-size: 10.5px; letter-spacing: .6px; color: var(--muted-2);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--stroke);
  padding: 2px 8px; border-radius: 999px; font-variant-numeric: tabular-nums;
}

.card-foot {
  margin-top: 16px; padding-top: 13px;
  border-top: 1px dashed rgba(255, 255, 255, .08);
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: 11.6px; color: var(--muted-2);
}
.card-foot span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.card-foot b { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 70px 20px; animation: viewIn .5s var(--ease) both; }
.empty.small { padding: 40px 20px; }
.empty-art {
  width: 92px; height: 92px; margin: 0 auto 20px; border-radius: 26px;
  background: var(--grad-soft); border: 1px solid var(--stroke);
  position: relative; animation: bob 4.5s var(--ease-soft) infinite alternate;
}
.empty-art::after {
  content: ""; position: absolute; inset: 30px;
  border: 2px solid rgba(255, 255, 255, .5); border-radius: 8px;
}
@keyframes bob { to { transform: translateY(-9px) rotate(4deg); } }
.empty-title { margin: 0 0 6px; font-size: 15.5px; font-weight: 600; }
.empty-sub { margin: 0; font-size: 13px; color: var(--muted-2); }

/* ---------- 通用面板 / 按钮 ---------- */
.panel {
  background: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 22px; margin-bottom: 18px;
  animation: cardIn .5s var(--ease) both;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 14px;
  font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
  border: 1px solid transparent; color: var(--text);
  transition: transform .32s var(--ease), box-shadow .4s var(--ease), background .3s, border-color .3s, opacity .3s;
  position: relative; overflow: hidden;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; }
.btn-primary { background: var(--grad); box-shadow: 0 14px 32px -16px rgba(109, 94, 252, .95); color: #fff; }
.btn-primary:hover { box-shadow: 0 18px 40px -16px rgba(109, 94, 252, 1); }
.btn-ghost { background: var(--card-2); border-color: var(--stroke); }
.btn-ghost:hover { background: rgba(255, 255, 255, .11); border-color: var(--stroke-strong); }
.btn-admin { background: rgba(52, 211, 153, .14); border-color: rgba(52, 211, 153, .34); color: #7cf0c4; margin-top: 12px; width: 100%; }
.btn-admin:hover { background: rgba(52, 211, 153, .2); }
.btn-danger { background: rgba(255, 107, 129, .14); border-color: rgba(255, 107, 129, .3); color: #ffa3b1; }
.btn-danger:hover { background: rgba(255, 107, 129, .22); }
.btn-block { width: 100%; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }

/* ---------- 我的 ---------- */
.page-head { display: flex; align-items: center; gap: 14px; padding: 12px 0 22px; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: .4px; }
.page-sub { margin: 5px 0 0; font-size: 12.6px; color: var(--muted-2); }
.with-back .back { margin-right: 2px; }
.back {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 13px;
  background: var(--card); border: 1px solid var(--stroke); cursor: pointer;
  display: grid; place-items: center; transition: background .3s, transform .3s var(--ease), border-color .3s;
}
.back:hover { background: var(--card-2); border-color: var(--stroke-strong); transform: translateX(-2px); }
.back svg { width: 19px; height: 19px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.profile-row { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 52px; height: 52px; border-radius: 16px; flex: 0 0 auto;
  background: var(--grad); position: relative;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 12px 26px -14px rgba(109, 94, 252, .9);
}
.avatar::after {
  content: ""; position: absolute; inset: 15px 14px 12px;
  border-radius: 12px 12px 5px 5px; background: rgba(255, 255, 255, .88);
}
.profile-meta { min-width: 0; }
.profile-name { font-size: 15px; font-weight: 650; }
.profile-ip { margin-top: 4px; font-size: 12.6px; color: var(--muted); font-variant-numeric: tabular-nums; }

.storage-mini { margin-top: 18px; }
.storage-mini-head { display: flex; justify-content: space-between; font-size: 12.2px; color: var(--muted-2); margin-bottom: 8px; }
.bar { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar > i {
  display: block; height: 100%; border-radius: 99px; background: var(--grad);
  width: 0; transition: width .8s var(--ease);
  box-shadow: 0 0 14px rgba(109, 94, 252, .7);
}

.section-head { display: flex; align-items: center; gap: 10px; margin: 26px 2px 12px; }
.section-head h2 { margin: 0; font-size: 15.5px; font-weight: 650; }
.count-pill {
  font-size: 11.5px; color: var(--muted); background: var(--card-2);
  border: 1px solid var(--stroke); padding: 2px 9px; border-radius: 99px;
  font-variant-numeric: tabular-nums;
}

.list { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 16px;
  background: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius-sm);
  transition: background .3s, border-color .3s, transform .35s var(--ease);
  animation: cardIn .45s var(--ease) both;
}
.row:hover { background: var(--card-2); border-color: var(--stroke-strong); transform: translateX(2px); }
.row-main { min-width: 0; flex: 1; cursor: pointer; }
.row-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { margin-top: 4px; font-size: 11.6px; color: var(--muted-2); display: flex; gap: 12px; flex-wrap: wrap; }
.row-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.mini-btn {
  height: 32px; padding: 0 12px; font-size: 12.2px; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--stroke); color: var(--muted);
  cursor: pointer; font-family: inherit;
  transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.mini-btn:hover { color: var(--text); background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.mini-btn.danger:hover { color: #ffb3bf; border-color: rgba(255, 107, 129, .4); background: rgba(255, 107, 129, .14); }

/* ---------- 表单 ---------- */
.form .field { margin-bottom: 20px; }
.label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 9px; color: #cdd4ee; }
.req { color: var(--danger); margin-left: 3px; }
.opt, .label-inline { font-size: 11.5px; color: var(--muted-2); font-weight: 400; margin-left: 6px; }
.label-inline { margin-left: 0; font-size: 13px; color: #cdd4ee; font-weight: 600; }
.input {
  width: 100%; height: 46px; padding: 0 15px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--stroke); border-radius: 13px;
  color: var(--text); font-size: 14px; font-family: inherit; outline: none;
  transition: border-color .3s, box-shadow .35s var(--ease), background .3s;
}
.input::placeholder { color: var(--muted-2); }
.input:focus { border-color: rgba(109, 94, 252, .65); background: rgba(109, 94, 252, .07); box-shadow: 0 0 0 4px rgba(109, 94, 252, .11); }
.textarea { height: auto; padding: 12px 15px; resize: vertical; min-height: 84px; line-height: 1.6; }
.hint { margin: 8px 0 0; font-size: 11.8px; color: var(--muted-2); }
.hint.warn { color: #ffcf7a; }

.dropzone {
  border: 1.5px dashed rgba(255, 255, 255, .18); border-radius: 16px;
  padding: 26px 18px; text-align: center; cursor: pointer; outline: none;
  background: rgba(255, 255, 255, .022);
  transition: border-color .3s, background .3s, transform .35s var(--ease);
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.is-drag {
  border-color: rgba(109, 94, 252, .75); background: rgba(109, 94, 252, .09); transform: translateY(-2px);
}
.dz-icon { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 14px; background: var(--grad-soft); display: grid; place-items: center; border: 1px solid var(--stroke); }
.dz-icon svg { width: 22px; height: 22px; fill: none; stroke: #cfd6ff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dz-title { margin: 0; font-size: 13.6px; font-weight: 600; }
.dz-sub { margin: 6px 0 0; font-size: 11.6px; color: var(--muted-2); }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.switch-text { display: flex; flex-direction: column; gap: 4px; }
.switch {
  flex: 0 0 auto; width: 52px; height: 30px; border-radius: 99px; cursor: pointer;
  background: rgba(255, 255, 255, .12); border: 1px solid var(--stroke); position: relative;
  transition: background .38s var(--ease), border-color .3s;
}
.switch i {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: transform .42s var(--ease), background .3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.switch[aria-checked="true"] { background: var(--grad); border-color: transparent; }
.switch[aria-checked="true"] i { transform: translateX(22px); }

.pass-block { margin-top: 14px; animation: viewIn .4s var(--ease) both; }

.quota-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.2px; color: var(--muted); margin: 4px 0 18px;
  padding: 11px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .035); border: 1px solid var(--stroke);
}

.progress-block { margin-top: 16px; animation: viewIn .4s var(--ease) both; }
.progress-head { display: flex; justify-content: space-between; font-size: 12.2px; color: var(--muted); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.bar.loading > i { background-image: linear-gradient(90deg, #6d5efc, #22d3ee, #6d5efc); background-size: 200% 100%; animation: flow 1.4s linear infinite; }
@keyframes flow { to { background-position: -200% 0; } }

/* ---------- 详情 ---------- */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 18px; align-items: start; }
.preview-panel { padding: 14px; }
.preview {
  min-height: 380px; border-radius: 14px; overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 100% 26px,
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 26px 100%,
    rgba(0, 0, 0, .28);
  border: 1px solid var(--stroke);
  display: grid; place-items: center; padding: 18px; position: relative;
}
.preview img { max-width: 100%; max-height: 70vh; border-radius: 10px; display: block; animation: viewIn .5s var(--ease) both; }
.preview-hint { color: var(--muted-2); font-size: 13px; text-align: center; line-height: 1.7; }
.preview-cta { display: grid; gap: 12px; place-items: center; text-align: center; }
.preview-cta .p-type { font-size: 12px; color: var(--muted-2); }

.info-panel { display: flex; flex-direction: column; }
.info-list { list-style: none; margin: 0 0 18px; padding: 0; }
.info-list li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px dashed rgba(255, 255, 255, .08);
  font-size: 13px; animation: viewIn .45s var(--ease) both;
}
.info-list li:last-child { border-bottom: 0; }
.info-list span { color: var(--muted-2); flex: 0 0 auto; }
.info-list b { font-weight: 600; text-align: right; word-break: break-all; font-variant-numeric: tabular-nums; }
.info-list li.desc-row { flex-direction: column; gap: 7px; }
.info-list li.desc-row b { text-align: left; font-weight: 400; color: #c7cfe8; line-height: 1.65; }

.download-zone { margin-top: auto; }
.risk { margin: 12px 0 0; text-align: center; font-size: 11.4px; color: var(--muted-2); letter-spacing: .2px; }

/* ---------- 管理面板 ---------- */
.admin-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.6px; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 2.2s var(--ease-soft) infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.big-num { font-size: 34px; font-weight: 700; letter-spacing: -.5px; margin: 12px 0 4px; font-variant-numeric: tabular-nums; }
.big-num small { font-size: 13px; font-weight: 500; color: var(--muted-2); margin-left: 6px; }
.kv { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.kv li { display: flex; justify-content: space-between; font-size: 12.4px; color: var(--muted-2); }
.kv b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.list-panel { padding: 8px 18px 18px; }
.ip-head { display: grid; grid-template-columns: 1.6fr 1fr .9fr; gap: 12px; padding: 12px 4px; font-size: 11.6px; color: var(--muted-2); border-bottom: 1px solid var(--stroke); }
.ip-row {
  display: grid; grid-template-columns: 1.6fr 1fr .9fr; gap: 12px; align-items: center;
  padding: 13px 4px; border-bottom: 1px dashed rgba(255, 255, 255, .07);
  font-size: 13px; animation: viewIn .4s var(--ease) both;
}
.ip-row:last-child { border-bottom: 0; }
.ip-addr { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.ip-flag { font-size: 10px; padding: 2px 7px; border-radius: 99px; border: 1px solid var(--stroke); color: var(--muted-2); }
.ip-flag.on { color: #7cf0c4; border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .12); }
.ip-flag.ban { color: #ffa3b1; border-color: rgba(255, 107, 129, .4); background: rgba(255, 107, 129, .12); }
.ip-time { color: var(--muted-2); font-size: 12px; }
.ip-act { display: flex; justify-content: flex-end; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  bottom: max(14px, env(safe-area-inset-bottom));
  width: min(340px, calc(100vw - 32px)); height: var(--nav-h);
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  padding: 7px; gap: 4px;
  background: rgba(16, 20, 34, .78);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 22px;
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 20px 46px -20px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.tab {
  position: relative; z-index: 2; height: 100%; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--muted-2); font-family: inherit; font-size: 11.5px; font-weight: 600;
  transition: color .35s var(--ease);
}
.tab svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--ease); }
.tab.is-active { color: #fff; }
.tab.is-active svg { transform: translateY(-1px) scale(1.06); }
.tab-indicator {
  position: absolute; z-index: 1; top: 7px; left: 7px;
  width: calc(50% - 9px); height: calc(100% - 14px);
  border-radius: 16px; background: var(--grad);
  box-shadow: 0 10px 24px -12px rgba(109, 94, 252, .95);
  opacity: .92;
  transition: transform .5s var(--ease);
}

/* ---------- 弹窗 ---------- */
.modal-layer {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; padding: 20px;
  background: rgba(4, 6, 12, .58);
  backdrop-filter: blur(9px);
  animation: fadeIn .3s var(--ease) both;
}
.modal-layer.closing { animation: fadeOut .26s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }

.modal {
  width: min(430px, 100%);
  background: linear-gradient(180deg, rgba(24, 29, 48, .98), rgba(15, 19, 32, .99));
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 22px; padding: 24px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 1);
  animation: modalIn .44s var(--ease) both;
}
.modal-layer.closing .modal { animation: modalOut .26s var(--ease) both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes modalOut { to { opacity: 0; transform: translateY(12px) scale(.96); } }

.modal-title { margin: 0 0 6px; font-size: 17px; font-weight: 650; }
.modal-sub { margin: 0 0 18px; font-size: 12.8px; color: var(--muted-2); line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; height: 44px; }
.modal-error {
  margin: 12px 0 0; font-size: 12.4px; color: #ff9aab;
  background: rgba(255, 107, 129, .1); border: 1px solid rgba(255, 107, 129, .26);
  padding: 9px 12px; border-radius: 10px; animation: shake .38s var(--ease) both;
}
@keyframes shake {
  25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); }
}

/* ---------- 轻提示 ---------- */
.toasts { position: fixed; z-index: 120; left: 50%; transform: translateX(-50%); top: max(18px, env(safe-area-inset-top)); display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast {
  padding: 12px 16px; border-radius: 13px; font-size: 13px;
  background: rgba(24, 29, 48, .96); border: 1px solid var(--stroke-strong);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .95);
  animation: toastIn .42s var(--ease) both; color: var(--text);
}
.toast.ok { border-color: rgba(52, 211, 153, .38); }
.toast.err { border-color: rgba(255, 107, 129, .42); }
.toast.out { animation: toastOut .3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(.97); } }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .detail-layout { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .preview { min-height: 260px; }
}

@media (max-width: 720px) {
  #app { padding: 14px 14px calc(var(--nav-h) + 26px); }
  .topbar { gap: 12px; padding: 6px 0 14px; }
  .tools { width: 100%; margin-left: 0; gap: 8px; }
  .search { flex: 1; min-width: 0; height: 40px; }
  .select-wrap { flex: 0 0 auto; }
  .select-wrap select { height: 40px; padding: 0 32px 0 12px; font-size: 12.6px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .page-head { padding: 6px 0 16px; }
  .page-head h1 { font-size: 22px; }
  .panel { padding: 18px; border-radius: 18px; }
  .btn-row { grid-template-columns: 1fr; }
  .ip-head, .ip-row { grid-template-columns: 1.4fr .9fr .8fr; }
  .row { flex-wrap: wrap; }
  .row-actions { width: 100%; justify-content: flex-end; }
  .big-num { font-size: 28px; }
  .modal { padding: 20px; border-radius: 20px; }
  .tabbar { width: calc(100vw - 28px); }
}

@media (max-width: 420px) {
  .brand-text em { display: none; }
  .card { padding: 17px 16px 14px; }
  .card-foot { gap: 5px 10px; }
}

/* 降低动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
