:root {
  --green: #07c160;
  --green-dark: #059a4c;
  --green-soft: #e9f8ef;
  --ink: #17211c;
  --muted: #718079;
  --line: #e5ebe7;
  --panel: #ffffff;
  --bg: #f3f6f4;
  --sidebar: #f7f9f8;
  --danger: #d93a3a;
  --warning: #c87b0a;
  --blue: #4777d9;
  --shadow: 0 18px 48px rgba(20, 53, 36, 0.10);
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
body { min-width: 900px; background: var(--bg); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; }
img, video { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }

.brand { display: flex; align-items: center; gap: 11px; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--green); color: #fff; box-shadow: 0 7px 18px rgba(7, 193, 96, .22); }
.brand-mark svg { width: 24px; height: 24px; }
.brand-copy small { display: block; font-size: 11px; font-weight: 500; letter-spacing: .08em; opacity: .62; margin-top: 2px; }

.btn { border: 1px solid transparent; border-radius: 10px; padding: 9px 14px; background: #fff; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; font-weight: 650; transition: .16s ease; text-decoration: none; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(16, 38, 25, .08); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn.primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.danger { background: #fff; border-color: #f0cdcd; color: var(--danger); }
.btn.light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.18); }
.btn.sm { padding: 6px 10px; border-radius: 8px; font-size: 12px; }
.btn.icon { width: 38px; height: 38px; padding: 0; border-radius: 10px; }
.btn svg { width: 16px; height: 16px; }

.input, .select, .textarea {
  width: 100%; border: 1px solid #dce5df; background: #fff; color: var(--ink);
  border-radius: 10px; padding: 10px 12px; outline: none; transition: border .16s, box-shadow .16s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(7,193,96,.11); }
