/* ============================================================
   Liquid Share — 管理端样式
   ============================================================ */

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; position: relative; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: calc(var(--sat) + 12px) 16px 12px;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, rgba(10,12,18,.88), rgba(10,12,18,.62));
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  border-bottom: 1px solid var(--stroke-soft);
}
.brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  background: linear-gradient(155deg, rgba(255,255,255,.22), rgba(255,255,255,.05));
  border: 1px solid var(--stroke); box-shadow: inset 0 1px 0 var(--hi);
  display: grid; place-items: center; font-size: 17px; color: var(--tint-2);
}
.brand-name { font-size: 16px; font-weight: 650; letter-spacing: -.3px; }
.brand-sub { font-size: 10.5px; color: var(--muted); letter-spacing: .3px; }
.topbar .status-pill { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }

/* ---------- 内容 ---------- */
.content { padding: 16px 16px calc(112px + var(--sab)); }
.view { display: none; }
.view.active { display: block; animation: fadeIn .3s var(--ease) both; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 2px 16px; }
.view-head h2 { font-size: 25px; font-weight: 680; letter-spacing: -.7px; }
.view-head p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- 仪表盘 ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat {
  padding: 16px; border-radius: var(--r-md);
  background: linear-gradient(158deg, rgba(255,255,255,.10), rgba(255,255,255,.03) 45%, rgba(255,255,255,.02));
  -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid var(--stroke); box-shadow: inset 0 1px 0 var(--hi), 0 12px 30px rgba(0,0,0,.28);
  position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, rgba(255,255,255,.07), transparent 40%); }
.stat .k { font-size: 11.5px; color: var(--muted); letter-spacing: .2px; }
.stat .v { font-size: 30px; font-weight: 660; letter-spacing: -1.2px; margin-top: 6px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .d { font-size: 11px; color: var(--muted-2); margin-top: 4px; }
.stat.accent .v { color: var(--tint-2); }
.stat.ok .v { color: var(--ok); }

.section-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 22px 4px 10px; letter-spacing: .2px; }
.svc-list { display: flex; flex-direction: column; }
.svc-row { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--stroke-soft); font-size: 13px; }
.svc-row:last-child { border-bottom: 0; }
.svc-row .name { flex: 1; }
.svc-row .val { font-size: 11.5px; color: var(--muted); }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick .btn { flex-direction: column; gap: 6px; min-height: 74px; padding: 10px 4px; font-size: 12px; }
.quick .btn .qi { font-size: 19px; opacity: .85; }

/* ---------- 列表 / 链接卡片 ---------- */
.card-list { display: flex; flex-direction: column; gap: 12px; }
.lcard { padding: 15px; border-radius: var(--r-md); }
.lcard .lhead { display: flex; align-items: flex-start; gap: 10px; }
.lcard .ltype {
  width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255,255,255,.07); border: 1px solid var(--stroke-soft); font-size: 17px;
}
.lcard .ltitle { font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
.lcard .lmeta { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.lcard .lurl {
  margin-top: 12px; padding: 9px 11px; border-radius: 11px; background: rgba(0,0,0,.26);
  border: 1px solid var(--stroke-soft); font-size: 11.5px; color: var(--tint-2);
  word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.lcard .lacts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.lcard .lacts .btn { flex: 1 1 auto; min-width: 62px; }
.lcard.expired { opacity: .62; }
.lcard .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }

/* ---------- 类型选择 ---------- */
.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.type-card {
  text-align: left; padding: 15px; border-radius: var(--r-md);
  background: var(--glass); border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%);
  box-shadow: inset 0 1px 0 var(--hi);
  transition: transform .16s var(--ease), background .2s;
  min-height: 104px; display: flex; flex-direction: column; gap: 6px;
}
.type-card:active { transform: scale(.97); background: var(--glass-3); }
.type-card .ti { font-size: 22px; }
.type-card .tn { font-size: 14px; font-weight: 600; }
.type-card .td { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* ---------- 编辑器 ---------- */
.editor-grid { display: grid; gap: 14px; }
.preview-wrap { position: sticky; top: 0; z-index: 2; }
.preview-frame {
  height: 360px; overflow: auto; -webkit-overflow-scrolling: touch;
  border-radius: var(--r-md); border: 1px solid var(--stroke);
  background: #070910; box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 12px 30px rgba(0,0,0,.3);
}
.preview-frame .pg { max-width: none; }
.preview-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 8px; font-size: 12px; color: var(--muted); }
.mini-label { font-size: 11.5px; color: var(--muted); margin: 14px 2px 8px; letter-spacing: .3px; }

.pick-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-item {
  display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 11px;
  background: rgba(255,255,255,.055); border: 1px solid var(--stroke-soft); font-size: 12px; max-width: 100%;
}
.pick-item .pn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.pick-item button { color: var(--err); font-size: 14px; line-height: 1; padding: 2px; }

.btn-editor-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.btn-editor-row .input { flex: 1; }
.btn-editor-row .input.short { flex: 0 0 32%; }

/* ---------- 媒体库 ---------- */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.mtile {
  position: relative; aspect-ratio: 1; border-radius: 13px; overflow: hidden;
  background: rgba(255,255,255,.05); border: 1px solid var(--stroke-soft);
}
.mtile img, .mtile video { width: 100%; height: 100%; object-fit: cover; }
.mtile .mtag {
  position: absolute; left: 5px; bottom: 5px; padding: 2px 6px; border-radius: 6px;
  background: rgba(0,0,0,.62); font-size: 9.5px; color: #fff; backdrop-filter: blur(6px);
}
.mtile .mplay { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; color: rgba(255,255,255,.9); pointer-events: none; }
.mtile:active { transform: scale(.97); }
.upload-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--stroke-soft); }
.upload-row:last-child { border-bottom: 0; }
.upload-row .uinfo { flex: 1; min-width: 0; }
.upload-row .uname { font-size: 12.5px; }
.upload-row .ustat { font-size: 11px; color: var(--muted); margin-top: 3px; }
.upload-row .progress { margin-top: 7px; }

