/* CIBYP-IM v2 — 青春校园风 · 3 风格 × 深/浅 */
/* ---------- base palette (default: sakura light) ---------- */
:root {
  --bg: #fff8fb;
  --bg-grad1: #ffe3f0;
  --bg-grad2: #e8f0ff;
  --panel: #ffffff;
  --panel2: #fdf1f7;
  --input-bg: #fff1f7;
  --text: #3a2b3d;
  --muted: #9a8a9e;
  --border: #ffe0ec;
  --accent: #ff6fae;
  --accent2: #a78bfa;
  --accent-grad: linear-gradient(135deg, #ff6fae, #a78bfa);
  --accent-text: #ffffff;
  --bubble-in: #fdeef5;
  --bubble-in-text: #3a2b3d;
  --bubble-out: #ff6fae;
  --bubble-out-text: #ffffff;
  --ok: #2fc98f;
  --danger: #ff5470;
  --warn: #ffb020;
  --shadow: 0 6px 24px rgba(255, 111, 174, .12);
  --shadow-sm: 0 2px 10px rgba(255, 111, 174, .10);
  --radius: 16px;
  --radius-sm: 10px;
  color-scheme: light;
}

[data-style="sakura"][data-mode="dark"] {
  color-scheme: dark;
  --bg: #1b1e2e;
  --bg-grad1: #2a2140;
  --bg-grad2: #1b1e2e;
  --panel: #232740;
  --panel2: #2a2f4a;
  --input-bg: #1c2035;
  --text: #f0eef8;
  --muted: #9aa0bd;
  --border: #333a5c;
  --accent: #ff8ac1;
  --accent2: #a78bfa;
  --accent-grad: linear-gradient(135deg, #ff8ac1, #a78bfa);
  --bubble-in: #2a2f4a;
  --bubble-in-text: #f0eef8;
  --bubble-out: #ff5fa2;
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
}

[data-style="mint"][data-mode="light"] {
  color-scheme: light;
  --bg: #f2fbf7;
  --bg-grad1: #dcf5ea;
  --bg-grad2: #e8f4fd;
  --panel: #ffffff;
  --panel2: #eef9f4;
  --input-bg: #e8f7f0;
  --text: #22352d;
  --muted: #7d968b;
  --border: #d6f0e4;
  --accent: #2fc98f;
  --accent2: #38bdf8;
  --accent-grad: linear-gradient(135deg, #2fc98f, #38bdf8);
  --bubble-in: #e9f8f1;
  --bubble-in-text: #22352d;
  --bubble-out: #2fc98f;
  --shadow: 0 6px 24px rgba(47, 201, 143, .14);
  --shadow-sm: 0 2px 10px rgba(47, 201, 143, .12);
}

[data-style="mint"][data-mode="dark"] {
  color-scheme: dark;
  --bg: #10201c;
  --bg-grad1: #123029;
  --bg-grad2: #10201c;
  --panel: #162922;
  --panel2: #1c332b;
  --input-bg: #12251e;
  --text: #e8f6f0;
  --muted: #86a89a;
  --border: #24433a;
  --accent: #3ddc9e;
  --accent2: #38bdf8;
  --accent-grad: linear-gradient(135deg, #3ddc9e, #38bdf8);
  --bubble-in: #1c332b;
  --bubble-in-text: #e8f6f0;
  --bubble-out: #2fbf85;
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
}

[data-style="vivid"][data-mode="light"] {
  color-scheme: light;
  --bg: #fff9f2;
  --bg-grad1: #ffe9d2;
  --bg-grad2: #fff3d6;
  --panel: #ffffff;
  --panel2: #fff3e4;
  --input-bg: #fff3e2;
  --text: #3d2b1e;
  --muted: #a08c74;
  --border: #ffe4c8;
  --accent: #ff8a3d;
  --accent2: #ffd166;
  --accent-grad: linear-gradient(135deg, #ff8a3d, #ffd166);
  --bubble-in: #fff1e0;
  --bubble-in-text: #3d2b1e;
  --bubble-out: #ff8a3d;
  --shadow: 0 6px 24px rgba(255, 138, 61, .14);
  --shadow-sm: 0 2px 10px rgba(255, 138, 61, .12);
}

[data-style="vivid"][data-mode="dark"] {
  color-scheme: dark;
  --bg: #221a10;
  --bg-grad1: #332612;
  --bg-grad2: #221a10;
  --panel: #2b2115;
  --panel2: #332716;
  --input-bg: #251c10;
  --text: #f7efe4;
  --muted: #a89a86;
  --border: #433421;
  --accent: #ff9c55;
  --accent2: #ffd166;
  --accent-grad: linear-gradient(135deg, #ff9c55, #ffd166);
  --bubble-in: #332716;
  --bubble-in-text: #f7efe4;
  --bubble-out: #ff8a3d;
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: linear-gradient(160deg, var(--bg-grad1), var(--bg-grad2)) fixed;
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; }
img { -webkit-user-drag: none; }
.muted { color: var(--muted); }

/* ---------- auth ---------- */
#auth-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.auth-card {
  width: 380px; max-width: 100%;
  background: var(--panel);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.auth-logo { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.logo-badge {
  width: 54px; height: 54px; border-radius: 18px;
  background: var(--accent-grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; box-shadow: var(--shadow-sm);
}
.auth-logo h1 { margin: 0; font-size: 22px; letter-spacing: .5px; }
.auth-logo p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.server-url { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.server-url input { flex: 1; }
.auth-tabs { display: flex; background: var(--panel2); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.auth-tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); transition: .2s; }
.auth-tabs button.active { background: var(--panel); color: var(--accent); box-shadow: var(--shadow-sm); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.field input, .field textarea, .field select, .server-url input {
  width: 100%; border: 1.5px solid var(--border); background: var(--input-bg);
  border-radius: var(--radius-sm); padding: 10px 12px; color: var(--text); outline: none; transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus, .server-url input:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 60px; }
.auth-error { min-height: 20px; font-size: 12.5px; color: var(--danger); margin-bottom: 8px; }
.auth-submit {
  width: 100%; border: 0; padding: 12px; border-radius: var(--radius-sm);
  background: var(--accent-grad); color: var(--accent-text); font-size: 15px; font-weight: 700;
  box-shadow: var(--shadow-sm); transition: transform .15s, opacity .2s;
}
.auth-submit:hover { transform: translateY(-1px); }
.auth-submit:disabled { opacity: .6; cursor: default; transform: none; }
.auth-hint { margin-top: 16px; font-size: 11.5px; color: var(--muted); text-align: center; }

/* ---------- layout ---------- */
#app { display: none; height: 100vh; }
#app.ready { display: flex; }
.sidebar {
  width: 300px; min-width: 300px; background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.chat { flex: 1; min-width: 0; display: flex; flex-direction: column; background: transparent; }
.panel {
  width: 300px; min-width: 300px; background: var(--panel);
  border-left: 1px solid var(--border); display: none; flex-direction: column;
}
.panel.open { display: flex; }

.sidebar-head { display: flex; align-items: center; gap: 8px; padding: 14px; }
.sidebar-tabs { display: flex; gap: 6px; padding: 0 14px 10px; }
.st-tab {
  flex: 1; border: 0; background: transparent; color: var(--muted);
  padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px; position: relative;
  transition: background .2s, color .2s;
}
.st-tab:hover { background: var(--panel2); }
.st-tab.active { background: var(--accent-soft); color: var(--accent); }
.st-badge {
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 9px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
}
.contacts-view { flex: 1; overflow-y: auto; padding: 0 14px 14px; }
.cv-sec { margin-top: 12px; }
.cv-title { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; padding-left: 2px; }
.cv-list { display: flex; flex-direction: column; gap: 4px; }
.btn.small { padding: 5px 9px; font-size: 11.5px; border-radius: 8px; flex-shrink: 0; }
.me-chip { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px; border-radius: var(--radius-sm); transition: background .2s; }
.me-chip:hover { background: var(--panel2); }
.me-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-sub { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; }
.online-dot.off { background: var(--muted); }
.avatar {
  width: 40px; height: 40px; border-radius: 14px; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0; box-shadow: var(--shadow-sm);
}
.iconbtn {
  border: 0; background: transparent; color: var(--muted);
  width: 36px; height: 36px; border-radius: 10px; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; transition: background .2s, color .2s;
}
.iconbtn:hover { background: var(--panel2); color: var(--accent); }

.search-box { position: relative; margin: 0 14px 10px; display: flex; align-items: center; gap: 8px; background: var(--panel2); border-radius: var(--radius-sm); padding: 8px 12px; }
.search-box > i { color: var(--muted); font-size: 13px; }
.search-box input { border: 0; background: transparent; outline: none; flex: 1; color: var(--text); font-size: 13px; }
.search-results {
  position: absolute; top: 110%; left: 0; right: 0; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  display: none; z-index: 30; max-height: 320px; overflow: auto;
}
.search-results.open { display: block; }
.sr-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; border-radius: var(--radius-sm); }
.sr-item:hover { background: var(--panel2); }

.conv-list { flex: 1; overflow-y: auto; padding: 0 8px; }
.empty-convs { text-align: center; color: var(--muted); font-size: 12.5px; padding: 28px 10px; }
.conv-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: var(--radius-sm);
  cursor: pointer; position: relative; transition: background .15s;
}
.conv-item:hover { background: var(--panel2); }
.conv-item.active { background: var(--accent-grad); box-shadow: var(--shadow-sm); }
.conv-item.active .conv-name, .conv-item.active .conv-last, .conv-item.active .conv-time { color: var(--accent-text); }
.conv-item.active .badge { background: rgba(255, 255, 255, .25); color: var(--accent-text); }
.conv-main { flex: 1; min-width: 0; }
.conv-name { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.conv-last { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.conv-time { font-size: 10.5px; color: var(--muted); }
.badge { background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.tag { font-size: 10.5px; font-weight: 700; border-radius: 6px; padding: 2px 7px; background: var(--panel2); color: var(--accent); border: 1px solid var(--border); }
.tag.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); border-color: transparent; }
.tag.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); border-color: transparent; }
.tag.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); border-color: transparent; }
.sidebar-foot { padding: 10px 14px 16px; }

/* ---------- chat ---------- */
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--panel); border-bottom: 1px solid var(--border); position: relative; z-index: 20; }
.title { flex: 1; min-width: 0; }
.title b { font-size: 15px; }
.title .sub { font-size: 11.5px; color: var(--muted); }
.messages { flex: 1; overflow-y: auto; padding: 18px 16px 8px; }
.msg-day { text-align: center; font-size: 11px; color: var(--muted); margin: 10px 0 16px; }
.msg-row { display: flex; margin-bottom: 12px; }
.msg-row.out { justify-content: flex-end; }
.msg-row.in { justify-content: flex-start; }
.msg-bubble {
  max-width: 72%; padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.55;
  word-break: break-word; position: relative;
}
.msg-row.out .msg-bubble { background: var(--accent-grad); color: var(--accent-text); border-bottom-right-radius: 6px; box-shadow: var(--shadow-sm); }
.msg-row.in .msg-bubble { background: var(--bubble-in); color: var(--bubble-in-text); border-bottom-left-radius: 6px; }
.msg-row.expired .msg-bubble { background: var(--panel2); color: var(--muted); }
.msg-author { display: block; font-size: 11px; color: var(--accent); font-weight: 700; margin-bottom: 3px; }
.msg-meta { display: block; font-size: 10px; opacity: .55; margin-top: 4px; }
.msg-row.out .msg-meta { text-align: right; }
.media-thumb { margin: 2px 0; border-radius: 12px; overflow: hidden; max-width: 260px; }
.media-thumb img { width: 100%; display: block; cursor: pointer; border-radius: 12px; }
.media-thumb video, .media-thumb audio { width: 100%; display: block; border-radius: 12px; }
.file-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: rgba(0, 0, 0, .05); min-width: 180px; }
[data-mode="dark"] .file-card { background: rgba(255, 255, 255, .08); }
.ficon { font-size: 22px; color: var(--accent); width: 30px; text-align: center; }
.fname { font-size: 12.5px; font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsize { font-size: 10.5px; opacity: .6; }
.file-card a { display: none; }

.scroll-dn {
  position: absolute; bottom: 80px; right: 24px; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: var(--panel); color: var(--accent); box-shadow: var(--shadow);
  display: none; align-items: center; justify-content: center; z-index: 15;
}
.scroll-dn.show { display: flex; }
.chat { position: relative; }
.input-bar { display: flex; align-items: flex-end; gap: 6px; padding: 10px 14px 14px; background: var(--panel); border-top: 1px solid var(--border); position: relative; }
.input-actions { display: flex; gap: 2px; }
.input-bar textarea {
  flex: 1; border: 1.5px solid var(--border); background: var(--input-bg); color: var(--text);
  border-radius: 18px; padding: 9px 14px; resize: none; max-height: 140px; outline: none; line-height: 1.5;
}
.input-bar textarea:focus { border-color: var(--accent); }
.send-btn { background: var(--accent-grad); color: var(--accent-text) !important; border-radius: 50%; width: 36px; height: 36px; }
.send-btn:hover { opacity: .9; background: var(--accent-grad); }

.emoji-picker {
  position: absolute; bottom: 100%; left: 14px; width: 300px; max-height: 220px; overflow: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); display: none; grid-template-columns: repeat(8, 1fr); padding: 8px; z-index: 25;
}
.emoji-picker.open { display: grid; }
.emoji-picker button { border: 0; background: transparent; font-size: 19px; padding: 6px; border-radius: 8px; }
.emoji-picker button:hover { background: var(--panel2); }

.dropdown {
  position: absolute; top: 100%; right: 10px; margin-top: 4px; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  display: none; min-width: 170px; padding: 5px; z-index: 40;
}
.dropdown.open { display: block; }
.dropdown button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: var(--text); padding: 9px 12px; border-radius: 8px; font-size: 13.5px; text-align: left; }
.dropdown button:hover { background: var(--panel2); }
.dropdown button.danger { color: var(--danger); }
.dropdown button i { width: 16px; text-align: center; color: var(--accent); }
.dropdown button.danger i { color: var(--danger); }

/* ---------- panel ---------- */
.panel-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.panel-body { flex: 1; overflow-y: auto; padding: 20px 16px; text-align: center; }
.big-avatar { width: 76px; height: 76px; border-radius: 24px; margin: 0 auto 12px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; box-shadow: var(--shadow-sm); }
.panel-body h3 { margin: 0 0 4px; font-size: 17px; }
.bio { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.m-section { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); margin: 16px 0 8px; }
.stat-row { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 0; border-bottom: 1px dashed var(--border); text-align: left; }
.member { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-radius: var(--radius-sm); text-align: left; }
.member:hover { background: var(--panel2); }
.role-tag { font-size: 10px; color: var(--accent); font-weight: 700; border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }

/* ---------- buttons / controls ---------- */
.btn {
  border: 1.5px solid var(--border); background: var(--panel); color: var(--text);
  border-radius: var(--radius-sm); padding: 8px 14px; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; transition: .2s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent-grad); border: 0; color: var(--accent-text); box-shadow: var(--shadow-sm); }