.textarea { resize: none; }
.field { display: grid; gap: 7px; }
.field > label { font-size: 12px; font-weight: 700; color: #405048; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.6; }
.form-stack { display: grid; gap: 18px; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 1.1fr) minmax(430px, .9fr); background: #f4f7f5; }
.login-art { position: relative; overflow: hidden; background: #0b2218; color: white; padding: 54px 64px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #0d8f4c, transparent 66%); right: -150px; top: -150px; opacity: .7; }
.login-art::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(to bottom, black, transparent); }
.login-art > * { position: relative; z-index: 1; }
.login-art .brand-mark { background: rgba(255,255,255,.13); box-shadow: none; }
.login-copy { max-width: 600px; padding-bottom: 10vh; }
.login-copy h1 { font-size: clamp(38px, 4.2vw, 64px); line-height: 1.12; letter-spacing: -.045em; margin: 0 0 22px; }
.login-copy p { color: rgba(255,255,255,.68); font-size: 16px; line-height: 1.8; max-width: 500px; margin: 0; }
.login-features { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.login-features span { font-size: 12px; color: rgba(255,255,255,.74); padding: 8px 12px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; background: rgba(255,255,255,.04); }
.login-form-wrap { display: grid; place-items: center; padding: 48px; }
.login-card { width: min(100%, 410px); }
.login-card h2 { font-size: 27px; letter-spacing: -.03em; margin: 0 0 8px; }
.login-card > p { color: var(--muted); margin: 0 0 30px; font-size: 14px; }
.login-card .btn { width: 100%; padding: 12px; margin-top: 4px; }
.login-foot { margin-top: 26px; font-size: 11px; color: #93a19a; text-align: center; line-height: 1.7; }
.login-error { min-height: 20px; color: var(--danger); font-size: 12px; }

.admin-page { min-height: 100vh; background: var(--bg); }
.admin-top { height: 68px; background: #0b2218; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; }
.admin-top .brand-mark { width: 34px; height: 34px; background: rgba(255,255,255,.12); box-shadow: none; }
.admin-top .user-area { display: flex; align-items: center; gap: 14px; color: rgba(255,255,255,.72); font-size: 12px; }
.admin-main { max-width: 1440px; margin: 0 auto; padding: 34px 32px 70px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { margin: 0 0 7px; font-size: 30px; letter-spacing: -.04em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; }
.stat-card span { font-size: 12px; color: var(--muted); }
.stat-card strong { display: block; margin-top: 6px; font-size: 25px; letter-spacing: -.03em; }
.stat-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--green-soft); color: var(--green-dark); }
.stat-icon svg { width: 19px; height: 19px; }
.toolbar-card { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 15px 18px; display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.search-box { position: relative; flex: 1; max-width: 390px; }
.search-box svg { position: absolute; width: 16px; height: 16px; left: 12px; top: 50%; transform: translateY(-50%); color: #8d9a93; }
.search-box input { padding-left: 36px; }
.toolbar-spacer { flex: 1; }
.accounts-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-size: 11px; color: #87948d; letter-spacing: .04em; font-weight: 700; background: #fafcfb; padding: 11px 18px; border-bottom: 1px solid var(--line); }
td { padding: 14px 18px; border-bottom: 1px solid #edf1ee; vertical-align: middle; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdfc; }
.account-name { font-weight: 700; }
.account-note { color: var(--muted); font-size: 11px; margin-top: 3px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 5px 9px; border-radius: 999px; background: #f1f4f2; color: #67746d; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.online { color: #078d49; background: #e9f8ef; }
.status.waiting_scan, .status.connecting { color: #a36409; background: #fff5df; }
.status.error { color: var(--danger); background: #fff0f0; }
.link-cell { min-width: 170px; }
.link-label { font-weight: 600; }
.link-expiry { color: var(--muted); font-size: 11px; margin-top: 3px; }
.actions { display: flex; justify-content: flex-end; gap: 7px; }
.empty-row { text-align: center; color: var(--muted); padding: 64px 20px; }
.empty-row strong { display: block; color: var(--ink); margin-bottom: 5px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(7, 20, 13, .54); backdrop-filter: blur(5px); display: grid; place-items: center; padding: 24px; animation: fade .14s ease; }
.modal { width: min(100%, 520px); max-height: 90vh; overflow: auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow); animation: pop .18s ease; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 0; }
.modal-head h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.modal-body { padding: 22px; }
.modal-foot { padding: 0 22px 22px; display: flex; justify-content: flex-end; gap: 9px; }
.close-btn { border: 0; background: #f3f6f4; width: 31px; height: 31px; border-radius: 9px; color: #66736c; display: grid; place-items: center; }
.link-result { background: #f6faf7; border: 1px solid #dcefe2; border-radius: 12px; padding: 13px; display: flex; gap: 9px; align-items: center; }
.link-result code { flex: 1; overflow: hidden; text-overflow: ellipsis; font-size: 11px; line-height: 1.5; }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #506058; }
.check-row input { accent-color: var(--green); width: 16px; height: 16px; }

.toast-root { position: fixed; z-index: 200; right: 22px; bottom: 22px; display: grid; gap: 9px; }
.toast { min-width: 240px; max-width: 420px; background: #12251b; color: #fff; padding: 12px 15px; border-radius: 11px; box-shadow: 0 12px 35px rgba(0,0,0,.2); font-size: 12px; animation: toastIn .18s ease; line-height: 1.5; }
.toast.error { background: #a52b2b; }
.toast.success { background: #087a43; }

.portal-page { height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: #eef2ef; }
.portal-top { height: 58px; flex: 0 0 58px; background: #0b2218; color: #fff; display: flex; align-items: center; padding: 0 18px; gap: 18px; }
.portal-top .brand-mark { width: 30px; height: 30px; border-radius: 9px; box-shadow: none; }
.portal-account { display: flex; align-items: center; gap: 9px; padding-left: 18px; border-left: 1px solid rgba(255,255,255,.14); min-width: 0; }
.portal-account strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal-account span { font-size: 10px; color: rgba(255,255,255,.55); }
.portal-top-spacer { flex: 1; }
.portal-meta { display: flex; align-items: center; gap: 10px; font-size: 11px; color: rgba(255,255,255,.56); }
.conn-dot { width: 7px; height: 7px; border-radius: 50%; background: #7e8d85; }
.conn-dot.online { background: #39dd8c; box-shadow: 0 0 0 4px rgba(57,221,140,.13); }
.conn-dot.waiting_scan, .conn-dot.connecting { background: #ffb84d; }
.conn-dot.error { background: #ff6b6b; }

.portal-state { flex: 1; display: grid; place-items: center; padding: 30px; overflow: auto; }
.state-card { width: min(100%, 760px); background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 34px; text-align: center; }
.state-card.error-card { border-color: #f0cccc; }
.state-illustration { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; margin: 0 auto 18px; background: var(--green-soft); color: var(--green-dark); }
.state-illustration svg { width: 34px; height: 34px; }
.state-card h1 { margin: 0 0 9px; font-size: 25px; letter-spacing: -.03em; }
.state-card > p { margin: 0 auto 23px; max-width: 570px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.qr-frame { width: 268px; height: 268px; margin: 20px auto; border: 1px solid var(--line); border-radius: 17px; padding: 14px; display: grid; place-items: center; background: #fff; box-shadow: 0 9px 26px rgba(20,45,30,.07); }
.qr-frame img { width: 100%; height: 100%; object-fit: contain; border-radius: 7px; }
.qr-placeholder { width: 100%; height: 100%; display: grid; place-items: center; border: 1px dashed #cfdad3; border-radius: 9px; color: #91a098; font-size: 12px; background: #fafcfb; }
.qr-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; }
.instructions { max-width: 520px; margin: 22px auto 0; border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 9px; text-align: left; }
.instruction { display: flex; align-items: flex-start; gap: 10px; color: #526159; font-size: 12px; line-height: 1.55; }
.instruction b { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #eff4f1; font-size: 10px; }
.dev-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; padding: 4px 8px; border-radius: 999px; background: #fff4dc; color: #94610d; margin-left: 7px; }
.busy-icon { color: #c87b0a; background: #fff4df; }

.chat-shell { flex: 1; min-height: 0; display: grid; grid-template-columns: 310px minmax(0, 1fr); background: #fff; margin: 12px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 10px 32px rgba(23,53,35,.06); }
.conversation-panel { min-width: 0; background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.panel-search { padding: 12px; border-bottom: 1px solid var(--line); }
.panel-search .search-box { max-width: none; }
.panel-search input { background: #fff; padding-top: 8px; padding-bottom: 8px; }
.conversation-list { flex: 1; overflow-y: auto; padding: 5px 7px 10px; }
.conversation-item { border: 0; width: 100%; text-align: left; background: transparent; display: flex; gap: 10px; align-items: center; padding: 11px 10px; border-radius: 11px; margin: 2px 0; color: var(--ink); }
.conversation-item:hover { background: #edf3ef; }
.conversation-item.active { background: #dff4e8; }
.avatar { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, #dfeee6, #c7e3d4); color: #366a4e; font-weight: 750; font-size: 14px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.conv-body { min-width: 0; flex: 1; }
.conv-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.conv-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time { flex: 0 0 auto; font-size: 9px; color: #99a49f; }
.conv-preview { font-size: 11px; color: #839088; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread { min-width: 17px; height: 17px; border-radius: 9px; background: #fa5151; color: #fff; font-size: 9px; display: grid; place-items: center; padding: 0 5px; }
.conversation-empty { padding: 50px 20px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.6; }

.chat-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #f5f6f5; }
.chat-head { height: 57px; flex: 0 0 57px; padding: 0 20px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: space-between; }
.chat-head strong { font-size: 14px; }
.chat-head span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.chat-head .head-tools { display: flex; gap: 7px; color: #87948d; }
.chat-empty { flex: 1; display: grid; place-items: center; text-align: center; padding: 30px; color: var(--muted); }
.chat-empty-icon { width: 64px; height: 64px; border-radius: 20px; background: #e9eeeb; display: grid; place-items: center; margin: 0 auto 14px; color: #819088; }
.chat-empty-icon svg { width: 28px; height: 28px; }
.chat-empty strong { color: #4e5d55; display: block; margin-bottom: 5px; }
.messages { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px 26px; background: #f5f6f5; }
.day-divider { text-align: center; margin: 10px 0 18px; }
.day-divider span { font-size: 10px; color: #97a29c; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.7); }
.message-row { display: flex; gap: 9px; align-items: flex-start; margin: 0 0 16px; }
.message-row.outbound { flex-direction: row-reverse; }
.message-avatar { flex: 0 0 31px; width: 31px; height: 31px; border-radius: 9px; display: grid; place-items: center; background: #d9e8df; font-size: 10px; color: #4d725f; font-weight: 700; }
.message-row.outbound .message-avatar { background: #d7f0e1; color: #087c43; }
.message-content { max-width: min(68%, 540px); display: grid; gap: 4px; }
.message-row.outbound .message-content { justify-items: end; }
.bubble { padding: 9px 12px; border-radius: 4px 12px 12px 12px; background: #fff; color: #27332c; font-size: 13px; line-height: 1.62; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 2px rgba(23,51,34,.04); }
.message-row.outbound .bubble { background: #95ec69; border-radius: 12px 4px 12px 12px; }
.bubble.media { padding: 4px; background: #fff; overflow: hidden; }
.message-row.outbound .bubble.media { background: #d8f8c8; }
.bubble img { display: block; border-radius: 9px; max-height: 330px; width: auto; min-width: 130px; object-fit: contain; }
.bubble video { display: block; border-radius: 9px; max-height: 360px; width: min(380px, 45vw); background: #000; }
.bubble audio { display: block; width: min(310px, 45vw); height: 38px; }
.media-fallback { font-size: 11px; color: var(--muted); padding: 8px; }
.message-time { font-size: 9px; color: #9ba6a0; padding: 0 2px; }
.message-status { color: #078d49; }
.composer { flex: 0 0 auto; background: #fff; border-top: 1px solid var(--line); padding: 9px 12px 11px; }
.composer-tools { display: flex; align-items: center; gap: 4px; }
.tool-btn { width: 32px; height: 32px; border: 0; background: transparent; border-radius: 8px; color: #56635c; display: grid; place-items: center; }
.tool-btn:hover, .tool-btn.active { background: #edf4f0; color: var(--green-dark); }
.tool-btn svg { width: 20px; height: 20px; }
.composer-input { display: flex; align-items: flex-end; gap: 10px; margin-top: 3px; }
.composer textarea { flex: 1; border: 0; outline: 0; padding: 8px 5px; min-height: 40px; max-height: 130px; resize: none; background: transparent; font-size: 13px; line-height: 1.55; }
.send-btn { border: 0; background: var(--green); color: #fff; border-radius: 8px; padding: 8px 15px; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.send-btn:hover { background: var(--green-dark); }
.emoji-picker { position: absolute; z-index: 20; width: 340px; max-height: 300px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 12px; bottom: 104px; left: 18px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.emoji-grid button { border: 0; background: transparent; border-radius: 7px; font-size: 22px; height: 35px; line-height: 1; }
.emoji-grid button:hover { background: #f0f5f2; }
.composer { position: relative; }
.recording-bar { display: none; align-items: center; gap: 12px; padding: 8px 10px; margin-top: 5px; background: #fff5f5; border: 1px solid #f1d2d2; border-radius: 9px; color: #9c3737; font-size: 12px; }
.recording-bar.show { display: flex; }
.recording-dot { width: 8px; height: 8px; border-radius: 50%; background: #e34b4b; animation: pulse 1s infinite; }
.recording-bar .spacer { flex: 1; }
.uploading { font-size: 11px; color: var(--muted); padding: 6px 2px 0; }

.portal-footer-note { flex: 0 0 24px; text-align: center; font-size: 9px; color: #98a29d; background: #eef2ef; }
.loading-screen { min-height: 100vh; display: grid; place-items: center; background: #f4f7f5; color: var(--muted); font-size: 13px; }
.loader { width: 25px; height: 25px; border: 3px solid #dce8e1; border-top-color: var(--green); border-radius: 50%; animation: spin .75s linear infinite; margin: 0 auto 12px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1080px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .login-art { padding: 44px; }
  .login-form-wrap { padding: 34px; }
  .chat-shell { grid-template-columns: 270px minmax(0, 1fr); }
}

.account-footer { flex: 0 0 auto; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; display: flex; align-items: center; gap: 10px; }
.account-identity { min-width: 0; flex: 1; display: flex; align-items: center; gap: 9px; }
.account-identity-mark { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: var(--green-soft); color: var(--green-dark); display: grid; place-items: center; }
.account-identity-mark svg { width: 21px; height: 21px; }
.account-identity-copy { min-width: 0; }
.account-identity-copy strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-identity-copy span { display: block; font-size: 9px; color: var(--muted); margin-top: 2px; }
.settings-btn { flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #64716a; display: grid; place-items: center; }
.settings-btn:hover { color: var(--green-dark); border-color: #c8e6d4; background: #f4faf6; }
.settings-btn svg { width: 18px; height: 18px; }

.remote-overlay { position: fixed; inset: 0; z-index: 180; background: #0a1811; display: flex; flex-direction: column; }
.remote-toolbar { flex: 0 0 54px; background: #0b2218; color: #fff; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid rgba(255,255,255,.09); }
.remote-toolbar strong { font-size: 13px; }
.remote-url { flex: 1; min-width: 0; color: rgba(255,255,255,.5); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-toolbar .btn { color: #fff; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.08); }
.remote-body { flex: 1; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.remote-screen-wrap { overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 14px; background: #1a241f; }
.remote-screen { display: block; max-width: 100%; height: auto; cursor: default; background: #fff; box-shadow: 0 18px 50px rgba(0,0,0,.28); user-select: none; }
.remote-inputbar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; background: #fff; border-top: 1px solid var(--line); padding: 9px 14px; }
.remote-inputbar input { flex: 1; }
.remote-status { font-size: 10px; color: rgba(255,255,255,.55); white-space: nowrap; }
.remote-tip { position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); background: rgba(0,0,0,.7); color: #fff; border-radius: 9px; padding: 7px 11px; font-size: 11px; pointer-events: none; }

.remote-keyboard-capture { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; resize: none; pointer-events: none; }
.remote-screen-wrap:focus { outline: none; }

.message-status.sent { color: #078d49; }
.message-status.pending { color: #a36409; }
.message-status.failed { color: var(--danger); }

.remote-file-prompt { position: fixed; inset: 0; z-index: 240; display: grid; place-items: center; background: rgba(5, 16, 10, .52); backdrop-filter: blur(3px); }
.remote-file-card { width: min(420px, calc(100vw - 40px)); background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 22px; }
.remote-file-card strong { display: block; font-size: 16px; margin-bottom: 8px; }
.remote-file-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.remote-file-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.message-avatar { overflow: hidden; }
.message-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.message-row.outbound .message-avatar svg { width: 18px; height: 18px; }

.wechat-emoji { width: 22px; height: 22px; vertical-align: middle; object-fit: contain; margin: 0 1px; }