/* ---------- 日志 ---------- */
.log-row { display: flex; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--stroke-soft); font-size: 12px; align-items: flex-start; }
.log-row:last-child { border: 0; }
.log-row .ltime { color: var(--muted-2); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.log-row .levent { flex: 1; }
.log-row .levent b { font-weight: 570; }

/* ---------- 底部标签栏 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  max-width: 560px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 8px calc(8px + var(--sab));
  background: linear-gradient(180deg, rgba(20,23,32,.72), rgba(10,12,18,.94));
  -webkit-backdrop-filter: blur(30px) saturate(175%); backdrop-filter: blur(30px) saturate(175%);
  border-top: 1px solid var(--stroke);
  box-shadow: 0 -1px 0 rgba(255,255,255,.06) inset;
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 10px; padding: 4px 0; border-radius: 12px;
  transition: color .2s, transform .16s var(--ease);
}
.tab:active { transform: scale(.92); }
.tab.on { color: var(--tint-2); }
.tab .ti { font-size: 20px; line-height: 1.15; }
.tab.fab { position: relative; }
.tab.fab .fab-btn {
  width: 50px; height: 50px; border-radius: 17px; margin-top: -18px;
  background: linear-gradient(160deg, rgba(190,210,255,.30), rgba(140,170,235,.16));
  border: 1px solid rgba(190,210,255,.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 22px rgba(70,100,170,.25);
  display: grid; place-items: center; font-size: 27px; color: #eef3ff; font-weight: 300;
}
.tab.fab:active .fab-btn { transform: scale(.94); }

/* ---------- 登录 ---------- */
#loginView {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(120% 70% at 20% 0%, rgba(110,135,190,.16), transparent 60%), var(--bg);
}
#loginView.hide { display: none; }
.login-box { width: 100%; max-width: 400px; padding: 26px 22px; border-radius: var(--r-lg); }
.login-logo { text-align: center; margin-bottom: 22px; }
.login-logo .lm {
  width: 62px; height: 62px; border-radius: 20px; margin: 0 auto 12px;
  display: grid; place-items: center; font-size: 30px;
  background: linear-gradient(155deg, rgba(255,255,255,.22), rgba(255,255,255,.045));
  border: 1px solid var(--stroke); box-shadow: inset 0 1px 0 var(--hi), 0 12px 32px rgba(0,0,0,.35);
}
.login-logo h1 { font-size: 23px; font-weight: 650; letter-spacing: -.5px; }
.login-logo p { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ---------- 二维码 ---------- */
.qr-box {
  background: #fff; border-radius: 18px; padding: 14px; margin: 0 auto;
  width: min(260px, 72vw); box-shadow: 0 12px 32px rgba(0,0,0,.4);
}
.qr-box svg { display: block; width: 100%; height: auto; }
.qr-url { font-size: 11.5px; color: var(--tint-2); word-break: break-all; text-align: center; margin-top: 14px; font-family: ui-monospace, monospace; }

/* ---------- 详情弹层 ---------- */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--stroke-soft); font-size: 13px; }
.kv:last-child { border: 0; }
.kv .k { color: var(--muted); }
.kv .v { text-align: right; word-break: break-all; max-width: 68%; }

/* ---------- 媒体预览 ---------- */
.media-viewer { width: 100%; max-height: 62vh; object-fit: contain; border-radius: var(--r-md); background: #000; display: block; margin: 0 auto; }

@media (min-width: 600px) {
  #app { border-left: 1px solid var(--stroke-soft); border-right: 1px solid var(--stroke-soft); }
  .tabbar { border-radius: 20px 20px 0 0; }
}