.btn.primary:hover { opacity: .92; color: var(--accent-text); }
.btn.danger { background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: transparent; color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: transparent; color: var(--ok); }
.btn.ok:hover { background: var(--ok); color: #fff; }
.btn.ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn.ghost:hover { color: var(--accent); border-color: var(--accent); }
.btn.small { padding: 5px 10px; font-size: 12px; }
.switch {
  width: 46px; height: 26px; border-radius: 99px; border: 0; background: var(--border); position: relative; transition: .25s;
}
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .25s; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.switch.on { background: var(--accent); }
.switch.on::after { left: 23px; }
.seg { display: flex; gap: 4px; background: var(--panel2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 8px; transition: .2s; }
.seg button.on { background: var(--panel); color: var(--accent); box-shadow: var(--shadow-sm); }

/* ---------- modal / lightbox / toast ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20, 15, 30, .45); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
  width: 420px; max-width: 100%; max-height: 86vh; overflow-y: auto; padding: 24px; position: relative;
  box-shadow: var(--shadow);
}
.modal h2 { margin: 0 0 16px; font-size: 17px; display: flex; align-items: center; gap: 9px; }
.modal h2 i { color: var(--accent); }
.modal-close { position: absolute; top: 12px; right: 12px; }
.lightbox {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .85); z-index: 120;
  display: none; align-items: center; justify-content: center; padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 100%; border-radius: 12px; }
.lb-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 16px; }
.toast-wrap { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--panel); color: var(--text); border: 1px solid var(--border);
  border-radius: 99px; padding: 9px 18px; font-size: 13px; box-shadow: var(--shadow);
  max-width: 90vw;
}
.toast.ok { border-color: var(--ok); color: var(--ok); }
.toast.error { border-color: var(--danger); color: var(--danger); }

/* ---------- settings ---------- */
.settings-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.si-label { font-size: 13.5px; font-weight: 600; }
.si-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.secret { font-size: 11px; word-break: break-all; background: var(--panel2); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }

/* ---------- admin ---------- */
.admin-tabs { display: flex; gap: 6px; background: var(--panel2); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.atab { flex: 1; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; padding: 8px 4px; border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.atab.active { background: var(--panel); color: var(--accent); box-shadow: var(--shadow-sm); }
.admin-sub { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 8px; text-align: left; }
.admin-user { display: flex; align-items: center; gap: 8px; padding: 9px 4px; border-bottom: 1px dashed var(--border); text-align: left; }
.admin-user:last-child { border-bottom: 0; }
.admin-report { display: flex; align-items: center; gap: 8px; padding: 10px 4px; border-bottom: 1px dashed var(--border); text-align: left; }
.admin-search { display: flex; gap: 6px; margin-bottom: 10px; }
.admin-search input { flex: 1; border: 1.5px solid var(--border); background: var(--input-bg); border-radius: var(--radius-sm); padding: 8px 10px; color: var(--text); outline: none; }
.admin-search select { border: 1.5px solid var(--border); background: var(--input-bg); color: var(--text); border-radius: var(--radius-sm); padding: 8px; outline: none; }
.evidence-img { max-width: 100%; max-height: 220px; border-radius: 10px; margin: 4px 0; cursor: pointer; display: block; }
.progress { height: 8px; border-radius: 99px; background: var(--panel2); overflow: hidden; }
.progress > div { height: 100%; background: var(--accent-grad); border-radius: 99px; transition: width .4s; }
.media-quota { margin-bottom: 12px; }

/* ---------- spinner ---------- */
.spinner {
  width: 26px; height: 26px; margin: 24px auto; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 100vw; min-width: 100vw; max-width: 100vw; z-index: 60; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .panel { position: fixed; right: 0; top: 0; bottom: 0; z-index: 60; transform: translateX(100%); transition: transform .25s; box-shadow: var(--shadow); }
  .panel.open { transform: translateX(0); display: flex; }
  .msg-bubble { max-width: 86%; }
  .emoji-picker { width: 260px; }
  .back-btn { display: inline-flex !important; }
}
@media (min-width: 861px) {
  .back-btn { display: none !important; }
}