:root {
  --bg: #ffffff;
  --bg-2: #f4f4f5;
  --chat-bg: #c8d8b9;
  --chat-pattern: rgba(255,255,255,.18);
  --text: #0f0f0f;
  --muted: #707579;
  --border: #e5e7eb;
  --accent: #3390ec;
  --accent-2: #2a7fd4;
  --in: #ffffff;
  --out: #e3fee0;
  --out-meta: #4fae4e;
  --quote-bg: rgba(51,144,236,.1);
  --hover: #f1f1f1;
  --danger: #e53935;
  --shadow: 0 1px 2px rgba(16,35,47,.15);
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #212121; --bg-2: #181818; --chat-bg: #0f1a24; --chat-pattern: rgba(255,255,255,.025);
    --text: #f5f5f5; --muted: #aaaaaa; --border: #2f2f2f;
    --accent: #8774e1; --accent-2: #7462d0; --in: #212121; --out: #766ac8; --out-meta: #e6e1ff;
    --quote-bg: rgba(255,255,255,.1); --hover: #2c2c2c; --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg-2); color: var(--text); font-size: 15px; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--text); }
svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; justify-content: center; }
.err { color: var(--danger); font-size: 13px; min-height: 1em; margin: 4px 0; }

/* buttons & forms */
a.btn { color: var(--text); display: inline-block; text-decoration: none; }
.btn { border: 1px solid var(--border); background: var(--bg); border-radius: 10px; padding: 10px 16px; font-weight: 600; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input:not([type=checkbox]):not([type=file]), select, textarea {
  border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; background: var(--bg); outline: none; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.icon-btn { background: none; border: 0; padding: 8px; border-radius: 50%; color: var(--muted); display: grid; place-items: center; position: relative; }
.icon-btn:hover { background: var(--hover); }
.icon-btn.danger { color: var(--danger); }

/* auth */
.auth { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 380px; background: var(--bg); border-radius: 18px; padding: 28px 24px; box-shadow: 0 8px 30px rgba(0,0,0,.08); text-align: center; }
.auth-card .form { text-align: start; margin-top: 16px; }
.logo { width: 84px; height: 84px; margin: 0 auto 10px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-size: 40px; }
.auth-card h1 { margin: 0 0 16px; font-size: 24px; }
.tabs { display: flex; background: var(--bg-2); border-radius: 10px; padding: 4px; gap: 4px; }
.tab { flex: 1; border: 0; background: none; padding: 9px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.tab.active { background: var(--bg); color: var(--accent); box-shadow: var(--shadow); }

/* layout */
.app { display: flex; height: 100vh; height: 100dvh; height: var(--app-h, 100dvh); overflow: hidden; position: relative; }
.imp-banner { position: absolute; top: 0; inset-inline: 0; z-index: 20; background: #f59e0b; color: #000; text-align: center; font-size: 13px; padding: 4px; font-weight: 600; }
.imp-banner:not([hidden]) ~ .sidebar, .imp-banner:not([hidden]) ~ .chat { padding-top: 26px; }
.sidebar { width: 380px; max-width: 100%; background: var(--bg); border-inline-end: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; }
.me, .peer { display: flex; gap: 10px; align-items: center; border: 0; background: none; padding: 4px; border-radius: 12px; text-align: start; min-width: 0; }
.me:hover, .peer:hover { background: var(--hover); }
.me-name { font-weight: 700; }
.search { margin: 0 12px 8px; position: relative; }
.search svg { position: absolute; inset-inline-start: 12px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; color: var(--muted); pointer-events: none; z-index: 1; }
.search input { border-radius: 22px; padding-inline-start: 44px; background: var(--bg-2); border-color: transparent; text-indent: 0; }
.search input::placeholder { opacity: .9; }
.list { overflow-y: auto; flex: 1; padding: 0 6px 8px; }
.list-label { padding: 8px 12px 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.item:hover { background: var(--hover); }
.item.active { background: var(--accent); color: #fff; }
.item.active .preview, .item.active .time { color: rgba(255,255,255,.85); }
.item .body { flex: 1; min-width: 0; }
.item .top, .item .bottom-row { display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.item .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 14px; }
.item .time { font-size: 12px; color: var(--muted); flex: none; }
.badge { background: var(--accent); color: #fff; border-radius: 12px; min-width: 22px; height: 22px; padding: 0 7px; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.item.active .badge { background: #fff; color: var(--accent); }
.empty-note { text-align: center; color: var(--muted); padding: 30px 16px; font-size: 14px; }
.archived-toggle { width: 100%; text-align: start; border: 0; background: none; color: var(--muted); font-weight: 600; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.archived-toggle:hover { background: var(--hover); }
.result-snippet { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-snippet mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 3px; }

.avatar { width: 48px; height: 48px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 19px; flex: none; position: relative; background-size: cover; background-position: center; }
.side-head .avatar, .chat-head .avatar { width: 42px; height: 42px; font-size: 17px; }
.avatar.xl { width: 120px; height: 120px; font-size: 48px; cursor: zoom-in; }
.avatar.online::after { content: ''; position: absolute; bottom: 1px; inset-inline-end: 1px; width: 12px; height: 12px; border-radius: 50%; background: #4fce5d; border: 2px solid var(--bg); }

.menu-wrap { position: relative; }
.menu { position: absolute; top: 100%; inset-inline-end: 0; background: var(--bg); border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.18); min-width: 210px; padding: 6px; z-index: 30; }
.menu button, .menu a { display: block; width: 100%; text-align: start; border: 0; background: none; padding: 10px 12px; border-radius: 8px; color: inherit; text-decoration: none; font-size: 15px; }
.menu button:hover, .menu a:hover { background: var(--hover); }
.menu .danger { color: var(--danger); }

/* chat */
.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--chat-bg);
  background-image: radial-gradient(var(--chat-pattern) 1.5px, transparent 1.5px); background-size: 22px 22px; }
.chat-empty { flex: 1; display: grid; place-items: center; padding: 16px; }
.pill { background: rgba(0,0,0,.25); color: #fff; border-radius: 14px; padding: 6px 14px; font-size: 14px; text-align: center; }
.chat-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--border); }
.peer { flex: 1; }
.chat-title { min-width: 0; }
.chat-title .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head .status.on { color: var(--accent); }
.back { display: none; }
.timer-badge { position: absolute; bottom: 0; inset-inline-end: -2px; background: var(--accent); color: #fff; font-size: 10px; border-radius: 8px; padding: 0 4px; line-height: 15px; font-weight: 700; }

.messages { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px max(12px, calc((100% - 760px) / 2)); display: flex; flex-direction: column; gap: 3px; touch-action: pan-y; }
.day { align-self: center; margin: 10px 0 6px; position: sticky; top: 4px; z-index: 2; }
.day span, .sys span { background: rgba(0,0,0,.25); color: #fff; padding: 4px 11px; border-radius: 14px; font-size: 13px; font-weight: 500; display: inline-block; }
.sys { align-self: center; margin: 6px 0; text-align: center; max-width: 90%; }
.msg { display: flex; max-width: min(78%, 520px); position: relative; transition: transform .2s; }
.msg.swiping { transition: none; user-select: none; }
.msg.out { align-self: flex-end; }
.msg.in { align-self: flex-start; }
.swipe-icon { position: absolute; top: 50%; right: -42px; translate: 0 -50%; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,.25); color: #fff; display: grid; place-items: center; opacity: 0; transform: scale(.6); transition: .15s; }
.swipe-icon svg { width: 18px; height: 18px; }
.msg.swiping .swipe-icon { opacity: .6; }
.msg.swipe-ready .swipe-icon { opacity: 1; transform: scale(1); }
.bubble { background: var(--in); border-radius: var(--radius); padding: 6px 9px; box-shadow: var(--shadow); min-width: 80px; overflow: hidden; }
.msg.out .bubble { background: var(--out); border-end-end-radius: 4px; }
.msg.in .bubble { border-end-start-radius: 4px; }
.msg.flash .bubble { animation: flash 1.2s; }
@keyframes flash { 30% { box-shadow: 0 0 0 3px var(--accent); } }
.bubble .text { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; line-height: 1.4; }
.bubble.media { padding: 3px; }
.bubble.media .text, .bubble.media .quote { margin: 4px 6px 0; }
.bubble img, .bubble video { display: block; max-width: 100%; max-height: 420px; border-radius: 11px; cursor: pointer; background: #000; }
.bubble video { cursor: default; width: 360px; }
.bubble audio { display: block; width: 260px; max-width: 100%; height: 40px; }
.quote { display: flex; flex-direction: column; border-inline-start: 3px solid var(--accent); background: var(--quote-bg); border-radius: 6px; padding: 3px 8px; margin-bottom: 4px; cursor: pointer; font-size: 13.5px; min-width: 0; }
.msg.out .quote { border-color: var(--out-meta); }
.quote b { color: var(--accent); font-size: 13px; }
.msg.out .quote b { color: var(--out-meta); }
.quote span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.quote.deleted span { font-style: italic; color: var(--muted); }
.fwd { display: flex; gap: 5px; align-items: center; color: var(--accent); font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.fwd svg { width: 14px; height: 14px; }
.msg.out .fwd { color: var(--out-meta); }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.reaction { border: 0; background: rgba(0,0,0,.08); border-radius: 12px; padding: 2px 8px; font-size: 13px; line-height: 1.5; cursor: pointer; }
.reaction.mine { background: var(--accent); color: #fff; }
.reaction-picker { position: fixed; z-index: 150; display: flex; gap: 2px; background: var(--bg); border-radius: 22px; padding: 6px 8px; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.reaction-picker button { border: 0; background: none; font-size: 22px; cursor: pointer; padding: 2px 4px; border-radius: 50%; transition: transform .1s; }
.reaction-picker button:hover { transform: scale(1.25); }
.fwd-list { max-height: 50vh; min-height: 120px; }
.composer.editing textarea { box-shadow: 0 0 0 2px var(--accent); }
.vo-box { display: flex; gap: 10px; align-items: center; padding: 6px 4px; min-width: 190px; }
.vo-box .vo-ic { width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.12); display: grid; place-items: center; flex: none; }
.msg.out .vo-box .vo-ic { background: rgba(0,0,0,.14); }
.vo-box.open { cursor: pointer; }
.vo-box.open .vo-ic { background: var(--accent); color: #fff; }
.vo-box .vo-text { font-weight: 600; }
.vo-box.open .vo-text { color: var(--accent); }
.menu.up { top: auto; bottom: 100%; margin-bottom: 8px; min-width: 190px; }
.file-link { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; padding: 4px 2px; }
.file-link .ic { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.file-link .fn { font-weight: 600; word-break: break-all; }
.meta { display: flex; gap: 4px; align-items: center; justify-content: flex-end; font-size: 11.5px; color: var(--muted); margin-top: 2px; user-select: none; }
.bubble.media .meta { padding: 0 6px 3px; }
.msg.out .meta { color: var(--out-meta); }
.meta svg { width: 16px; height: 16px; }
.meta .exp { display: inline-flex; gap: 2px; align-items: center; font-weight: 600; }
.meta .exp svg { width: 12px; height: 12px; }
.ghost-label { font-size: 12px; font-weight: 600; color: #b45309; margin-top: 3px; }
@media (prefers-color-scheme: dark) { .ghost-label { color: #ffd27a; } }
.msg.ghost .bubble { opacity: .72; outline: 1.5px dashed #f59e0b; outline-offset: -1.5px; }
.msg .acts { position: absolute; top: 50%; translate: 0 -50%; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.msg.out .acts { right: 100%; padding-right: 4px; }
.msg.in .acts { left: 100%; padding-left: 4px; }
.msg .acts .icon-btn { padding: 5px; background: rgba(0,0,0,.2); color: #fff; }
.msg .acts svg { width: 16px; height: 16px; }
@media (hover: hover) { .msg:hover .acts { opacity: 1; } }
.msg.show-acts .acts { opacity: 1; }
/* touch: long-press shows the actions as a floating toolbar above the bubble */
@media (hover: none) {
  .msg .acts { top: auto; bottom: 100%; translate: none; inset-inline: auto; margin-bottom: 5px;
    background: var(--bg); border-radius: 22px; box-shadow: 0 4px 16px rgba(0,0,0,.25); padding: 3px; z-index: 5; }
  .msg.out .acts { right: 0; }
  .msg.in .acts { left: 0; }
  .msg .acts .icon-btn { background: none; color: var(--text); padding: 7px; }
  .msg .acts svg { width: 20px; height: 20px; }
}
/* new message slides in */
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg.msg-new { animation: msgIn .18s ease-out; }
.item, .btn, .icon-btn, .send-btn, .reaction, .tab { transition: background-color .15s, color .15s, transform .08s; }
.send-btn:active { transform: scale(.9); }
.icon-btn:active, .btn:active { transform: scale(.94); }
.msg.pending .bubble { opacity: .75; }
.progress { height: 4px; background: var(--border); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.bottom { padding: 0 max(12px, calc((100% - 760px) / 2)) 12px; }
.reply-bar { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 14px 14px 0 0; padding: 6px 6px 6px 14px; margin-top: 6px; color: var(--accent); box-shadow: var(--shadow); }
.reply-bar + .rec-bar, .reply-bar ~ .composer { margin-top: 0; }
.reply-bar:not([hidden]) ~ .composer textarea { border-top-left-radius: 0; border-top-right-radius: 0; }
.rb-body { flex: 1; min-width: 0; display: flex; flex-direction: column; border-inline-start: 2px solid var(--accent); padding-inline-start: 8px; }
.rb-body b { font-size: 13px; }
.rb-body span { color: var(--text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; }
.reply-bar:not([hidden]) + .rec-bar, .reply-bar:not([hidden]) ~ .composer { margin-top: 0; padding-top: 0; }
.composer textarea { flex: 1; resize: none; border-radius: 22px; max-height: 160px; padding: 12px 16px; border: 0; box-shadow: var(--shadow); line-height: 1.35; }
.composer .icon-btn { background: var(--bg); box-shadow: var(--shadow); width: 46px; height: 46px; }
.send-btn { width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; box-shadow: var(--shadow); }
.send-btn:hover { background: var(--accent-2); }
.send-btn .ic-send, .send-btn.has-text .ic-mic { display: none; }
.send-btn.has-text .ic-send { display: block; }
.rec-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; background: var(--bg); border-radius: 26px; padding: 4px 4px 4px 8px; box-shadow: var(--shadow); }
.rec-bar #recTime { font-variant-numeric: tabular-nums; font-weight: 600; }
.rec-bar .send-btn { margin-inline-start: auto; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* dialogs */
.dialog { border: 0; border-radius: 16px; padding: 22px; width: min(440px, calc(100% - 32px)); background: var(--bg); color: var(--text); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.dialog::backdrop { background: rgba(0,0,0,.45); }
.dialog h3 { margin: 0 0 6px; }
.dialog form { display: grid; gap: 12px; }
.dialog .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.dialog .actions.center { justify-content: center; }
.profile-photo { display: flex; justify-content: center; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets button { border: 1px solid var(--border); background: var(--bg-2); border-radius: 16px; padding: 6px 12px; font-size: 13px; }
.presets button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.wall-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wall-grid button { aspect-ratio: 3 / 4; border-radius: 10px; border: 2px solid transparent; background-size: cover; background-position: center; position: relative; padding: 0; }
.wall-grid button.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.wall-grid .none { background: var(--chat-bg); color: #fff; font-size: 12px; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: grid; place-items: center; z-index: 100; cursor: zoom-out; }
.lightbox img { max-width: 95vw; max-height: 95vh; }
.toast { position: fixed; bottom: 24px; left: 50%; translate: -50% 0; background: rgba(20,20,20,.9); color: #fff; padding: 10px 18px; border-radius: 12px; z-index: 200; font-size: 14px; max-width: calc(100% - 32px); }

/* mobile */
@media (max-width: 760px) {
  .sidebar { width: 100%; border: 0; }
  .chat { display: none; }
  .app.show-chat .sidebar { display: none; }
  .app.show-chat .chat { display: flex; }
  .back { display: grid; }
  .msg { max-width: 86%; }
  .bubble video { width: 100%; }
  .bottom { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
}

/* ───── admin panel ───── */
.admin-shell { max-width: 1200px; margin: 0 auto; padding: 16px; }
.admin-top { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.admin-top h1 { font-size: 20px; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-top .menu-wrap { order: -1; }
.admin-top .menu { min-width: 220px; inset-inline-end: auto; inset-inline-start: 0; }
.admin-top .menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; }
.admin-top h1 { flex: 1; }
.admin-tabs { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 12px; overflow-x: auto; box-shadow: var(--shadow); margin-bottom: 16px; }
@media (max-width: 640px) {
  .admin-top .top-actions { display: none !important; }
  .admin-tabs { display: none; }
  .admin-top h1 { font-size: 17px; }
}
.admin-tabs button { border: 0; background: none; padding: 9px 16px; border-radius: 9px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.admin-tabs button.active { background: var(--accent); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--bg); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 26px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.card { background: var(--bg); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.card h2 { font-size: 17px; margin: 0 0 12px; }
.card-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-head input { max-width: 260px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.user-cell { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.user-cell .avatar { width: 32px; height: 32px; font-size: 14px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4fce5d; }
.viewer { width: min(760px, calc(100% - 24px)); height: min(85vh, 900px); padding: 0; flex-direction: column; overflow: hidden; }
.viewer[open] { display: flex; }
.viewer .chat-head { justify-content: space-between; }
.viewer .messages { background: var(--chat-bg); padding: 12px; }
.viewer .sender { font-size: 12.5px; font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.secret-box { display: flex; gap: 8px; align-items: center; background: var(--bg-2); border-radius: 10px; padding: 10px 12px; font-family: ui-monospace, Consolas, monospace; font-size: 17px; justify-content: space-between; word-break: break-all; }
.qr { display: block; margin: 8px 0; border-radius: 8px; background: #fff; padding: 6px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--bg-2); }
.tag.on { background: #dcfce7; color: #166534; }
.tag.off { background: #fee2e2; color: #991b1b; }
.tag.admin { background: #fef3c7; color: #92400e; }
