/* ============================================================================
   全信 / OmniChat — visual identity: deep space, aurora light, glass surfaces.
   All colours and artwork are original to this project.
   ========================================================================== */

:root {
  --bg: #0b0f1c;
  --bg-elev: #121829;
  --surface: rgba(22, 28, 46, 0.72);
  --surface-2: rgba(30, 38, 60, 0.6);
  --border: rgba(140, 160, 210, 0.16);
  --text: #e8ecf8;
  --text-dim: #97a2c0;
  --accent: #39e0c8;
  --accent-2: #8a6bff;
  --accent-grad: linear-gradient(120deg, #39e0c8, #8a6bff);
  --danger: #ff6b81;
  --ok: #46d693;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(4, 8, 20, 0.55);
  --rail-w: 76px;
  font-synthesis: none;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef1fa;
    --bg-elev: #ffffff;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-2: rgba(240, 243, 252, 0.9);
    --border: rgba(60, 80, 140, 0.16);
    --text: #17203a;
    --text-dim: #5a678c;
    --shadow: 0 18px 44px rgba(40, 60, 120, 0.16);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 50% at 12% 0%, rgba(57, 224, 200, 0.14), transparent 70%),
    radial-gradient(50% 45% at 88% 8%, rgba(138, 107, 255, 0.16), transparent 70%),
    radial-gradient(45% 40% at 70% 100%, rgba(57, 224, 200, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
a { color: var(--accent); text-decoration: none; }
.muted { color: var(--text-dim); }
.small { font-size: 12.5px; }
.spacer { flex: 1; }

/* -------------------------------------------------------------------- boot */
.root { position: relative; z-index: 1; height: 100dvh; }
.boot { height: 100%; display: grid; place-content: center; gap: 14px; text-align: center; color: var(--text-dim); }
.boot-error { color: var(--danger); }
.boot-mark {
  width: 54px; height: 54px; margin: 0 auto; border-radius: 16px;
  background: var(--accent-grad);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(0.85); opacity: 0.6; } 50% { transform: scale(1); opacity: 1; } }

/* ------------------------------------------------------------------ glass */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow);
}

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 9px 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform 0.12s ease, background 0.16s ease, border-color 0.16s ease;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(140, 160, 210, 0.35); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn.primary { background: var(--accent-grad); color: #06121b; border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { background: rgba(255, 107, 129, 0.14); color: var(--danger); border-color: rgba(255, 107, 129, 0.3); }
.btn.block { width: 100%; }
.btn.liked { color: var(--danger); }
.icon-btn { padding: 8px; border-radius: 50%; }

/* ------------------------------------------------------------------ inputs */
.input {
  width: 100%; padding: 11px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text);
  font-size: 14px; font-family: inherit; outline: none; transition: border-color 0.16s ease;
}
.input:focus { border-color: var(--accent); }
.input.compact { padding: 7px 10px; font-size: 13px; width: auto; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%); background-position: right 14px center, right 9px center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ------------------------------------------------------------------- auth */
.auth-screen { position: relative; height: 100%; display: grid; place-items: center; padding: 20px; overflow: auto; }
.aurora {
  position: absolute; inset: -20%;
  background:
    conic-gradient(from 200deg at 30% 30%, rgba(57, 224, 200, 0.22), transparent 40%),
    conic-gradient(from 10deg at 70% 70%, rgba(138, 107, 255, 0.24), transparent 45%);
  filter: blur(60px);
  animation: drift 22s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes drift { from { transform: translate3d(-4%, -2%, 0) rotate(-4deg); } to { transform: translate3d(4%, 3%, 0) rotate(5deg); } }
.auth-card { position: relative; z-index: 1; width: min(440px, 100%); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.auth-head { text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.auth-head h1 { margin: 0; font-size: 22px; letter-spacing: 0.5px; }
.auth-head p { margin: 0; font-size: 13px; }
.brand-mark { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-foot { text-align: center; line-height: 1.5; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.auth-admin-link { background: none; border: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 2px 4px; border-radius: 8px; }
.auth-admin-link:hover { text-decoration: underline; }
.auth-form .field span + .input, .auth-form .input { width: 100%; }
.tabs { display: flex; gap: 6px; padding: 4px; background: var(--surface-2); border-radius: 12px; }
.tab { flex: 1; padding: 8px; border: none; background: transparent; color: var(--text-dim); font-weight: 600; border-radius: 9px; cursor: pointer; }
.tab.active { background: var(--accent-grad); color: #06121b; }

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: var(--rail-w) 1fr; height: 100%; }
.rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-right: 1px solid var(--border); background: var(--surface); backdrop-filter: blur(18px); }
.rail-brand { display: grid; place-items: center; margin-bottom: 10px; }
.rail-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; padding: 10px 4px; border: none; background: transparent; color: var(--text-dim); border-radius: 12px; cursor: pointer; font-size: 11px; }
.rail-btn:hover { background: var(--surface-2); color: var(--text); }
.rail-btn.active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.rail-btn.active svg { color: var(--accent); }
.rail-foot { margin-top: auto; }
.status-dot { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--text-dim); }
.status-dot.status-online { background: var(--ok); box-shadow: 0 0 0 4px rgba(70, 214, 147, 0.18); }
.status-dot.status-connecting, .status-dot.status-reconnecting { background: #f7c948; }
.status-dot.status-offline, .status-dot.status-idle { background: var(--danger); }
.rail-label { display: none; }

.content { overflow: hidden; display: flex; flex-direction: column; }
.view { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.view-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.view-head h2 { margin: 0; font-size: 18px; }
.view-body { flex: 1; overflow: auto; padding: 16px 20px 24px; }

/* ------------------------------------------------------------- conv list */
.conv-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.search-input { margin-bottom: 4px; }
.conv-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid transparent; background: var(--surface); border-radius: var(--radius); cursor: pointer; text-align: left; color: inherit; width: 100%; }
.conv-row:hover { border-color: var(--border); background: var(--surface-2); }
.conv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.conv-top, .conv-bottom { display: flex; align-items: center; gap: 8px; }
.conv-top strong { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.badge { background: var(--accent-grad); color: #06121b; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 7px; }
.pin-mark { color: var(--text-dim); }
.avatar { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-grad); color: #06121b; font-weight: 700; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 34px; height: 34px; border-radius: 11px; font-size: 13px; }

/* ---------------------------------------------------------------- thread */
.thread-head .thread-title { display: flex; flex-direction: column; }
.view-thread .msg-list { flex: 1; overflow-y: auto; padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 8px; }
.bubble { position: relative; max-width: min(72%, 560px); padding: 9px 12px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); animation: rise 0.18s ease; }
.bubble.theirs { align-self: flex-start; border-bottom-left-radius: 5px; }
.bubble.mine { align-self: flex-end; background: linear-gradient(150deg, rgba(57, 224, 200, 0.18), rgba(138, 107, 255, 0.18)); border-bottom-right-radius: 5px; }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.bubble .sender { display: block; font-size: 11.5px; color: var(--accent); margin-bottom: 3px; }
.bubble-body .text { margin: 0; white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.bubble.recalled { opacity: 0.7; font-style: italic; }
.bubble-meta { display: flex; align-items: center; gap: 5px; justify-content: flex-end; margin-top: 3px; }
.ts { font-size: 10.5px; color: var(--text-dim); }
.receipt { color: var(--text-dim); display: inline-flex; }
.receipt.read { color: var(--accent); }
.locked { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); }
.media { margin: 0; max-width: 300px; }
.media img, video.media { width: 100%; border-radius: 10px; display: block; }
.media figcaption { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.sticker-emoji { font-size: 42px; line-height: 1; }
.sticker img { max-width: 140px; }
.voice { display: flex; align-items: center; gap: 8px; }
.voice audio { height: 34px; }
.file { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); color: var(--text); }
.reaction-bar { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.reaction { border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; font-size: 12px; cursor: pointer; color: var(--text); }
.reaction.mine { border-color: var(--accent); }

/* -------------------------------------------------------------- composer */
.composer { display: flex; align-items: flex-end; gap: 4px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); }
.composer-input { resize: none; max-height: 140px; line-height: 1.5; }
.send-btn { flex: none; }

/* ----------------------------------------------------------------- square */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.person-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.person-head { display: flex; align-items: center; gap: 10px; }
.person-id { display: flex; flex-direction: column; min-width: 0; }
.score { margin-left: auto; font-weight: 800; font-size: 20px; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.person-bio { margin: 0; font-size: 13px; }
.reasons { margin: 0; }
.person-actions, .row-actions, .game-actions, .publish-actions, .modal-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-dim); font-size: 12.5px; cursor: pointer; }
.chip.on { background: var(--accent-grad); color: #06121b; border-color: transparent; }
.tag { padding: 2px 8px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 11.5px; color: var(--text-dim); }
.tag.on { color: var(--accent); border-color: rgba(57, 224, 200, 0.4); }
.tag-filter { margin-bottom: 14px; }
.banner:empty { display: none; }
.banner-inner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 12px 20px 0; }

/* ---------------------------------------------------------------- moments */
.publish { padding: 14px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.feed { display: flex; flex-direction: column; gap: 12px; }
.moment { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.moment-head { display: flex; align-items: center; gap: 8px; }
.moment-text { margin: 0; white-space: pre-wrap; line-height: 1.55; }
.media-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { position: relative; width: 88px; height: 88px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-x { position: absolute; top: 4px; right: 4px; border: none; border-radius: 50%; background: rgba(0, 0, 0, 0.5); color: #fff; padding: 2px; cursor: pointer; }
.moment-actions { display: flex; gap: 10px; }
.comments { display: flex; flex-direction: column; gap: 4px; }
.comment { font-size: 13px; background: var(--surface-2); padding: 5px 9px; border-radius: 9px; }
.comment-box { display: flex; gap: 6px; align-items: center; }

/* ------------------------------------------------------------------ games */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-content: start; }
.panel { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.panel-head { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.panel-head h3 { margin: 0; color: var(--text); font-size: 15px; }
.panel.danger { border-color: rgba(255, 107, 129, 0.3); }
.cards { display: flex; gap: 6px; flex-wrap: wrap; }
.card { min-width: 40px; height: 56px; display: grid; place-items: center; border-radius: 8px; background: var(--bg-elev); border: 1px solid var(--border); font-weight: 700; }
.recent-list { display: flex; flex-direction: column; gap: 6px; }
.recent-row, .list-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.sticker-grid { display: flex; flex-wrap: wrap; gap: 8px; max-height: 240px; overflow: auto; }
.stick { border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: 6px; cursor: pointer; font-size: 26px; }
.stick img { width: 48px; height: 48px; object-fit: contain; display: block; }
.skeleton-card { height: 140px; border-radius: var(--radius); background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.empty { padding: 40px 10px; text-align: center; display: flex; flex-direction: column; gap: 6px; }

/* --------------------------------------------------------------- settings */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-content: start; }
.fingerprint { display: block; padding: 10px; border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--border); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; letter-spacing: 1px; word-break: break-all; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.policy { display: flex; flex-direction: column; gap: 6px; }
.policy-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.relation-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* --------------------------------------------------------------- overlays */
.overlay { position: fixed; inset: 0; background: rgba(4, 7, 15, 0.62); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 18px; z-index: 40; animation: fade 0.15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(520px, 100%); padding: 18px; display: flex; flex-direction: column; gap: 14px; max-height: 86dvh; overflow: auto; }
.modal.center { text-align: center; align-items: center; }
.modal h3 { margin: 0; font-size: 16px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal.menu { width: min(340px, 100%); }
.emoji-row { display: flex; gap: 6px; justify-content: space-between; }
.emoji-btn { font-size: 24px; border: none; background: transparent; cursor: pointer; padding: 4px; border-radius: 8px; }
.emoji-btn:hover { background: var(--surface-2); }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: none; background: transparent; color: var(--text); cursor: pointer; border-radius: 10px; font-size: 14px; }
.menu-item:hover { background: var(--surface-2); }
.result-list { display: flex; flex-direction: column; gap: 4px; max-height: 46dvh; overflow: auto; }
.result-row { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid transparent; background: transparent; border-radius: 12px; cursor: pointer; color: inherit; text-align: left; }
.result-row:hover { background: var(--surface-2); border-color: var(--border); }
.result-main { display: flex; flex-direction: column; }
.rec-dot { width: 46px; height: 46px; border-radius: 50%; background: var(--danger); animation: pulse 1s infinite; }

.toast-root { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; align-items: center; }
.toast { padding: 10px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 13.5px; animation: rise 0.2s ease; }
.toast-out { opacity: 0; transform: translateY(6px); transition: all 0.3s ease; }
.toast-error { border-color: rgba(255, 107, 129, 0.5); color: var(--danger); }
.toast-success { border-color: rgba(70, 214, 147, 0.5); }
.toast-warn { border-color: rgba(247, 201, 72, 0.5); }

/* ------------------------------------------------------------- responsive */
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .rail { flex-direction: row; order: 2; border-right: none; border-top: 1px solid var(--border); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .rail-brand { display: none; }
  .rail-label { display: block; }
  .rail-btn { flex: 1; }
  .rail-foot { display: none; }
  .view-head { padding: 12px 14px; }
  .view-body { padding: 12px 14px 18px; }
  .bubble { max-width: 84%; }
  .card-grid, .games-grid, .settings-grid { grid-template-columns: 1fr; }
}

/* ================================================================ 通话 UI */
.call-overlay { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 18px; background: rgba(4, 7, 15, 0.72); backdrop-filter: blur(6px); animation: fade 0.15s ease; }
.call-card { width: min(380px, 100%); padding: 26px 22px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.call-avatar-lg { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-grad); color: #06121b; animation: pulse 1.8s infinite; }
.call-avatar-lg.ended { animation: none; background: var(--surface-2); color: var(--text-dim); }
.call-title { margin: 0; font-size: 18px; }
.call-stage { width: min(960px, 100%); height: min(86dvh, 640px); display: flex; flex-direction: column; gap: 14px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); }
.call-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.call-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.call-head-text .call-title { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-status { font-variant-numeric: tabular-nums; }
.call-grid { flex: 1; display: grid; gap: 12px; grid-template-columns: 1fr; align-content: center; justify-items: center; overflow: auto; }
.call-grid.video { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-content: stretch; }
.call-tile { position: relative; width: 100%; min-height: 180px; border-radius: 16px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.call-tile .call-tile-avatar { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-dim); opacity: 0.55; }
.call-tile.video .call-tile-avatar, .call-tile:not(.audio) .call-tile-avatar { display: none; }
.call-video { width: 100%; height: 100%; object-fit: cover; background: #05070f; }
.call-video.local { transform: scaleX(-1); }
.call-name { position: absolute; bottom: 8px; left: 10px; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: rgba(4, 7, 15, 0.6); color: #fff; }
.call-audio { display: none; }
.call-tile.audio { min-height: 220px; }
.call-actions { display: flex; align-items: center; justify-content: center; gap: 14px; }
.btn.round { width: 52px; height: 52px; padding: 0; border-radius: 50%; display: grid; place-items: center; }
.btn.success { background: rgba(70, 214, 147, 0.16); color: var(--ok); border-color: rgba(70, 214, 147, 0.35); }
.btn.round.active { background: var(--danger); color: #fff; border-color: transparent; }

@media (max-width: 720px) {
  .call-stage { height: 92dvh; border-radius: 16px; padding: 12px; }
  .call-grid.video { grid-template-columns: 1fr; }
}

/* ============================================================ 运营后台 UI */
.view-admin { display: flex; flex-direction: column; min-height: 0; }
.admin-tabs { display: flex; gap: 6px; padding: 0 14px 10px; flex-wrap: wrap; }
.admin-tab { background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.admin-tab.active { background: var(--accent-grad); color: #06121b; border-color: transparent; font-weight: 700; }
.admin-body { display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.admin-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-toolbar .input { max-width: 260px; }
.admin-list { display: flex; flex-direction: column; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 6px; background: var(--surface); cursor: pointer; }
.admin-row:hover { border-color: var(--accent); }
.admin-row-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.admin-row-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.admin-pager { display: flex; align-items: center; gap: 10px; justify-content: center; padding-top: 6px; }
.admin-handle { font-weight: 600; }
.dot-online { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }
.badge-muted { background: var(--surface-2); color: var(--text-dim); }
.badge-ok { background: rgba(70, 214, 147, 0.2); color: var(--ok); }
.badge-danger { background: rgba(255, 107, 129, 0.2); color: var(--danger); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stat-value { font-size: 22px; font-weight: 700; }
.stat-label { font-size: 12.5px; color: var(--text-dim); }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv > span:last-child { font-size: 13.5px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.perm-list, .privacy-list { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.perm-row, .privacy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.perm-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.perm-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.privacy-row .input { max-width: 160px; }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.admin-modal { width: min(680px, 94vw); max-height: 88dvh; overflow: auto; }
.admin-modal .panel-head { margin-top: 10px; }
.evidence { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12.5px; white-space: pre-wrap; word-break: break-word; margin: 4px 0; }
.report-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 8px; }
.report-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-card .row-actions { flex-wrap: wrap; }
