:root {
  color-scheme: dark;
  --bg: #0b141a;
  --panel: #111b21;
  --panel-2: #202c33;
  --panel-3: #2a3942;
  --line: #26343d;
  --text: #e9edef;
  --muted: #8696a0;
  --accent: #22c982;
  --accent-2: #00a884;
  --danger: #ff5d6c;
  --warning: #f5b942;
  --bubble-me: #005c4b;
  --bubble-other: #202c33;
  --shadow: 0 16px 50px rgba(0,0,0,.32);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--text); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hidden { display: none !important; }
.splash { height: 100vh; display: grid; place-content: center; text-align: center; color: var(--muted); }
.brand-mark { width: 74px; height: 74px; border-radius: 24px; display: grid; place-items: center; margin: auto; font-size: 38px; font-weight: 800; background: linear-gradient(145deg, var(--accent), var(--accent-2)); color: #03231b; box-shadow: 0 12px 36px rgba(34,201,130,.25); }

.auth-page { min-height: 100vh; overflow: auto; display: grid; grid-template-columns: minmax(300px, 1fr) minmax(350px, 520px); background: radial-gradient(circle at 20% 20%, rgba(34,201,130,.16), transparent 30%), var(--bg); }
.auth-hero { padding: clamp(40px, 8vw, 110px); display: flex; flex-direction: column; justify-content: center; }
.auth-hero h1 { font-size: clamp(42px, 7vw, 88px); line-height: .95; margin: 24px 0; letter-spacing: -.06em; }
.auth-hero p { max-width: 620px; color: #b8c4ca; font-size: 18px; line-height: 1.6; }
.auth-card-wrap { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.auth-card { width: min(100%, 460px); background: rgba(17,27,33,.94); border: 1px solid var(--line); border-radius: 28px; padding: 30px; box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 5px; background: #0d171d; border-radius: 14px; margin-bottom: 22px; }
.auth-tabs button { border: 0; background: transparent; padding: 12px; border-radius: 10px; cursor: pointer; color: var(--muted); }
.auth-tabs button.active { background: var(--panel-3); color: var(--text); }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { color: #bdc8ce; font-size: 13px; font-weight: 650; }
.input, .textarea, .select { width: 100%; border: 1px solid var(--line); color: var(--text); background: #0d171d; border-radius: 13px; padding: 13px 14px; transition: border .2s, background .2s; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); background: #101d24; }
.textarea { resize: vertical; min-height: 90px; }
.btn { border: 0; border-radius: 12px; padding: 11px 16px; background: var(--panel-3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; transition: transform .12s, filter .12s, background .12s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: #05271e; }
.btn.danger { background: rgba(255,93,108,.16); color: #ff8994; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.block { width: 100%; }
.btn.small { padding: 7px 10px; font-size: 12px; border-radius: 9px; }
.form-error { min-height: 20px; color: #ff8b96; font-size: 13px; margin: 4px 0 10px; }
.helper { color: var(--muted); font-size: 12px; line-height: 1.5; }

.chat-shell { height: 100vh; display: grid; grid-template-columns: minmax(300px, 390px) 1fr; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.sidebar-header, .chat-header { min-height: 64px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.sidebar-header .profile-trigger { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; background: transparent; border: 0; cursor: pointer; text-align: left; }
.avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: linear-gradient(145deg, #2a3942, #3d515c); display: grid; place-items: center; font-weight: 800; color: #d6e1e6; flex: 0 0 auto; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.large { width: 86px; height: 86px; font-size: 28px; }
.profile-lines, .chat-title { min-width: 0; }
.profile-lines strong, .chat-title strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-lines span, .chat-title span { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; color: #aebbc2; font-size: 19px; }
.icon-btn:hover { background: rgba(255,255,255,.07); }
.search-wrap { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.search-box { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 10px; background: var(--panel-2); }
.search-box input { flex: 1; min-width: 0; padding: 10px 0; border: 0; outline: 0; color: var(--text); background: transparent; }
.conversation-filters { padding: 8px 12px; display: flex; gap: 6px; overflow-x: auto; }
.chip { border: 0; border-radius: 999px; background: var(--panel-2); color: var(--muted); padding: 7px 12px; cursor: pointer; white-space: nowrap; font-size: 12px; }
.chip.active { background: rgba(34,201,130,.17); color: #71e8b1; }
.conversation-list { flex: 1; min-height: 0; overflow-y: auto; }
.conversation-item { width: 100%; border: 0; color: inherit; background: transparent; display: grid; grid-template-columns: 50px 1fr auto; gap: 11px; padding: 11px 13px; cursor: pointer; text-align: left; border-bottom: 1px solid rgba(38,52,61,.55); }
.conversation-item:hover, .conversation-item.active { background: var(--panel-2); }
.conversation-main { min-width: 0; }
.conversation-top, .conversation-bottom { display: flex; align-items: center; gap: 8px; }
.conversation-top strong { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation-top time { color: var(--muted); font-size: 11px; }
.conversation-bottom { margin-top: 5px; color: var(--muted); font-size: 13px; }
.conversation-bottom span:first-child { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #05271e; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }
.meta-icons { color: var(--muted); font-size: 12px; white-space: nowrap; }
.empty-list { padding: 38px 24px; color: var(--muted); text-align: center; line-height: 1.6; }

.chat-area { min-width: 0; display: flex; flex-direction: column; background: #0b141a; position: relative; }
.chat-area::before { content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none; background-image: radial-gradient(circle at 2px 2px, #d7e3e8 1px, transparent 0); background-size: 28px 28px; }
.chat-header { position: relative; z-index: 2; }
.conversation-privacy-strip { min-height: 34px; padding: 5px 13px; display: flex; align-items: center; justify-content: center; gap: 7px; border-bottom: 1px solid var(--line); background: rgba(8,18,24,.92); color: var(--muted); font-size: 11px; flex: 0 0 auto; }
.conversation-privacy-copy { display: inline-flex; align-items: center; gap: 6px; }
.conversation-privacy-copy strong { color: #b9c8c2; font-weight: 650; }
.conversation-privacy-info { width: 25px; height: 25px; padding: 0; border: 0; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,.055); color: #8fa19a; cursor: pointer; }
.conversation-privacy-info:hover, .conversation-privacy-info:focus-visible { background: rgba(34,201,130,.13); color: var(--accent); outline: none; }
.privacy-information-modal .modal-header h2 { display: flex; align-items: center; gap: 8px; }
.privacy-fact-card { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #101a20; }
.privacy-fact-card + .privacy-fact-card { margin-top: 10px; }
.privacy-fact-card strong, .privacy-fact-card span { display: block; }
.privacy-fact-card strong { margin-bottom: 5px; color: var(--text); }
.privacy-fact-card span { color: var(--muted); font-size: 12px; line-height: 1.55; }
.privacy-fact-card.warning { border-color: rgba(245,185,66,.38); background: rgba(245,185,66,.08); }
.chat-title { flex: 1; cursor: pointer; }
.mobile-back { display: none; }
.messages { position: relative; z-index: 1; flex: 1; min-height: 0; overflow-y: auto; padding: 22px max(18px, 7vw); display: flex; flex-direction: column; gap: 6px; }
.day-divider { align-self: center; background: rgba(17,27,33,.88); border-radius: 8px; padding: 6px 10px; color: #b6c2c8; font-size: 11px; margin: 10px 0; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.message-row { display: flex; max-width: min(78%, 720px); align-self: flex-start; position: relative; }
.message-row.mine { align-self: flex-end; }
.message-bubble { min-width: 90px; border-radius: 8px; background: var(--bubble-other); padding: 7px 9px 5px; box-shadow: 0 1px 2px rgba(0,0,0,.25); position: relative; }
.mine .message-bubble { background: var(--bubble-me); }
.sender-name { color: #70c7ff; font-weight: 750; font-size: 12px; margin-bottom: 3px; }
.forwarded { color: #aebbc2; font-style: italic; font-size: 11px; margin-bottom: 3px; }
.reply-quote { border-left: 3px solid var(--accent); background: rgba(0,0,0,.16); padding: 6px 8px; border-radius: 6px; margin-bottom: 6px; font-size: 12px; color: #b9c6cc; cursor: pointer; }
.reply-quote strong { display: block; color: #73e2b0; }
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.message-media { display: block; max-width: min(340px, 65vw); max-height: 420px; border-radius: 7px; margin-bottom: 5px; object-fit: contain; background: rgba(0,0,0,.2); }
.message-file { display: flex; gap: 10px; align-items: center; padding: 10px; background: rgba(0,0,0,.15); border-radius: 8px; text-decoration: none; color: var(--text); margin-bottom: 4px; }
.message-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-meta { display: flex; justify-content: flex-end; align-items: center; gap: 5px; margin-left: 16px; color: #aebbc2; font-size: 10px; min-height: 14px; }
.message-actions { position: absolute; top: 2px; right: 3px; opacity: 0; border: 0; background: rgba(0,0,0,.15); color: #d5dfe4; border-radius: 50%; width: 25px; height: 25px; cursor: pointer; }
.message-bubble:hover .message-actions { opacity: 1; }
.reactions { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.reaction-pill { border: 1px solid rgba(255,255,255,.12); background: #18252c; border-radius: 999px; padding: 2px 7px; font-size: 11px; cursor: pointer; }
.system-message { align-self: center; color: #b3c1c8; background: rgba(17,27,33,.84); border-radius: 8px; padding: 6px 10px; font-size: 11px; margin: 5px; }
.typing-indicator { position: absolute; left: 22px; bottom: 76px; z-index: 3; background: var(--panel-2); color: var(--muted); padding: 7px 11px; border-radius: 10px; font-size: 12px; box-shadow: var(--shadow); }
.composer-wrap { position: relative; z-index: 2; background: var(--panel-2); border-top: 1px solid var(--line); }
.reply-preview { display: flex; gap: 10px; align-items: center; margin: 8px 14px 0; padding: 8px 11px; background: #17242b; border-left: 3px solid var(--accent); border-radius: 8px; }
.reply-preview div { min-width: 0; flex: 1; }
.reply-preview strong, .reply-preview span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-preview span { color: var(--muted); font-size: 12px; }
.composer { min-height: 62px; display: flex; align-items: flex-end; gap: 6px; padding: 9px 11px; }
.composer textarea { flex: 1; max-height: 130px; min-height: 42px; resize: none; border: 0; outline: 0; border-radius: 12px; padding: 11px 13px; color: var(--text); background: #2a3942; }
.composer .icon-btn { flex: 0 0 42px; height: 42px; }
.recording { color: #ff7986 !important; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(.88); opacity: .65; } }
.empty-chat { position: relative; z-index: 1; flex: 1; display: grid; place-content: center; text-align: center; padding: 30px; color: var(--muted); border-bottom: 6px solid var(--accent); }
.empty-chat .brand-mark { width: 90px; height: 90px; font-size: 46px; }
.empty-chat h2 { color: var(--text); margin-bottom: 6px; }

.modal-backdrop { position: fixed; z-index: 1000; inset: 0; background: rgba(0,0,0,.66); display: grid; place-items: center; padding: 18px; backdrop-filter: blur(5px); }
.modal { width: min(100%, 560px); max-height: min(90vh, 820px); overflow: hidden; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.modal.wide { width: min(100%, 980px); }
.modal-header { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.modal-header h2 { margin: 0; flex: 1; font-size: 19px; }
.modal-body { padding: 20px; overflow: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.user-result, .member-row { display: flex; align-items: center; gap: 11px; padding: 10px 3px; border-bottom: 1px solid var(--line); }
.user-result .user-info, .member-row .user-info { flex: 1; min-width: 0; }
.user-info strong, .user-info span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info span { color: var(--muted); font-size: 12px; }
.context-menu { position: fixed; z-index: 1100; min-width: 185px; padding: 6px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); box-shadow: var(--shadow); }
.context-menu button { width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.context-menu button:hover { background: var(--panel-3); }
.context-menu button.danger { color: #ff8c96; }

.admin-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
.stat-card { padding: 15px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.stat-card strong { display: block; font-size: 24px; margin-bottom: 3px; }
.stat-card span { color: var(--muted); font-size: 12px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 12px; }
th { position: sticky; top: 0; background: var(--panel-2); color: #c7d1d6; }
td { color: #dce4e8; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.update-box { padding: 13px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 10px; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 5px; }

#toast-root { position: fixed; z-index: 2000; right: 16px; bottom: 16px; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { padding: 12px 14px; border-radius: 12px; background: #25343c; border: 1px solid #39505d; box-shadow: var(--shadow); animation: toast-in .2s ease; }
.toast.error { border-color: rgba(255,93,108,.5); color: #ffd8dc; }
.toast.success { border-color: rgba(34,201,130,.5); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-card-wrap { padding: 16px; }
  .chat-shell { grid-template-columns: 1fr; }
  .sidebar { position: absolute; inset: 0; z-index: 10; }
  .chat-area { position: absolute; inset: 0; z-index: 20; transform: translateX(100%); transition: transform .2s ease; }
  .chat-shell.mobile-chat-open .chat-area { transform: translateX(0); width: 100%; height: 100dvh; }
  .chat-shell.mobile-chat-open .sidebar { display: none; }
  .mobile-back { display: grid; }
  .messages { padding: 16px 10px; }
  .message-row { max-width: 88%; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { border-radius: 22px 22px 0 0; max-height: 94vh; }
}


/* Arroba Chat: ícones e recursos avançados */
.ui-icon { display: block; flex: 0 0 auto; }
.btn .ui-icon, .context-menu .ui-icon, .forwarded .ui-icon, .deleted-message .ui-icon { display: inline-block; vertical-align: middle; }
.request-button { position: relative; }
.request-badge { position: absolute; right: 0; top: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center; background: var(--danger); color: white; font-size: 9px; font-weight: 800; border: 2px solid var(--panel-2); }
.meta-icons { display: inline-flex; align-items: center; gap: 5px; }
.deleted-message { display: inline-flex; align-items: center; gap: 6px; color: #aebbc2; }
.audio-message { display: flex; align-items: center; gap: 9px; min-width: min(310px, 70vw); }
.audio-message audio, .audio-preview audio { width: 100%; min-width: 0; }
.message-file small { display: block; margin-top: 3px; color: var(--muted); }
.message-bubble.starred { box-shadow: inset 0 0 0 1px rgba(245,185,66,.55), 0 1px 2px rgba(0,0,0,.25); }
.star-marker { position: absolute; left: 6px; bottom: 5px; color: var(--warning); }
.reaction-pill { display: inline-flex; align-items: center; gap: 4px; }
.reaction-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 10px; }
.reaction-option { border: 1px solid var(--line); background: var(--panel-2); color: var(--text); border-radius: 13px; padding: 14px 10px; display: grid; justify-items: center; gap: 7px; cursor: pointer; }
.reaction-option:hover { border-color: var(--accent); }
.recording-status { padding: 8px 14px 0; color: #ff9ca5; display: flex; align-items: center; gap: 7px; font-size: 12px; }
.audio-preview { display: flex; align-items: center; gap: 12px; padding: 18px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 15px; }
.modal-search { margin-bottom: 14px; }
.search-results { display: grid; gap: 5px; }
.search-result-message { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 11px; text-align: left; border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: var(--panel-2); cursor: pointer; }
.search-result-message strong, .search-result-message span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-message span { grid-column: 1; color: var(--muted); font-size: 12px; }
.search-result-message time { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); font-size: 11px; }
.request-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.request-card { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.request-card .user-info { flex: 1; min-width: 0; }
.request-card p { margin: 6px 0; white-space: normal; color: #c9d3d8; font-size: 12px; }
.request-card small { color: var(--muted); text-transform: capitalize; }
.request-actions { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.profile-avatar-editor { width: max-content; margin: 0 auto 18px; position: relative; }
.avatar-change { position: absolute; right: -2px; bottom: -2px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: var(--accent); color: #05271e; border: 3px solid var(--panel); }
.setting-row { display: flex; align-items: center; gap: 15px; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line); }
.setting-row > span { min-width: 0; }
.setting-row strong, .setting-row small { display: block; }
.setting-row small { margin-top: 3px; color: var(--muted); line-height: 1.4; }
.setting-row input[type=checkbox] { width: 21px; height: 21px; accent-color: var(--accent); }
.select.compact { width: min(210px, 50%); }
.privacy-notice { display: flex; align-items: flex-start; gap: 10px; margin: 17px 0; padding: 12px; border-radius: 12px; background: rgba(34,201,130,.09); border: 1px solid rgba(34,201,130,.22); color: #c7d6d0; font-size: 12px; line-height: 1.5; }
.privacy-notice.warning { background: rgba(245,185,66,.09); border-color: rgba(245,185,66,.3); }
.privacy-notice.danger { background: rgba(255,91,105,.09); border-color: rgba(255,91,105,.34); color: #ffd5d9; }
.section-line { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.inline-field { display: flex; gap: 8px; }
.conversation-info-head { display: grid; place-items: center; text-align: center; margin-bottom: 20px; }
.conversation-info-head h2 { margin: 10px 0 3px; }
.admin-actions { display: flex; gap: 6px; min-width: 210px; }

.investigation-backdrop { padding: 10px; }
.investigation-modal { width: min(1500px, 100%); height: min(940px, calc(100vh - 20px)); max-height: none; border-radius: 16px; }
.investigation-banner { min-height: 48px; padding: 8px 14px; display: flex; align-items: center; gap: 8px; background: #4b3310; color: #ffe1a3; border-bottom: 1px solid #755218; font-size: 13px; font-weight: 700; }
.investigation-banner .icon-btn { margin-left: auto; }
.investigation-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, 390px) 1fr; }
.investigation-sidebar { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--panel); }
.investigation-user { display: flex; align-items: center; gap: 10px; padding: 13px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.investigation-user span { display: block; color: var(--muted); font-size: 12px; }
.investigation-conversations { flex: 1; overflow: auto; }
.investigation-conversations button { width: 100%; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 9px; padding: 11px; background: transparent; color: var(--text); border: 0; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; }
.investigation-conversations button:hover { background: var(--panel-2); }
.investigation-conversations button span { min-width: 0; }
.investigation-conversations strong, .investigation-conversations small, .investigation-conversations em { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.investigation-conversations small { color: var(--muted); margin-top: 3px; }
.investigation-conversations em { color: #ff9ba4; font-size: 10px; margin-top: 3px; }
.investigation-conversations b { min-width: 26px; height: 22px; border-radius: 999px; background: var(--panel-3); display: grid; place-items: center; font-size: 10px; }
.investigation-chat { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.investigation-chat-header { min-height: 62px; padding: 9px 14px; display: flex; align-items: center; gap: 10px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.investigation-chat-header strong, .investigation-chat-header span { display: block; }
.investigation-chat-header span { color: var(--muted); font-size: 11px; }
.forensic-messages { flex: 1; min-height: 0; overflow: auto; padding: 18px; display: grid; align-content: start; gap: 10px; }
.forensic-message { max-width: 760px; padding: 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.forensic-message header { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.forensic-message header .avatar { width: 32px; height: 32px; font-size: 11px; }
.forensic-message header div { min-width: 0; flex: 1; }
.forensic-message header strong, .forensic-message header span { display: block; }
.forensic-message header span, .forensic-message header time { color: var(--muted); font-size: 10px; }
.forensic-content { line-height: 1.5; overflow-wrap: anywhere; }
.forensic-content audio { width: min(420px, 100%); }
.forensic-content a { display: inline-flex; align-items: center; gap: 6px; color: #8bdcbc; }
.forensic-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.forensic-flags span { padding: 3px 7px; border-radius: 999px; background: rgba(255,93,108,.13); color: #ffacb3; font-size: 10px; }
.forensic-message details { margin-top: 10px; color: var(--muted); font-size: 11px; }
.history-entry { margin-top: 7px; padding: 8px; border-left: 2px solid var(--warning); background: rgba(0,0,0,.13); }
.history-entry time { float: right; }
.history-entry p { margin: 5px 0 0; color: #d4dde1; white-space: pre-wrap; }

.call-backdrop { background: rgba(0,0,0,.86); }
.call-modal, .incoming-call { width: min(680px, calc(100vw - 24px)); min-height: 500px; border: 1px solid #30414a; border-radius: 24px; overflow: hidden; background: #0b141a; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.call-modal header { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; background: var(--panel); }
.call-modal header > div { display: flex; align-items: center; gap: 8px; }
.call-modal header span { color: var(--muted); font-size: 12px; }
.call-stage { position: relative; flex: 1; min-height: 400px; display: grid; place-items: center; background: #071014; overflow: hidden; }
.call-stage > video:first-child { width: 100%; height: 100%; object-fit: cover; }
#local-call-video { position: absolute; right: 14px; bottom: 14px; width: min(180px, 30%); aspect-ratio: 3/4; object-fit: cover; border-radius: 14px; border: 2px solid rgba(255,255,255,.3); background: #000; }
.call-avatar { display: grid; place-items: center; text-align: center; gap: 9px; }
.call-avatar .avatar.large { width: 120px; height: 120px; font-size: 36px; }
.call-avatar h2, .call-avatar p { margin: 0; }
.call-avatar p { color: var(--muted); }
.call-modal footer { padding: 15px; display: grid; place-items: center; background: var(--panel); }
.call-end, .call-reject, .call-accept { width: 62px; height: 62px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: white; }
.call-end, .call-reject { background: #d83d4b; }
.call-end .ui-icon { transform: rotate(135deg); }
.call-accept { background: #1fb875; }
.incoming-call { min-height: 420px; padding: 40px 24px; justify-content: space-between; align-items: center; }
.incoming-actions { display: flex; gap: 54px; }

@media (max-width: 760px) {
  .request-columns { grid-template-columns: 1fr; }
  .setting-row { align-items: flex-start; flex-direction: column; }
  .select.compact { width: 100%; }
  .investigation-backdrop { padding: 0; }
  .investigation-modal { height: 100vh; border-radius: 0; }
  .investigation-layout { grid-template-columns: 1fr; grid-template-rows: minmax(230px, 42%) minmax(0, 1fr); }
  .investigation-sidebar { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .investigation-chat { position: static; min-height: 0; }
  .admin-actions { min-width: 180px; flex-direction: column; }
}

.audit-details { display: block; max-width: 320px; max-height: 86px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; }

/* Arroba Chat 2.1: controles visíveis, permissões e chamadas */
.requests-entry {
  width: calc(100% - 20px);
  margin: 2px 10px 8px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--text);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}
.requests-entry:hover { border-color: rgba(34,201,130,.55); }
.requests-entry.has-pending { border-color: rgba(255,93,108,.55); background: rgba(255,93,108,.08); }
.requests-entry-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(34,201,130,.12); color: var(--accent); }
.requests-entry strong, .requests-entry small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.requests-entry small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.requests-entry b { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--danger); color: #fff; font-size: 11px; }
.requests-chevron { transform: rotate(180deg); color: var(--muted); }

.chat-call-actions { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.header-action { min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--text); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.header-action:hover { background: var(--panel-2); border-color: rgba(34,201,130,.5); color: var(--accent); }
.header-action span { font-size: 11px; font-weight: 700; }

.header-action.follow-header-action.following {
  background: #d83d4b;
  border-color: #d83d4b;
  color: #fff;
}
.header-action.follow-header-action.following:hover {
  background: #b92f3c;
  border-color: #b92f3c;
  color: #fff;
}
.header-action.follow-header-action.pending {
  border-color: #8b7440;
  color: #e7c86f;
}
html.voice-recording-active #toast-root { display: none !important; }
.request-target { display: grid; justify-items: center; text-align: center; gap: 9px; margin: 8px 0 18px; }
.request-target strong, .request-target span { display: block; }
.request-target span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.user-result .user-info small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }

.call-modal footer.call-controls { padding: 15px; display: flex; align-items: center; justify-content: center; gap: 18px; background: var(--panel); }
.call-control { width: 52px; height: 52px; border-radius: 50%; border: 1px solid #42535c; display: grid; place-items: center; cursor: pointer; color: #fff; background: #223039; }
.call-control:hover { background: #2d404a; }
.call-control.disabled { background: #59646a; color: #dce3e6; }

@media (max-width: 760px) {
  .chat-call-actions { gap: 2px; }
  .header-action { width: 40px; min-width: 40px; padding: 0; justify-content: center; border: 0; }
  .header-action span { display: none; }
  .chat-title span { max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .requests-entry { margin-bottom: 6px; }
}

/* Arroba Chat 2.3: mensagens de voz, recibos e gravação contínua */
.message-status { display: inline-flex; align-items: center; gap: 1px; line-height: 1; }
.message-status .ui-icon { display: block; }
.receipt-sent, .receipt-delivered { color: #aebbc2; }
.receipt-read, .receipt-played { color: #53bdeb; }
.receipt-played .played-mic { margin-right: -2px; }

.voice-note-player,
.audio-file-player {
  min-width: min(360px, 68vw);
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 1px 2px;
}
.voice-note-player audio,
.audio-file-player audio { display: none; }
.audio-play-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #dce7eb;
  background: rgba(255,255,255,.1);
}
.audio-play-button:hover { background: rgba(255,255,255,.17); }
.voice-note-body { min-width: 0; flex: 1; }
.voice-waveform {
  position: relative;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  overflow: hidden;
}
.voice-waveform i {
  width: 2px;
  min-width: 2px;
  border-radius: 999px;
  background: rgba(216,230,235,.52);
  pointer-events: none;
}
.voice-wave-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  border-radius: 99px;
  background: #53bdeb;
  pointer-events: none;
}
.voice-note-info,
.audio-file-player small {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #aebbc2;
  font-size: 10px;
}
.audio-speed {
  min-width: 31px;
  height: 25px;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  color: #dce7eb;
  background: rgba(255,255,255,.1);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}
.voice-note-mic { color: #aebbc2; display: inline-grid; place-items: center; }
.voice-note-mic.listened { color: #53bdeb; }
.audio-file-player {
  padding: 8px;
  border-radius: 8px;
  background: rgba(0,0,0,.14);
}
.audio-file-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.09);
  color: #d7e3e8;
}
.audio-file-details { min-width: 0; flex: 1; }
.audio-file-details strong,
.audio-file-details > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-file-details strong { font-size: 13px; }
.audio-file-details > span { margin-top: 2px; color: #aebbc2; font-size: 10px; }
.audio-file-progress {
  position: relative;
  height: 4px;
  margin: 8px 0 5px;
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255,255,255,.14);
}
.audio-file-progress > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: #53bdeb;
}

.record-trigger { touch-action: none; user-select: none; -webkit-user-select: none; }
.record-trigger.recording { background: rgba(255,93,108,.13); }
.record-trigger.locked { animation: none; color: #53bdeb !important; }
.record-trigger.uploading { opacity: .55; cursor: wait; }
.voice-recorder {
  position: absolute;
  inset: 9px 11px;
  z-index: 8;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  border-radius: 13px;
  background: #202c33;
  box-shadow: 0 0 0 1px rgba(255,255,255,.04), 0 6px 22px rgba(0,0,0,.22);
}
.voice-record-action {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #dce7eb;
  background: rgba(255,255,255,.08);
}
.voice-record-action.danger { color: #ff8f99; }
.voice-record-action.send { color: #05271e; background: var(--accent); }
.recording-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #ff5d6c;
  box-shadow: 0 0 0 4px rgba(255,93,108,.12);
  animation: recordingBlink 1.2s infinite;
}
@keyframes recordingBlink { 50% { opacity: .35; } }
#recording-timer { min-width: 39px; font-variant-numeric: tabular-nums; }
.recording-hint {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #aebbc2;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recording-lock-guide {
  position: absolute;
  right: 14px;
  bottom: 72px;
  z-index: 9;
  width: 128px;
  padding: 10px 9px;
  border-radius: 12px;
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
  color: #d6e1e6;
  background: #202c33;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  pointer-events: none;
  transition: transform .08s linear, opacity .08s linear;
}
.recording-lock-guide span { font-size: 10px; line-height: 1.25; color: #aebbc2; }

@media (max-width: 680px) {
  .voice-note-player, .audio-file-player { min-width: min(290px, 72vw); }
  .voice-waveform { gap: 1px; }
  .voice-waveform i { width: 2px; min-width: 2px; }
  .recording-hint { justify-content: flex-start; font-size: 11px; }
  .voice-recorder { inset-inline: 7px; }
  .recording-lock-guide { right: 8px; }
}
.conversation-preview { min-width: 0; flex: 1; display: flex; align-items: center; gap: 3px; }
.conversation-preview > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-preview .message-status { flex: 0 0 auto; }

/* Arroba Chat 2.4 — viewport travado, rolagem interna e recursos sociais */
html, body, #app { height: 100%; min-height: 0; max-height: 100%; overflow: hidden; }
.chat-shell { height: 100vh; height: 100dvh; min-height: 0; max-height: 100vh; max-height: 100dvh; overflow: hidden; }
.sidebar, .chat-area { height: 100%; min-height: 0; max-height: 100%; overflow: hidden; }
.sidebar-header, .chat-header, .composer-wrap, .search-wrap, .conversation-filters, .flash-strip, .sidebar-shortcuts { flex: 0 0 auto; }
.chat-area { min-height: 0; max-height: 100dvh; }
.messages { flex: 1 1 0; height: 0; min-height: 0; max-height: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-gutter: stable; }
.conversation-list { flex: 1 1 0; height: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.composer-wrap { min-height: 62px; }

.flash-strip { display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 10px 11px 9px; border-bottom: 1px solid var(--line); background: var(--panel); scrollbar-width: thin; }
.flash-person { width: 62px; min-width: 62px; border: 0; background: transparent; color: var(--text); cursor: pointer; display: grid; justify-items: center; gap: 5px; padding: 0; }
.flash-person > span:last-child { width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #b8c4ca; font-size: 10px; text-align: center; }
.flash-avatar-wrap { position: relative; width: 50px; height: 50px; border-radius: 50%; padding: 2px; display: grid; place-items: center; background: linear-gradient(145deg, #22c982, #53bdeb); }
.flash-person.viewed .flash-avatar-wrap { background: #41515a; }
.flash-avatar-wrap .avatar { width: 44px; height: 44px; border: 2px solid var(--panel); }
.flash-add { position: absolute; right: -1px; bottom: -1px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #05271e; border: 2px solid var(--panel); }

.sidebar-shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); background: #0f191f; }
.sidebar-shortcuts button { min-width: 0; border: 0; background: transparent; color: #aebbc2; cursor: pointer; padding: 9px 5px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; justify-content: center; gap: 5px; font-size: 11px; }
.sidebar-shortcuts button:hover, .sidebar-shortcuts button.has-pending { background: rgba(34,201,130,.1); color: #75e3b1; }
.sidebar-shortcuts button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-shortcuts button b { min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center; background: var(--panel-3); font-size: 9px; }
.sidebar-shortcuts button.has-pending b { background: var(--accent); color: #05271e; }

.contact-list, .social-list { display: grid; gap: 8px; }
.contact-card, .social-user-card { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: #101a20; }
.contact-profile, .social-profile-trigger, .user-profile-link { flex: 1; min-width: 0; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; padding: 0; display: flex; align-items: center; gap: 10px; }
.contact-profile { display: grid; gap: 2px; }
.contact-profile strong, .contact-profile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-profile span { color: var(--muted); font-size: 12px; }
.social-user-card .user-info { flex: 1; min-width: 0; }
.social-user-card small, .user-result small { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.social-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 10px; }
.social-section-heading h3 { margin: 0; }
.follow-request-summary { width: 100%; display: flex; align-items: center; gap: 11px; margin: 12px 0; padding: 12px 13px; border: 1px solid rgba(34,201,130,.32); border-radius: 13px; background: rgba(34,201,130,.10); color: var(--text); text-align: left; cursor: pointer; }
.follow-request-summary:hover { background: rgba(34,201,130,.16); }
.follow-request-summary > span { display: grid; gap: 2px; flex: 1; min-width: 0; }
.follow-request-summary strong { font-size: 13px; }
.follow-request-summary small { color: var(--muted); font-size: 11px; }
.follow-request-summary .summary-arrow { transform: rotate(180deg); color: var(--muted); }
.profile-request-summary { margin-top: 15px; }
.user-result-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.user-profile-link { display: grid; gap: 2px; }

.social-profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 17px; }
.social-profile-head h2 { margin: 0 0 3px; }
.social-profile-head span, .social-profile-head small { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.social-counts { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; margin-bottom: 14px; }
.social-counts > * { border: 0; border-right: 1px solid var(--line); background: #101a20; color: inherit; padding: 12px 6px; text-align: center; display: grid; gap: 3px; cursor: default; }
.social-counts > *:last-child { border-right: 0; }
.social-counts strong { font-size: 18px; }
.social-counts span { color: var(--muted); font-size: 11px; }
.profile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.profile-bio { white-space: pre-wrap; line-height: 1.5; color: #d2dce1; }

.flash-backdrop { background: rgba(0,0,0,.88); }
.flash-viewer { width: min(460px, 100vw); height: min(820px, 100dvh); max-height: 100dvh; border-radius: 20px; overflow: hidden; background: #080d11; box-shadow: var(--shadow); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; position: relative; }
.flash-progress { display: flex; gap: 4px; padding: 9px 10px 0; }
.flash-progress span { flex: 1; height: 3px; border-radius: 999px; background: rgba(255,255,255,.22); }
.flash-progress span.complete { background: rgba(255,255,255,.92); }
.flash-viewer header { display: flex; align-items: center; gap: 9px; padding: 9px 12px; }
.flash-viewer header > div { flex: 1; min-width: 0; }
.flash-viewer header strong, .flash-viewer header span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flash-viewer header span { color: #aebbc2; font-size: 11px; }
.flash-content { min-height: 0; display: grid; place-items: center; overflow: hidden; position: relative; }
.flash-text { width: 100%; height: 100%; min-height: 420px; display: grid; place-items: center; padding: 35px; text-align: center; font-size: clamp(23px, 5vw, 38px); line-height: 1.25; white-space: pre-wrap; overflow-wrap: anywhere; }
.flash-bg-deep { background: linear-gradient(145deg, #12212a, #070c10); }
.flash-bg-green { background: linear-gradient(145deg, #087b5f, #04382e); }
.flash-bg-blue { background: linear-gradient(145deg, #225d89, #172d50); }
.flash-bg-sand { background: linear-gradient(145deg, #826d45, #453921); }
.flash-media { width: 100%; height: 100%; max-height: 680px; object-fit: contain; background: #000; }
.flash-caption { position: absolute; left: 14px; right: 14px; bottom: 15px; margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.62); text-align: center; white-space: pre-wrap; }
.flash-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; background: rgba(0,0,0,.28); color: #fff; cursor: pointer; display: grid; place-items: center; }
.flash-nav.previous { left: 0; border-radius: 0 12px 12px 0; }
.flash-nav.next { right: 0; border-radius: 12px 0 0 12px; }
.flash-nav:disabled { opacity: .18; cursor: default; }
.flash-viewer footer { padding: 10px 14px; display: flex; justify-content: center; gap: 7px; align-items: center; color: #b8c4ca; font-size: 12px; }
.rotate-180 { transform: rotate(180deg); }

.voice-record-action:disabled { opacity: .45; cursor: wait; }

@media (max-width: 760px) {
  .chat-shell, .sidebar, .chat-area { height: 100dvh; max-height: 100dvh; }
  .flash-strip { padding-block: 8px; }
  .flash-person { width: 57px; min-width: 57px; }
  .flash-avatar-wrap { width: 46px; height: 46px; }
  .flash-avatar-wrap .avatar { width: 40px; height: 40px; }
  .sidebar-shortcuts button { grid-template-columns: auto; gap: 3px; }
  .sidebar-shortcuts button b { position: absolute; margin: -22px 0 0 25px; }
  .flash-viewer { width: 100vw; height: 100dvh; border-radius: 0; }
  .user-result { align-items: flex-start; }
  .user-result-actions { width: 100%; padding-left: 52px; justify-content: stretch; }
  .user-result-actions .btn { flex: 1; }
}

/* Arroba Chat 2.7 — navegação móvel e mensagens de voz com forma de onda real */
.mobile-bottom-nav { display: none; }
.mobile-section-heading { padding: 18px 16px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mobile-section-heading > div { min-width: 0; display: grid; gap: 3px; }
.mobile-section-heading strong { font-size: 21px; }
.mobile-section-heading span { color: var(--muted); font-size: 11px; }
.mobile-flash-grid { display: grid; gap: 8px; padding: 0 11px 18px; }
.mobile-flash-card,
.mobile-profile-action,
.mobile-profile-request { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: #101a20; color: inherit; padding: 11px 12px; display: flex; align-items: center; gap: 11px; text-align: left; cursor: pointer; }
.mobile-flash-card:not(.viewed) { border-color: rgba(34,201,130,.48); box-shadow: inset 3px 0 0 var(--accent); }
.mobile-flash-card > span:nth-child(2),
.mobile-profile-action > span,
.mobile-profile-request > span { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mobile-flash-card strong,
.mobile-flash-card small,
.mobile-profile-action strong,
.mobile-profile-action small,
.mobile-profile-request strong,
.mobile-profile-request small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-flash-card small,
.mobile-profile-action small,
.mobile-profile-request small { color: var(--muted); font-size: 11px; }
.mobile-card-arrow { transform: rotate(180deg); color: var(--muted); }
.mobile-profile-page { padding: 20px 14px 24px; }
.mobile-profile-hero { display: flex; align-items: center; gap: 15px; }
.mobile-profile-hero > div { min-width: 0; }
.mobile-profile-hero h2 { margin: 0 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-profile-hero span,
.mobile-profile-hero small { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.mobile-profile-bio { margin: 15px 0; padding: 12px 13px; border-radius: 12px; background: #101a20; color: #d4dee3; white-space: pre-wrap; }
.mobile-profile-counts { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; margin-bottom: 12px; }
.mobile-profile-counts button { border: 0; border-right: 1px solid var(--line); background: #101a20; color: inherit; padding: 12px 5px; display: grid; gap: 3px; cursor: pointer; }
.mobile-profile-counts button:last-child { border-right: 0; }
.mobile-profile-counts strong { font-size: 18px; }
.mobile-profile-counts span { color: var(--muted); font-size: 10px; }
.mobile-profile-action,
.mobile-profile-request { margin-top: 8px; }
.mobile-profile-request { border-color: rgba(34,201,130,.45); background: rgba(34,201,130,.09); }

.voice-note-player.unplayed .audio-play-button { color: #05271e; background: var(--accent); box-shadow: 0 0 0 3px rgba(34,201,130,.12); }
.voice-note-player.played .audio-play-button { color: #062635; background: #53bdeb; }
.voice-note-player.unplayed .voice-note-mic { color: var(--accent); }
.voice-note-player.played .voice-note-mic { color: #53bdeb; }
.voice-waveform i { transition: background .08s linear, opacity .08s linear; }
.voice-waveform i.passed { background: var(--accent); }
.mine .voice-waveform i.passed { background: #53bdeb; }
.recording-live-wave { height: 30px; min-width: 70px; flex: 1; display: flex; align-items: center; justify-content: center; gap: 2px; overflow: hidden; }
.recording-live-wave i { width: 2px; min-width: 2px; height: 4px; border-radius: 999px; background: #ff7d89; transition: height .08s linear; }
.voice-record-action.transitioning { opacity: .72; }
.composer.voice-recording #attach-btn,
.composer.voice-recording #message-input,
.composer.voice-recording #send-btn { visibility: hidden; pointer-events: none; }
.composer.voice-recording #record-btn { position: relative; z-index: 12; visibility: visible; color: #fff !important; background: #e94f5f; box-shadow: 0 0 0 7px rgba(233,79,95,.15); }
.composer.voice-recording .voice-recorder { right: 107px; }

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  .mobile-bottom-nav { flex: 0 0 calc(64px + env(safe-area-inset-bottom)); min-height: calc(64px + env(safe-area-inset-bottom)); padding: 3px 5px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); align-items: stretch; border-top: 1px solid var(--line); background: #111b21; z-index: 30; }
  .mobile-bottom-nav button { position: relative; min-width: 0; border: 0; border-radius: 11px; background: transparent; color: #8696a0; display: grid; place-content: center; justify-items: center; gap: 3px; padding: 5px 2px; cursor: pointer; font-size: 10px; font-weight: 650; }
  .mobile-bottom-nav button.active { color: var(--accent); background: rgba(34,201,130,.09); }
  .mobile-nav-icon { position: relative; display: grid; place-items: center; }
  .mobile-nav-icon b { position: absolute; top: -7px; right: -11px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center; background: var(--danger); color: #fff; border: 2px solid #111b21; font-size: 8px; }
  .sidebar .flash-strip,
  .sidebar .sidebar-shortcuts,
  .sidebar .conversation-filters { display: none; }
  .chat-shell[data-mobile-tab="flashes"] .search-wrap,
  .chat-shell[data-mobile-tab="profile"] .search-wrap { display: none; }
  .conversation-list { padding-bottom: 0; }
  .chat-shell.mobile-chat-open .mobile-bottom-nav { display: none; }
  .composer.voice-recording .voice-recorder { right: 105px; left: 7px; }
  .recording-live-wave { min-width: 46px; gap: 1px; }
  .recording-live-wave i { width: 2px; min-width: 2px; }
  .recording-hint { max-width: 96px; }
}

@media (max-width: 390px) {
  .recording-hint { display: none; }
  .recording-live-wave { min-width: 42px; }
  .composer.voice-recording .voice-recorder { right: 103px; }
}

/* Arroba Chat 2.8 — Flashs, ligações, permissões e controles profissionais */
.header-request-btn { position: relative; }
.header-request-btn b { position: absolute; top: 0; right: -1px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px; background: var(--danger); color: #fff; border: 2px solid var(--panel-2); font-size: 8px; font-style: normal; }
.header-request-btn.has-pending { color: #fff; background: rgba(255,93,108,.12); }

.conversation-item { position: relative; display: flex; padding: 0; gap: 0; }
.conversation-open { flex: 1; min-width: 0; border: 0; color: inherit; background: transparent; display: grid; grid-template-columns: 50px 1fr auto; gap: 11px; padding: 11px 7px 11px 13px; cursor: pointer; text-align: left; }
.conversation-list-menu { width: 38px; flex: 0 0 38px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; opacity: .25; }
.conversation-item:hover .conversation-list-menu, .conversation-list-menu:focus-visible { opacity: 1; }
.conversation-list-menu:hover { color: var(--text); background: rgba(255,255,255,.05); }
.conversation-public-bell { width: 34px; flex: 0 0 34px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; border-left: 1px solid rgba(255,255,255,.035); }
.conversation-public-bell.status-granted { color: #42d997; background: rgba(66,217,151,.06); }
.conversation-public-bell.status-denied { color: #97a3aa; background: rgba(151,163,170,.055); }
.conversation-public-bell.status-unsupported { color: #ff6672; background: rgba(255,102,114,.07); }
.conversation-public-bell.status-prompt { color: #f0bd68; background: rgba(240,189,104,.055); }
.conversation-public-bell:hover, .conversation-public-bell:focus-visible { filter: brightness(1.22); outline: none; }
.conversation-context-menu { min-width: 235px; }

.blocked-chat-notice { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 12px 0; padding: 9px 12px; border: 1px solid rgba(255,93,108,.28); border-radius: 11px; color: #ff9ca5; background: rgba(255,93,108,.08); font-size: 12px; }
.composer-wrap.blocked .composer { opacity: .58; }
.header-action:disabled, .icon-btn:disabled { opacity: .38; cursor: not-allowed; }

.compact-modal { width: min(420px, calc(100vw - 24px)); }
.mute-options { display: grid; gap: 5px; }
.mute-options button { width: 100%; border: 0; border-radius: 12px; background: #101a20; color: inherit; display: flex; align-items: center; gap: 12px; padding: 13px; cursor: pointer; text-align: left; }
.mute-options button:hover { background: var(--panel-3); }
.mute-options button > span { display: grid; gap: 2px; }
.mute-options small { color: var(--muted); }

.mobile-page-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 17px 10px; }
.mobile-page-title h1 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.mobile-page-title > div > span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.mobile-page-search { border: 0; padding: 6px 16px 18px; }
.mobile-flash-page, .mobile-calls-page { min-height: 100%; background: #0b141a; }
.own-status-section, .status-section { padding: 0 16px 17px; }
.own-status-section h3, .status-section h3 { margin: 11px 0 10px; color: #cdd6da; font-size: 14px; }
.own-status-row { display: flex; align-items: center; gap: 10px; }
.own-status-profile { flex: 1; min-width: 0; border: 0; background: transparent; color: inherit; display: flex; align-items: center; gap: 11px; padding: 4px 0; text-align: left; cursor: pointer; }
.own-status-profile > span:last-child { display: grid; gap: 2px; min-width: 0; }
.own-status-profile strong, .own-status-profile small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.own-status-profile small { color: var(--muted); font-size: 11px; }
.round-create-action { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--panel-2); color: #dce6ea; display: grid; place-items: center; cursor: pointer; }
.round-create-action:hover { background: var(--panel-3); }
.mobile-status-row { width: 100%; border: 0; border-bottom: 1px solid rgba(38,52,61,.72); background: transparent; color: inherit; display: flex; align-items: center; gap: 12px; padding: 10px 0; text-align: left; cursor: pointer; }
.status-ring { width: 53px; height: 53px; padding: 3px; border: 2px solid var(--accent); border-radius: 50%; display: grid; place-items: center; }
.status-ring .avatar { width: 43px; height: 43px; }
.mobile-status-row.viewed .status-ring { border-color: #56636a; }
.status-copy { min-width: 0; display: grid; gap: 2px; }
.status-copy strong, .status-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-copy small { color: var(--muted); }
.empty-status { color: var(--muted); font-size: 12px; padding: 8px 0; }

.call-history-list { padding: 0 11px 22px; }
.call-history-row { display: flex; align-items: center; gap: 11px; padding: 10px 5px; border-bottom: 1px solid rgba(38,52,61,.72); }
.call-history-copy { flex: 1; min-width: 0; border: 0; background: transparent; color: inherit; display: grid; gap: 3px; text-align: left; cursor: pointer; }
.call-history-copy strong, .call-history-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-history-copy span { color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 4px; }
.call-history-copy span.missed { color: #ff7c88; }
.call-outgoing { transform: rotate(45deg); color: var(--accent); }
.call-incoming { transform: rotate(-135deg); color: #53bdeb; }
.call-again { color: var(--accent); }

.profile-hero-button { width: 100%; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; padding: 5px 0; }
.profile-hero-button > div { flex: 1; }
.profile-settings-group { display: grid; gap: 2px; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 8px; }

.permission-modal { width: min(580px, calc(100vw - 24px)); }
.permission-modal .modal-header > div { min-width: 0; }
.permission-modal .modal-header h2 { margin: 0; }
.permission-modal .modal-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.permission-list { display: grid; gap: 7px; }
.permission-row { display: grid; grid-template-columns: 43px 1fr auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: #101a20; }
.permission-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(34,201,130,.1); color: var(--accent); }
.permission-row > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.permission-row small { color: var(--muted); font-size: 11px; }
.permission-row em { color: #78deb0; font-size: 10px; font-style: normal; }
.permission-sound-row { border: 1px solid var(--line); border-radius: 13px; background: #101a20; padding: 13px; }
.permission-help { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.blocked-user-list { display: grid; gap: 5px; }

.flash-compose-backdrop { background: rgba(0,0,0,.9); }
.flash-compose-modal { width: min(540px, 100vw); height: min(900px, 100dvh); max-height: 100dvh; display: grid; grid-template-rows: auto minmax(0,1fr); background: #080d11; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.flash-compose-modal > header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #111b21; }
.flash-compose-modal > header > div { flex: 1; display: grid; gap: 2px; }
.flash-compose-modal > header span { color: var(--muted); font-size: 10px; }
.flash-compose-modal > main { min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) auto auto; }
.flash-compose-preview { min-height: 0; position: relative; overflow: hidden; display: grid; place-items: center; background: #000; }
.flash-compose-preview > img, .flash-compose-preview > video { width: 100%; height: 100%; object-fit: contain; }
.flash-compose-preview > p { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0; padding: 9px 11px; border-radius: 10px; background: rgba(0,0,0,.58); text-align: center; white-space: pre-wrap; }
.flash-compose-placeholder { border: 0; background: transparent; color: #cbd5da; display: grid; justify-items: center; gap: 8px; cursor: pointer; text-align: center; }
.flash-compose-placeholder span { color: var(--muted); font-size: 11px; }
.flash-text-preview { padding: 32px; font-size: clamp(24px, 5vw, 38px); font-weight: 650; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; }
.flash-compose-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 9px 11px; background: #111b21; }
.flash-compose-toolbar button { border: 0; border-radius: 11px; background: var(--panel-2); color: var(--muted); padding: 9px; display: flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; }
.flash-compose-toolbar button.active { color: var(--accent); background: rgba(34,201,130,.12); }
.flash-compose-fields { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 11px calc(10px + env(safe-area-inset-bottom)); background: #111b21; }
.flash-compose-fields textarea { min-width: 0; min-height: 46px; max-height: 110px; border: 0; border-radius: 15px; background: var(--panel-2); color: var(--text); padding: 13px; resize: none; }
.flash-background-picker { display: flex; align-items: center; gap: 5px; }
.flash-background-picker button { width: 25px; height: 25px; border: 2px solid transparent; border-radius: 50%; cursor: pointer; }
.flash-background-picker button.active { border-color: #fff; }
.flash-background-picker button[data-flash-background="deep"] { background: #152630; }
.flash-background-picker button[data-flash-background="green"] { background: #087b5f; }
.flash-background-picker button[data-flash-background="blue"] { background: #225d89; }
.flash-background-picker button[data-flash-background="sand"] { background: #826d45; }

.flash-progress span { overflow: hidden; position: relative; }
.flash-progress span.active i { display: block; width: 100%; height: 100%; background: rgba(255,255,255,.96); transform-origin: left; animation-name: flash-progress-fill; animation-timing-function: linear; animation-fill-mode: forwards; }
.flash-progress span.active i.paused { animation-play-state: paused; }
@keyframes flash-progress-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.flash-tap-zone { position: absolute; top: 0; bottom: 0; width: 34%; border: 0; background: transparent; z-index: 3; cursor: pointer; }
.flash-tap-zone.left { left: 0; }
.flash-tap-zone.right { right: 0; }

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  .mobile-bottom-nav { grid-template-columns: repeat(5, 1fr); }
  .sidebar-header { min-height: 62px; }
  .sidebar-header .profile-lines { display: none; }
  .sidebar-header .profile-trigger { flex: 1; }
  .conversation-list-menu { opacity: .72; }
  .chat-shell[data-mobile-tab="flashes"] .sidebar-header,
  .chat-shell[data-mobile-tab="calls"] .sidebar-header,
  .chat-shell[data-mobile-tab="profile"] .sidebar-header { display: none; }
  .chat-shell[data-mobile-tab="flashes"] .search-wrap,
  .chat-shell[data-mobile-tab="calls"] .search-wrap,
  .chat-shell[data-mobile-tab="profile"] .search-wrap { display: none; }
  .flash-compose-modal { width: 100vw; height: 100dvh; border-radius: 0; }
}

@media (max-width: 430px) {
  .mobile-bottom-nav button { font-size: 9px; }
  .permission-row { grid-template-columns: 38px 1fr; }
  .permission-row .btn { grid-column: 2; justify-self: start; }
  .permission-icon { width: 38px; height: 38px; }
}

/* 2.8 - seletor profissional de origem do Flash */
.flash-compose-source-actions { width: min(360px, calc(100vw - 48px)); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.flash-compose-source-actions button { min-width: 0; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: rgba(17,27,33,.92); color: var(--text); display: grid; justify-items: center; gap: 5px; padding: 15px 10px; cursor: pointer; box-shadow: 0 10px 28px rgba(0,0,0,.24); }
.flash-compose-source-actions button:hover { border-color: rgba(34,201,130,.48); background: #17262e; }
.flash-compose-source-actions button .ui-icon { color: var(--accent); }
.flash-compose-source-actions button b { font-size: 13px; }
.flash-compose-source-actions button small { color: var(--muted); font-size: 10px; }
.flash-replace-media { position: absolute; right: 14px; bottom: 70px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(17,27,33,.9); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 22px rgba(0,0,0,.35); }
.flash-replace-media:hover { background: var(--accent-dark); }

/* 2.9.7 - painel único forçado pelo estado real do chat */
html.arroba-mobile-layout,
html.arroba-mobile-layout body,
html.standalone-pwa,
html.standalone-pwa body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.chat-shell.mobile-layout,
html.standalone-pwa .chat-shell {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  grid-template-columns: 1fr !important;
}

.chat-shell.mobile-layout > .sidebar,
.chat-shell.mobile-layout > .chat-area,
html.standalone-pwa .chat-shell > .sidebar,
html.standalone-pwa .chat-shell > .chat-area {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  max-height: 100% !important;
  transform: none !important;
  transition: none !important;
}

html.arroba-conversation-open .chat-shell > .sidebar,
body.arroba-conversation-open .chat-shell > .sidebar,
.chat-shell.mobile-layout[data-mobile-view="conversation"] > .sidebar,
html.standalone-pwa .chat-shell[data-mobile-view="conversation"] > .sidebar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

html.arroba-conversation-open .chat-shell > .chat-area,
body.arroba-conversation-open .chat-shell > .chat-area,
.chat-shell.mobile-layout[data-mobile-view="conversation"] > .chat-area,
html.standalone-pwa .chat-shell[data-mobile-view="conversation"] > .chat-area {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.chat-shell.mobile-layout[data-mobile-view="list"] > .sidebar,
html.standalone-pwa .chat-shell[data-mobile-view="list"] > .sidebar {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.chat-shell.mobile-layout[data-mobile-view="list"] > .chat-area,
html.standalone-pwa .chat-shell[data-mobile-view="list"] > .chat-area {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

html.arroba-conversation-open .mobile-back,
body.arroba-conversation-open .mobile-back,
.chat-shell.mobile-layout[data-mobile-view="conversation"] .mobile-back,
html.standalone-pwa .chat-shell[data-mobile-view="conversation"] .mobile-back {
  display: grid !important;
}

html.arroba-conversation-open .mobile-bottom-nav,
body.arroba-conversation-open .mobile-bottom-nav,
.chat-shell.mobile-layout[data-mobile-view="conversation"] .mobile-bottom-nav,
html.standalone-pwa .chat-shell[data-mobile-view="conversation"] .mobile-bottom-nav {
  display: none !important;
}

/* Arroba Chat — administração total, impersonação e denúncias */
.impersonation-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 5000;
  min-height: 52px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #6b4609;
  color: #fff2cf;
  border-bottom: 1px solid #a8751d;
  box-shadow: 0 5px 18px rgba(0,0,0,.28);
}
.impersonation-banner span { flex: 1; min-width: 0; }
.impersonation-banner .btn { flex: 0 0 auto; background: #fff2cf; color: #3d2705; border-color: transparent; }
html.admin-impersonating .chat-shell,
body.admin-impersonating .chat-shell { height: calc(100dvh - 52px) !important; max-height: calc(100dvh - 52px) !important; margin-top: 52px; }
.report-target { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); margin-bottom: 12px; }
.report-target p { margin: 7px 0 0; color: var(--muted); white-space: pre-wrap; }
.report-admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.report-admin-toolbar .select { width: min(280px, 100%); }
.admin-report-list { display: grid; gap: 12px; }
.admin-report-card { border: 1px solid var(--line); border-left: 4px solid #88949a; border-radius: 13px; background: var(--panel-2); padding: 13px; }
.admin-report-card.status-pending { border-left-color: #ffb54c; }
.admin-report-card.status-reviewing { border-left-color: #54a8ff; }
.admin-report-card.status-resolved { border-left-color: #36cf8b; }
.admin-report-card.status-dismissed { opacity: .8; }
.admin-report-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-report-card > header strong { display: block; margin-top: 4px; }
.admin-report-card > header b { white-space: nowrap; font-size: 11px; padding: 5px 8px; border-radius: 999px; background: var(--panel-3); }
.report-kind { color: var(--accent); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.report-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; color: var(--muted); font-size: 12px; margin: 10px 0; }
.admin-report-card blockquote { margin: 10px 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: rgba(0,0,0,.18); white-space: pre-wrap; }
.admin-report-card p { white-space: pre-wrap; }
.report-resolution { padding: 9px 10px; border-radius: 9px; background: rgba(54,207,139,.1); margin-top: 9px; }
.report-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.btn.warning { background: #6b4609; color: #fff2cf; border-color: #a8751d; }

@media (max-width: 680px) {
  .impersonation-banner { min-height: 64px; padding: 7px 9px; font-size: 12px; align-items: stretch; }
  .impersonation-banner .btn { max-width: 135px; white-space: normal; line-height: 1.15; }
  html.admin-impersonating .chat-shell,
  body.admin-impersonating .chat-shell { height: calc(100dvh - 64px) !important; max-height: calc(100dvh - 64px) !important; margin-top: 64px; }
  .report-admin-toolbar { align-items: stretch; flex-direction: column; }
  .report-admin-toolbar .select { width: 100%; }
  .admin-report-card > header { flex-direction: column; }
  .report-actions .btn { flex: 1 1 145px; }
}

/* Arroba Chat 2.9.8 — @ fixo, teclado móvel, sons e mensagens sem azul */
:root {
  --arroba-visual-height: 100dvh;
  --arroba-visual-top: 0px;
}

.fixed-at-input {
  position: relative;
  display: flex;
  align-items: center;
}
.fixed-at-input .fixed-at-prefix {
  position: absolute;
  left: 14px;
  z-index: 2;
  color: var(--accent);
  font-weight: 850;
  pointer-events: none;
  user-select: none;
}
.fixed-at-input .input { padding-left: 31px; }
.fixed-at-input.email-mode .fixed-at-prefix { opacity: 0; }
.fixed-at-input.email-mode .input { padding-left: 14px; }
.fixed-at-search .fixed-at-prefix {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 850;
  pointer-events: none;
  user-select: none;
}
.fixed-at-search input { padding-left: 0; }

.message-bubble { background: #202c33 !important; }
.message-row.mine .message-bubble { background: #005c4b !important; }
.receipt-read,
.receipt-played,
.voice-note-mic.listened,
.voice-note-player.played .voice-note-mic,
.mine .voice-waveform i.passed { color: var(--accent) !important; }
.voice-note-player.played .audio-play-button { background: var(--accent) !important; color: #05271e !important; }

.composer-wrap {
  flex: 0 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateZ(0);
}
.messages { scroll-padding-bottom: 96px; }
body.message-keyboard-open .composer-wrap { padding-bottom: 0; }

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  .chat-shell.mobile-layout,
  html.standalone-pwa .chat-shell {
    height: var(--arroba-visual-height) !important;
    min-height: var(--arroba-visual-height) !important;
    max-height: var(--arroba-visual-height) !important;
    top: var(--arroba-visual-top) !important;
    bottom: auto !important;
  }
  .chat-shell.mobile-layout > .chat-area,
  html.standalone-pwa .chat-shell > .chat-area {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
  }
  .composer-wrap { position: relative; z-index: 40; }
  .composer { padding-bottom: 9px; }
}

/* 2.9.8 - link público de atendimento e chat de visitante */
.public-link-profile-card { margin: 12px 0 16px; padding: 13px; border: 1px solid rgba(34,201,130,.35); border-radius: 14px; background: rgba(34,201,130,.08); }
.public-link-profile-card > div:first-child { display: grid; gap: 4px; margin-bottom: 10px; }
.public-link-profile-card strong { font-size: 14px; }
.public-link-profile-card small { color: var(--muted); line-height: 1.4; }
.public-link-copy-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.public-link-copy-row .input { min-width: 0; font-size: 12px; }

html.public-chat-mode,
html.public-chat-mode body { width: 100%; height: 100%; min-height: 100%; overflow: hidden; background: #0b141a; }
body.public-chat-mode #modal-root:empty,
body.public-chat-mode #toast-root:empty { pointer-events: none; }
.public-chat-loading,
.public-chat-error { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 28px; text-align: center; background: radial-gradient(circle at 50% 15%, rgba(34,201,130,.14), transparent 34%), #0b141a; }
.public-chat-error h1 { margin: 4px 0 0; font-size: clamp(22px, 5vw, 34px); }
.public-chat-error p { max-width: 520px; margin: 0; color: var(--muted); }
.public-chat-error small { color: #e8bd7e; }
.public-chat-shell { position: fixed; top: var(--arroba-visual-top, 0px); left: 0; width: 100vw; height: var(--arroba-visual-height, 100dvh); max-height: var(--arroba-visual-height, 100dvh); display: grid; grid-template-rows: auto auto minmax(0,1fr) auto auto; overflow: hidden; background: #0b141a; }
.public-chat-header { min-height: 66px; padding: 9px max(12px, env(safe-area-inset-left)) 9px max(12px, env(safe-area-inset-right)); display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); background: #111b21; z-index: 4; }
.public-chat-owner { min-width: 0; flex: 1; display: grid; gap: 3px; }
.public-chat-owner strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.public-chat-owner span { color: var(--muted); font-size: 12px; }
.public-chat-notification-button { width: 42px; height: 42px; border: 0; border-radius: 50%; display: grid; place-items: center; color: var(--text); background: transparent; cursor: pointer; }
.public-chat-notification-button:hover { background: rgba(255,255,255,.06); }
.public-chat-notification-card { margin: 8px 10px 0; padding: 10px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; border: 1px solid rgba(34,201,130,.32); border-radius: 13px; background: #10241e; z-index: 3; }
.public-chat-notification-card[hidden] { display: none; }
.public-chat-notification-card > span { color: var(--accent); }
.public-chat-notification-card > div { min-width: 0; display: grid; gap: 2px; }
.public-chat-notification-card strong { font-size: 13px; }
.public-chat-notification-card small { color: #a8b8b1; line-height: 1.3; }
.public-chat-notification-card button { border: 0; border-radius: 10px; padding: 9px 11px; color: #05271e; background: var(--accent); font-weight: 700; cursor: pointer; }
.public-chat-notification-card button:disabled { cursor: not-allowed; opacity: .55; }
.public-chat-messages { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px max(12px, calc((100vw - 920px) / 2)) 14px; background-color: #0b141a; background-image: radial-gradient(circle at 15px 15px, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 30px 30px; }
.public-chat-message { width: 100%; display: flex; margin: 3px 0; }
.public-chat-message.incoming { justify-content: flex-start; }
.public-chat-message.outgoing { justify-content: flex-end; }
.public-chat-bubble { max-width: min(78%, 680px); min-width: 82px; padding: 8px 9px 5px; border-radius: 11px; box-shadow: 0 1px 1px rgba(0,0,0,.18); }
.public-chat-message.incoming .public-chat-bubble { background: #202c33; border-top-left-radius: 4px; }
.public-chat-message.outgoing .public-chat-bubble { background: #075e54; border-top-right-radius: 4px; }
.public-chat-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.42; font-size: 14px; }
.public-chat-bubble footer { margin-top: 3px; display: flex; align-items: center; justify-content: flex-end; gap: 3px; color: rgba(255,255,255,.68); font-size: 10px; }
.public-chat-status { display: inline-flex; color: #76e3b2; }
.public-chat-empty { min-height: 100%; display: grid; place-content: center; justify-items: center; gap: 7px; padding: 30px; text-align: center; color: var(--muted); }
.public-chat-empty strong { color: var(--text); font-size: 17px; }
.public-chat-empty span:last-child { max-width: 360px; line-height: 1.45; }
.public-chat-composer { padding: 8px max(10px, calc((100vw - 920px) / 2)); display: grid; grid-template-columns: minmax(0,1fr) 46px; align-items: end; gap: 8px; border-top: 1px solid var(--line); background: #111b21; z-index: 5; }
.public-chat-composer textarea { width: 100%; min-height: 42px; max-height: 132px; resize: none; border: 1px solid #31414a; border-radius: 22px; padding: 10px 14px; color: var(--text); background: #202c33; outline: none; font: inherit; line-height: 1.35; }
.public-chat-composer textarea:focus { border-color: rgba(34,201,130,.72); box-shadow: 0 0 0 2px rgba(34,201,130,.12); }
.public-chat-composer button { width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #05271e; background: var(--accent); cursor: pointer; }
.public-chat-composer button:disabled { opacity: .55; cursor: wait; }
.public-chat-brand { min-height: calc(27px + env(safe-area-inset-bottom)); padding: 4px 12px env(safe-area-inset-bottom); display: flex; align-items: center; justify-content: center; gap: 6px; color: #829198; background: #111b21; font-size: 10px; }
.public-chat-brand .brand-mark { width: 18px; height: 18px; border-radius: 6px; font-size: 12px; }

@media (max-width: 620px) {
  .public-link-copy-row { grid-template-columns: 1fr; }
  .public-chat-notification-card { grid-template-columns: auto minmax(0,1fr); }
  .public-chat-notification-card button { grid-column: 1 / -1; width: 100%; }
  .public-chat-messages { padding-left: 9px; padding-right: 9px; }
  .public-chat-bubble { max-width: 88%; }
  .public-chat-brand { font-size: 9px; }
}

/* Arroba Chat — chamadas em tela cheia e continuidade em segundo plano */
html.call-active,
html.call-active body { overscroll-behavior: none; }
.call-backdrop {
  z-index: 5000 !important;
  padding: 0 !important;
  place-items: stretch !important;
  background: #05090c !important;
  backdrop-filter: none !important;
}
.call-modal,
.incoming-call {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.call-modal header {
  min-height: 70px;
  padding: calc(14px + env(safe-area-inset-top)) 18px 14px;
  background: rgba(11,20,26,.96);
}
.call-modal header strong { font-size: 16px; }
.call-modal header span { font-size: 13px; font-weight: 700; }
.call-stage { min-height: 0 !important; }
.call-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, rgba(34,201,130,.16), transparent 38%);
  pointer-events: none;
}
.video-call-waiting {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 15px;
  text-align: center;
  transition: opacity .25s ease;
  pointer-events: none;
}
.call-stage.has-remote-video .video-call-waiting { opacity: 0; }
.active-call-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.active-call-identity .avatar.large,
.incoming-call .avatar.large { width: 132px; height: 132px; font-size: 42px; }
.active-call-identity > div { text-align: center; }
.active-call-identity strong { display: block; font-size: 26px; }
.active-call-identity span,
.active-call-username,
.incoming-call-username { display: block; margin-top: 5px; color: #9fb0b9; font-size: 14px; }
.video-call-waiting p { margin: 0; color: #c7d3d8; }
#local-call-video {
  position: absolute;
  z-index: 4;
  right: 16px;
  bottom: 16px;
  width: min(30vw, 190px);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 18px;
  background: #101820;
  box-shadow: 0 12px 34px rgba(0,0,0,.4);
}
.call-modal footer.call-controls {
  min-height: calc(92px + env(safe-area-inset-bottom));
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
}
.incoming-call {
  position: relative;
  justify-content: center !important;
  gap: clamp(32px, 8vh, 72px);
  padding: calc(32px + env(safe-area-inset-top)) 24px calc(30px + env(safe-area-inset-bottom)) !important;
  background:
    radial-gradient(circle at 50% 30%, rgba(34,201,130,.2), transparent 34%),
    linear-gradient(180deg, #102029 0%, #081116 72%);
}
.incoming-call-type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a7b8c0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .11em;
}
.incoming-call .call-avatar { gap: 10px; }
.incoming-call .call-avatar h2 { margin-top: 10px; font-size: clamp(28px, 7vw, 42px); }
.incoming-call .call-avatar p { margin-top: 8px; color: #eef5f2; font-size: 17px; }
.incoming-call-ringing {
  margin-top: 3px;
  color: #75e3b1;
  font-weight: 700;
  animation: incomingCallPulse 1.35s ease-in-out infinite;
}
.incoming-actions { display: flex; align-items: center; justify-content: center; gap: clamp(48px, 18vw, 110px); }
.incoming-call-hint { color: #91a2aa; text-align: center; }
@keyframes incomingCallPulse { 50% { opacity: .38; } }

@media (max-width: 520px) {
  .call-modal header { min-height: 64px; }
  .active-call-identity .avatar.large,
  .incoming-call .avatar.large { width: 116px; height: 116px; }
  #local-call-video { right: 10px; bottom: 10px; width: 31vw; border-radius: 14px; }
  .call-control { width: 56px; height: 56px; }
  .call-end, .call-reject, .call-accept { width: 68px; height: 68px; }
}

/* 2.9.7 - envio estável, permissões públicas, iPhone e experiência nativa */
html,
body,
#app,
.chat-shell,
.public-chat-shell {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input,
textarea,
select,
[contenteditable="true"],
.public-link-copy-row input {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

button,
a,
[role="button"],
.conversation-item,
.message-menu-button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

img.zoom-allowed,
.zoom-allowed,
.message-media img,
.public-flash-image-link {
  -webkit-touch-callout: default;
}

.public-link-permissions {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(34,201,130,.2);
}

.public-link-permissions .setting-row.compact {
  margin: 0;
  padding: 9px 10px;
  background: rgba(255,255,255,.025);
}

.header-action.public-notification-bell,
.public-chat-notification-button {
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}

.header-action.public-notification-bell.status-granted,
.public-chat-notification-button.status-granted {
  color: #42d997;
  background: rgba(66,217,151,.13);
  box-shadow: inset 0 0 0 1px rgba(66,217,151,.2);
}

.header-action.public-notification-bell.status-denied,
.public-chat-notification-button.status-denied {
  color: #97a3aa;
  background: rgba(151,163,170,.11);
  box-shadow: inset 0 0 0 1px rgba(151,163,170,.18);
}

.header-action.public-notification-bell.status-unsupported,
.public-chat-notification-button.status-unsupported {
  color: #ff6672;
  background: rgba(255,102,114,.13);
  box-shadow: inset 0 0 0 1px rgba(255,102,114,.22);
}

.header-action.public-notification-bell.status-prompt,
.public-chat-notification-button.status-prompt {
  color: #f0bd68;
  background: rgba(240,189,104,.12);
  box-shadow: inset 0 0 0 1px rgba(240,189,104,.2);
}

.public-chat-shell {
  display: flex;
  flex-direction: column;
  grid-template-rows: none;
}

.public-chat-header {
  flex: 0 0 auto;
}

.public-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.public-chat-header-actions > button {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.public-chat-header-actions > button:hover,
.public-chat-header-actions > button:focus-visible {
  background: rgba(255,255,255,.07);
}

.public-external-browser {
  flex: 0 0 auto;
  margin: 8px 10px 0;
  padding: 10px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(68,151,255,.28);
  border-radius: 13px;
  background: #10202f;
  z-index: 4;
}

.public-external-browser > span {
  color: #71b2ff;
}

.public-external-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.public-external-browser strong {
  font-size: 13px;
}

.public-external-browser small {
  color: #a9bac8;
  line-height: 1.35;
}

.public-external-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.public-external-browser button {
  border: 0;
  border-radius: 10px;
  padding: 9px 11px;
  background: #67aaf8;
  color: #071522;
  font-weight: 800;
  cursor: pointer;
}

.public-external-browser button.secondary {
  color: #dbeeff;
  background: rgba(103,170,248,.15);
  box-shadow: inset 0 0 0 1px rgba(103,170,248,.22);
}

.public-external-browser button.ghost {
  color: var(--text);
  background: rgba(255,255,255,.07);
}

.public-chat-notification-card {
  flex: 0 0 auto;
}

.public-chat-notification-card[data-status="denied"] {
  border-color: rgba(151,163,170,.28);
  background: #192126;
}

.public-chat-notification-card[data-status="denied"] > span {
  color: #97a3aa;
}

.public-chat-notification-card[data-status="unsupported"] {
  border-color: rgba(255,102,114,.3);
  background: #29171b;
}

.public-chat-notification-card[data-status="unsupported"] > span {
  color: #ff6672;
}

.public-chat-notification-card[data-status="unsupported"] button {
  color: #fff;
  background: #9a3843;
}

.public-chat-notification-card[data-status="denied"] button {
  color: #11181c;
  background: #aeb8bd;
}

.public-chat-messages {
  flex: 1 1 0;
  height: 0;
}

.public-chat-composer {
  flex: 0 0 auto;
  position: relative;
  bottom: auto;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.public-chat-composer textarea {
  -webkit-user-select: text;
  user-select: text;
  touch-action: pan-y;
}

.public-chat-composer button {
  touch-action: manipulation;
}

.public-chat-brand {
  flex: 0 0 auto;
}

.public-flash-backdrop {
  z-index: 10000;
  background: rgba(3,8,11,.94);
}

.public-flash-viewer {
  width: min(520px, 100vw);
  height: min(820px, 100dvh);
  max-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto auto;
  overflow: hidden;
  background: #0d171d;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
}

.public-flash-viewer > header {
  min-height: 62px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #111b21;
  border-bottom: 1px solid var(--line);
}

.public-flash-viewer > header > div {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.public-flash-viewer > header strong,
.public-flash-viewer > header span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.public-flash-viewer > header span {
  color: var(--muted);
  font-size: 11px;
}

.public-flash-stage {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #05090c;
}

.public-flash-stage img,
.public-flash-stage video {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.public-flash-image-link {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.public-flash-text {
  width: 100%;
  height: 100%;
  min-height: 320px;
  padding: 35px;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--flash-bg, #17252d);
}

.public-flash-text p {
  margin: 0;
  max-width: 440px;
  font-size: clamp(24px, 7vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.public-flash-caption {
  margin: 0;
  padding: 10px 14px;
  color: var(--text);
  background: #111b21;
  border-top: 1px solid var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.public-flash-viewer > footer {
  padding: 9px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: #111b21;
  border-top: 1px solid var(--line);
}

.public-flash-viewer > footer button {
  min-width: 110px;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text);
  background: rgba(255,255,255,.08);
  cursor: pointer;
}

.public-flash-viewer > footer button:disabled {
  opacity: .35;
  cursor: default;
}

.public-flash-next-icon {
  transform: rotate(180deg);
}

@media (max-width: 680px) {
  .public-chat-header { gap: 8px; }
  .public-chat-header-actions { gap: 0; }
  .public-chat-header-actions > button { width: 37px; height: 37px; flex-basis: 37px; }
  .public-external-browser { grid-template-columns: auto minmax(0,1fr); }
  .public-external-actions { grid-column: 1 / -1; width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .public-external-actions button { width: 100%; }
  .public-external-actions button.ghost { grid-column: 1 / -1; }
  .public-chat-notification-card { grid-template-columns: auto minmax(0,1fr); }
  .public-chat-notification-card button { grid-column: 1 / -1; width: 100%; }
  .public-flash-viewer { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
}

@media (max-width: 390px) {
  .public-chat-owner strong { font-size: 14px; }
  .public-chat-header-actions > button { width: 34px; height: 34px; flex-basis: 34px; }
}

/* 2.9.8 - fila offline, cadastro opcional, áudio público e visão master */
.receipt-queued { color: #f0bd68; }
.receipt-failed { color: #ff7b86; }
.public-chat-message.queued .public-chat-bubble { opacity: .82; }
.public-chat-message.failed .public-chat-bubble { box-shadow: inset 0 0 0 1px rgba(255,102,114,.55); }
.public-chat-status.queued { color: #f0bd68; }
.public-chat-status.failed { color: #ff7b86; }

.public-visitor-name-shell {
  min-height: 100dvh;
  padding: 24px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 12%, rgba(34,201,130,.18), transparent 34%), #0b141a;
}
.public-visitor-name-card {
  width: min(440px, 100%);
  padding: 28px;
  display: grid;
  justify-items: stretch;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #111b21;
  box-shadow: 0 22px 70px rgba(0,0,0,.38);
}
.public-visitor-name-card .avatar.large { margin: 0 auto 3px; }
.public-visitor-name-kicker { color: var(--accent); text-align: center; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.public-visitor-name-card h1 { margin: 0; text-align: center; font-size: clamp(23px, 6vw, 32px); }
.public-visitor-name-card p { margin: 0 0 5px; color: var(--muted); text-align: center; line-height: 1.5; }
.public-visitor-name-card label { font-size: 13px; font-weight: 700; }
.public-visitor-name-card small { color: var(--muted); text-align: center; }

.public-registration-invite {
  flex: 0 0 auto;
  margin: 7px 10px 0;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(34,201,130,.28);
  border-radius: 13px;
  background: #10241e;
}
.public-registration-invite[hidden] { display: none; }
.public-registration-invite .brand-mark { width: 31px; height: 31px; border-radius: 10px; font-size: 20px; }
.public-registration-invite > div { min-width: 0; display: grid; gap: 2px; }
.public-registration-invite strong { font-size: 13px; }
.public-registration-invite small { color: #a8b8b1; line-height: 1.3; }
.public-registration-invite button { border: 0; border-radius: 9px; padding: 8px 10px; color: #05271e; background: var(--accent); font-weight: 800; cursor: pointer; }
.public-registration-invite button.ghost { color: var(--text); background: rgba(255,255,255,.07); }

.public-chat-composer { display: block; }
.public-chat-composer-inner {
  width: 100%;
  min-height: 46px;
  padding: 0;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  background: transparent;
  border: 0;
}
.public-chat-composer-inner textarea { flex: 1 1 auto; min-width: 0; }
.public-chat-composer-inner > button { flex: 0 0 44px; }
.public-chat-composer-inner .record-btn { color: #d9e4e0; background: #26343b; }
.public-chat-composer-inner.voice-recording textarea,
.public-chat-composer-inner.voice-recording > #public-chat-send,
.public-chat-composer-inner.voice-recording > .record-btn { visibility: hidden; }
.public-chat-composer-inner .voice-recorder {
  position: absolute;
  inset: 0;
  min-width: 0;
  padding: 5px 7px;
  border-radius: 16px;
  background: #202c33;
  z-index: 5;
}
.public-chat-composer-inner .voice-recorder button {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  color: var(--text);
  background: rgba(255,255,255,.07);
}
.public-chat-composer-inner .voice-recorder .voice-send { color: #05271e; background: var(--accent); }
.public-chat-composer-inner .voice-recorder .voice-cancel { color: #ff9ca5; }
.public-chat-composer-inner .recording-lock-guide { right: 51px; bottom: 58px; }
.public-chat-bubble .voice-note-player,
.public-chat-bubble .audio-file-player { min-width: min(330px, 68vw); }

.impersonation-forensic-banner {
  flex: 0 0 auto;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffe6aa;
  background: #34270d;
  border-bottom: 1px solid rgba(255,198,77,.32);
  font-size: 12px;
}
.impersonation-forensic-banner > svg { flex: 0 0 auto; }
.forensic-message-badges { margin-bottom: 5px; display: flex; flex-wrap: wrap; gap: 4px; }
.forensic-badge {
  padding: 3px 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .02em;
  background: rgba(255,255,255,.08);
}
.forensic-badge.deleted { color: #ffacb3; background: rgba(255,102,114,.16); }
.forensic-badge.hidden { color: #ffd37d; background: rgba(240,189,104,.15); }
.forensic-badge.reported { color: #ffb0e3; background: rgba(225,78,175,.15); }
.forensic-badge.history { color: #9cc9ff; background: rgba(74,151,255,.15); }
.admin-preserved-deleted .message-bubble { box-shadow: inset 0 0 0 1px rgba(255,102,114,.38); }
.admin-preserved-hidden .message-bubble { outline: 1px dashed rgba(240,189,104,.48); outline-offset: 2px; }
.conversation-admin-deleted { color: #ff9ca5; font-size: 9px; font-style: normal; font-weight: 700; }
.forensic-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(110px,1fr)); gap: 8px; }
.forensic-summary-grid > div { padding: 12px; display: grid; gap: 3px; border: 1px solid var(--line); border-radius: 12px; background: #101a20; }
.forensic-summary-grid strong { font-size: 20px; }
.forensic-summary-grid span { color: var(--muted); font-size: 11px; }
.forensic-current-content { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #0d171d; }
.forensic-report-list, .forensic-history-list { display: grid; gap: 8px; }
.forensic-report-list article, .forensic-history-list article { padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #101a20; }
.forensic-report-list header, .forensic-history-list header { display: flex; justify-content: space-between; gap: 8px; }
.forensic-report-list small, .forensic-history-list time { color: var(--muted); font-size: 10px; }
.forensic-report-list p, .forensic-history-list p { margin: 7px 0 0; white-space: pre-wrap; }
.forensic-history-list a { display: inline-block; margin-top: 7px; color: var(--accent); }

@media (max-width: 680px) {
  .public-registration-invite { grid-template-columns: auto minmax(0,1fr); }
  .public-registration-invite button { width: 100%; }
  .public-registration-invite > button:first-of-type { grid-column: 1 / -1; }
  .public-registration-invite > button.ghost { grid-column: 1 / -1; }
  .forensic-summary-grid { grid-template-columns: 1fr 1fr; }
  .impersonation-forensic-banner { font-size: 10px; }
}
.conversation-admin-reported { color: #ff9cde; font-size: 9px; font-style: normal; font-weight: 700; }
.impersonation-forensic-banner .btn { flex: 0 0 auto; }
@media (max-width: 680px) {
  .impersonation-forensic-banner { flex-wrap: wrap; }
  .impersonation-forensic-banner .btn { width: 100%; }
}
.public-queued-retry { margin-top: 5px; border: 0; border-radius: 8px; padding: 5px 8px; color: #fff; background: rgba(0,0,0,.22); font-size: 10px; font-weight: 700; cursor: pointer; }

/* Arroba Chat fase 1 — módulos administrativos 1 a 12 */
.receipt-read,
.receipt-played,
.voice-note-mic.listened,
.voice-note-player.played .voice-note-mic { color: #53bdeb !important; }
.mine .voice-waveform i.passed { color: var(--accent) !important; }

.impersonation-banner.readonly { background: #5a4216; }
html.impersonation-readonly .composer-wrap,
body.impersonation-readonly .composer-wrap { opacity: .72; }
html.impersonation-readonly .composer-wrap::before,
body.impersonation-readonly .composer-wrap::before {
  content: "Somente visualizar — envio e alterações bloqueados";
  display: block; padding: 8px 12px; text-align: center; font-size: 12px; font-weight: 800;
  color: #ffd993; background: rgba(90,66,22,.9); border-top: 1px solid rgba(255,217,147,.25);
}

.health-head, .section-title-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.health-head h3, .section-title-row h3 { margin:0; }
.health-components { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:10px; margin-bottom:14px; }
.health-component { display:flex; align-items:flex-start; gap:10px; padding:12px; border:1px solid var(--line); border-radius:14px; background:#101a20; }
.health-component > span { width:34px; height:34px; display:grid; place-items:center; border-radius:50%; flex:0 0 auto; }
.health-component.healthy > span { color:#75e3b1; background:rgba(34,201,130,.13); }
.health-component.unhealthy > span { color:#ff9ba4; background:rgba(255,90,105,.13); }
.health-component strong, .health-component small { display:block; }
.health-component small { color:var(--muted); margin-top:3px; }
.admin-two-columns { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:16px 0; }
.admin-two-columns > section { padding:14px; border:1px solid var(--line); border-radius:14px; background:#101a20; }
.admin-detail-list { display:grid; gap:8px; }
.admin-detail-list > div { display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid rgba(255,255,255,.06); }
.admin-detail-list > div:last-child { border-bottom:0; }
.system-event-list { display:grid; gap:9px; }
.system-event { border:1px solid var(--line); border-left:4px solid #58717f; border-radius:12px; padding:11px 12px; background:#101a20; }
.system-event.warning { border-left-color:#e5ad45; }
.system-event.error, .system-event.critical { border-left-color:#ff5a69; }
.system-event.info { border-left-color:#53bdeb; }
.system-event header { display:flex; justify-content:space-between; gap:12px; }
.system-event p { margin:6px 0; color:var(--muted); }
.system-event time { color:var(--muted); font-size:11px; }

.security-status-card { display:flex; align-items:center; gap:14px; padding:15px; border-radius:15px; margin-bottom:16px; border:1px solid var(--line); }
.security-status-card.enabled { background:rgba(34,201,130,.09); border-color:rgba(34,201,130,.36); }
.security-status-card.required { background:rgba(229,173,69,.09); border-color:rgba(229,173,69,.36); }
.security-status-card > div { flex:1; min-width:0; }
.security-status-card strong, .security-status-card small { display:block; }
.security-status-card small { color:var(--muted); margin-top:4px; }
.admin-device-list { display:grid; gap:8px; }
.admin-device-list article { display:flex; align-items:center; gap:10px; padding:10px; border:1px solid var(--line); border-radius:12px; background:#0d171d; }
.admin-device-list article > div { flex:1; min-width:0; }
.admin-device-list strong, .admin-device-list small { display:block; }
.admin-device-list small { color:var(--muted); margin-top:3px; }

.topic-strip-item { position:relative; border:0; background:transparent; color:inherit; cursor:pointer; min-width:70px; text-align:center; }
.topic-strip-ring { width:54px; height:54px; margin:auto; display:grid; place-items:center; overflow:hidden; border-radius:18px; border:2px solid var(--topic-color,#22c982); background:#17252c; box-shadow:0 0 0 3px rgba(34,201,130,.08); }
.topic-strip-ring img { width:100%; height:100%; object-fit:cover; }
.topic-strip-item strong { display:block; max-width:72px; margin-top:5px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:11px; }
.topic-official-badge { position:absolute; top:-4px; right:5px; min-width:18px; height:18px; padding:0 4px; border-radius:999px; display:grid; place-items:center; background:var(--topic-color,#22c982); color:#071813; }
.topic-viewer { width:min(880px,96vw); max-height:92dvh; overflow:auto; border-radius:18px; background:var(--panel); border:1px solid var(--line); }
.topic-viewer-cover { min-height:150px; padding:24px; display:flex; align-items:flex-end; gap:14px; background:linear-gradient(135deg,var(--topic-color,#22c982),#0e171d); background-size:cover; background-position:center; }
.topic-viewer-cover .topic-icon { width:66px; height:66px; display:grid; place-items:center; border-radius:18px; background:rgba(0,0,0,.35); overflow:hidden; }
.topic-viewer-cover .topic-icon img { width:100%; height:100%; object-fit:cover; }
.topic-viewer-cover h2 { margin:0; }
.topic-viewer-cover p { margin:4px 0 0; }
.topic-viewer-body { padding:15px; display:grid; gap:12px; }
.topic-post { border:1px solid var(--line); border-radius:14px; padding:12px; background:#101a20; }
.topic-post.pinned { border-color:var(--topic-color,#22c982); }
.topic-post img, .topic-post video { max-width:100%; max-height:480px; border-radius:12px; }
.topic-post audio { width:100%; }
.topic-post-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.topic-poll-options { display:grid; gap:7px; margin-top:10px; }
.admin-topic-list { display:grid; gap:10px; }
.admin-topic-card { display:grid; grid-template-columns:52px minmax(0,1fr) auto; gap:11px; align-items:center; padding:11px; border:1px solid var(--line); border-left:4px solid var(--topic-color,#22c982); border-radius:14px; background:#101a20; }
.topic-admin-icon { width:48px; height:48px; display:grid; place-items:center; overflow:hidden; border-radius:13px; background:#17252c; }
.topic-admin-icon img { width:100%; height:100%; object-fit:cover; }
.admin-topic-card strong, .admin-topic-card small, .admin-topic-card span { display:block; }
.admin-topic-card small, .admin-topic-card span { color:var(--muted); margin-top:3px; }
.official-inline-badge { display:inline-flex; align-items:center; gap:3px; padding:2px 6px; border-radius:999px; font-size:10px; background:rgba(34,201,130,.14); color:#75e3b1; }
.official-flash-actions { display:flex !important; justify-content:center; gap:8px; }
.official-toggle-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:9px; margin:12px 0; }

.conversation-control-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:10px; }
.control-card { display:grid; gap:7px; padding:11px; border:1px solid var(--line); border-radius:13px; background:#101a20; }
.inline-check { display:flex; align-items:center; gap:7px; font-size:12px; color:var(--muted); }
.modal.extra-wide { width:min(1080px,96vw); }

.notification-summary { display:grid; grid-template-columns:auto 1fr; gap:3px 9px; align-items:center; padding:12px; margin-bottom:12px; border:1px solid var(--line); border-radius:13px; background:#101a20; }
.notification-summary small { grid-column:2; color:var(--muted); }
.status-dot { width:12px; height:12px; border-radius:50%; background:#e5ad45; }
.status-dot.ok { background:#22c982; }
.status-dot.warn { background:#e5ad45; }
.status-pill { display:inline-flex; padding:3px 7px; border-radius:999px; font-size:11px; font-weight:800; background:#2a3942; }
.status-pill.ok { color:#75e3b1; background:rgba(34,201,130,.13); }
.status-pill.warn { color:#ffd993; background:rgba(229,173,69,.13); }
.status-pill.danger { color:#ffb2b9; background:rgba(255,90,105,.13); }

.public-form-editor { display:grid; gap:10px; }
.public-form-field { display:grid; grid-template-columns:28px 1fr; gap:9px; padding:11px; border:1px solid var(--line); border-radius:13px; background:#101a20; }
.public-form-field.dragging { opacity:.45; }
.public-form-field.drag-target { outline:2px dashed var(--accent); }
.public-form-drag { cursor:grab; display:grid; place-items:start center; padding-top:8px; color:var(--muted); }
.public-form-field-actions { grid-column:2; display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.public-prechat-form { width:min(560px,calc(100vw - 24px)); margin:auto; padding:18px; border:1px solid var(--line); border-radius:18px; background:var(--panel); }
.public-prechat-form h2 { margin-top:0; }

.report-admin-toolbar { flex-wrap:wrap; justify-content:flex-start; }
.report-admin-toolbar strong { margin-left:auto; }
.report-context article { padding:6px 0; border-bottom:1px solid rgba(255,255,255,.06); }
.report-context ul { margin:4px 0 8px 18px; color:var(--muted); }
.report-conversation-view { display:grid; gap:9px; }
.forensic-message { padding:11px; border:1px solid var(--line); border-radius:13px; background:#101a20; }
.forensic-message.deleted { border-color:rgba(255,90,105,.45); }
.forensic-message header { display:flex; align-items:center; gap:9px; }
.forensic-message header > div { flex:1; }
.forensic-message header strong, .forensic-message header small { display:block; }
.forensic-message header small { color:var(--muted); }
.forensic-message-body { margin:9px 0; }
.forensic-message-body img, .forensic-message-body video { max-width:100%; max-height:480px; border-radius:10px; }
.forensic-message-body audio { width:100%; }

@media (max-width:760px) {
  .admin-two-columns { grid-template-columns:1fr; }
  .health-head, .section-title-row { align-items:stretch; flex-direction:column; }
  .admin-topic-card { grid-template-columns:46px minmax(0,1fr); }
  .admin-topic-card .admin-actions { grid-column:1/-1; }
  .report-admin-toolbar strong { margin-left:0; }
  .public-form-field { grid-template-columns:22px 1fr; }
}

/* 2.9.8 - Fase 2: conteúdo oficial, campanhas, permissões e agendamento */
.avatar-wrap { position: relative; display: inline-grid; flex: 0 0 auto; }
.official-avatar-badge { position: absolute; right: -3px; bottom: -2px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; color: #071d15; background: var(--accent); border: 2px solid var(--panel); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.avatar-wrap.official-avatar .avatar { box-shadow: 0 0 0 2px rgba(34,201,130,.7); }
.phase2-inline-content, .phase2-public-chat-content, .phase2-profile-publications, .phase2-topic-publications { display: grid; gap: 8px; padding: 9px 11px; }
.phase2-notice-inline, .phase2-public-chat-content article { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 13px; background: #101b21; }
.phase2-notice-inline.required { border-color: rgba(255,190,70,.55); }
.phase2-notice-inline > div, .phase2-public-chat-content article { min-width: 0; }
.phase2-notice-inline strong, .phase2-notice-inline span, .phase2-public-chat-content strong, .phase2-public-chat-content span { display: block; }
.phase2-notice-inline span, .phase2-public-chat-content span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.phase2-notice-inline button, .phase2-public-chat-content button { flex: 0 0 auto; border: 0; border-radius: 9px; padding: 7px 9px; cursor: pointer; background: var(--accent); color: #062219; font-weight: 700; }
.phase2-publication-inline, .phase2-public-chat-content > button { width: 100%; min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: #101b21; color: var(--text); text-align: left; cursor: pointer; }
.phase2-publication-inline.highlighted { border-color: rgba(34,201,130,.65); background: linear-gradient(135deg,rgba(34,201,130,.13),#101b21); }
.phase2-publication-inline strong, .phase2-publication-inline small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phase2-publication-inline small { color: var(--muted); margin-top: 3px; }
.phase2-publication-inline b { font-size: 10px; border-radius: 999px; padding: 4px 7px; background: rgba(255,190,70,.15); color: #ffd47b; }
.phase2-publication-modal .modal-body { display: grid; gap: 14px; }
.phase2-publication-media { width: 100%; max-height: 55vh; object-fit: contain; border-radius: 13px; background: #071116; }
.phase2-publication-body { white-space: pre-wrap; line-height: 1.55; }
.phase2-reactions { display: flex; gap: 7px; }
.phase2-reactions button { border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); color: var(--text); padding: 7px 11px; cursor: pointer; }
.phase2-poll-card { display: grid; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #0d181e; }
.phase2-poll-card h3, .phase2-poll-card p { margin: 0; }
.phase2-poll-options { display: grid; gap: 7px; }
.phase2-poll-options label { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.phase2-admin-list { display: grid; gap: 9px; margin: 10px 0 20px; }
.phase2-admin-list > article { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #101a20; }
.phase2-admin-list > article > div:first-child { min-width: 0; }
.phase2-admin-list strong, .phase2-admin-list small { display: block; }
.phase2-admin-list small { color: var(--muted); margin-top: 3px; }
.phase2-admin-list p { margin: 6px 0 0; white-space: pre-wrap; }
.official-toggle-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 8px; margin-top: 12px; }
.official-toggle-grid label { padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: #101a20; }
.feature-rule-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 10px; }
.feature-rule-card { padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #101a20; }
.phase2-flash-publications, .phase2-profile-publications, .phase2-topic-publications { padding-left: 0; padding-right: 0; }
.admin-tabs { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px; }
.admin-tabs .chip { flex: 0 0 auto; }
.danger-text { color: #ff8790; }
.official-profile-preview { border: 1px solid rgba(34,201,130,.5); border-radius: 15px; padding: 14px; background: linear-gradient(135deg,rgba(34,201,130,.12),#101a20); }
@media (max-width: 760px) {
  .phase2-admin-list > article { align-items: stretch; flex-direction: column; }
  .phase2-admin-list .admin-actions { justify-content: flex-start; flex-wrap: wrap; }
  .phase2-notice-inline { align-items: flex-start; flex-wrap: wrap; }
}
.official-name-badge { display: inline-flex; align-items: center; gap: 3px; margin-left: 5px; padding: 2px 6px; border-radius: 999px; background: rgba(34,201,130,.15); color: #71e3b2; font-size: 10px; font-style: normal; vertical-align: middle; }

/* Fase 2 — fixação administrativa visível */
.admin-content-pinned { position: relative; box-shadow: inset 3px 0 0 var(--accent); }
.message-row.admin-content-pinned .message-bubble { outline: 1px solid rgba(34, 201, 130, .55); }
.admin-pin-badge { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 6px; padding: 3px 7px; border-radius: 999px; background: rgba(34, 201, 130, .13); color: #75e3b1; font-size: 10px; font-weight: 700; }

/* 2.9.7 - envios oficiais, limites legíveis e gestão de visitantes */
.inline-information { width: 25px; height: 25px; flex: 0 0 25px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.035); color: var(--muted); cursor: pointer; padding: 0; }
.inline-information:hover, .inline-information:focus-visible { color: var(--accent); border-color: rgba(34,201,130,.55); background: rgba(34,201,130,.09); }
.field-label-with-help, .feature-title-with-help { display: flex; align-items: center; gap: 7px; }
.feature-title-with-help { min-width: 0; }
.feature-description, .setting-explanation { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; margin: 0 0 9px; }
.admin-setting-card { padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #101a20; }
.admin-readable-settings { margin-bottom: 13px; }
.setting-value-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; }
.setting-value-row > span { color: var(--muted); font-size: 12px; }

.visitor-platform-badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; background: #111d23; color: var(--muted); font-size: 10px; font-style: normal; font-weight: 700; vertical-align: middle; }
.visitor-platform-badge.compact { width: 23px; height: 23px; padding: 0; justify-content: center; margin-right: 5px; }
.visitor-platform-badge.ios { color: #e7edf0; }
.visitor-platform-badge.android { color: #8ee5a8; }
.visitor-platform-badge.windows { color: #82c7ff; }
.visitor-platform-badge.desktop { color: #c5b7ff; }
.visitor-platform-badge.unknown { color: #a9b7be; }
.conversation-top strong, .chat-title strong { display: flex; align-items: center; min-width: 0; }

.public-link-copy-row { grid-template-columns: minmax(0,1fr) auto auto; }

.campaign-type-selector { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-bottom: 12px; }
.campaign-type-card { position: relative; display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #101a20; cursor: pointer; }
.campaign-type-card input { position: absolute; top: 9px; right: 9px; }
.campaign-type-card strong { display: flex; align-items: center; gap: 7px; padding-right: 22px; }
.campaign-type-card small { color: var(--muted); line-height: 1.35; }
.campaign-type-card:has(input:checked) { border-color: rgba(34,201,130,.7); background: rgba(34,201,130,.1); box-shadow: inset 0 0 0 1px rgba(34,201,130,.18); }
.campaign-poll-fields { display: grid; gap: 10px; padding: 13px; margin: 11px 0; border: 1px solid rgba(34,201,130,.35); border-radius: 14px; background: rgba(34,201,130,.045); }
.campaign-poll-fields h3 { margin: 0; }
.campaign-type-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 13px; }
.campaign-type-legend > span { display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; }
.campaign-kind { display: inline-flex !important; width: fit-content; margin-bottom: 6px; padding: 3px 7px; border-radius: 999px; background: rgba(34,201,130,.13); color: #75e3b1 !important; font-size: 10px; font-weight: 800; }
.campaign-admin-card.type-notice .campaign-kind { background: rgba(229,173,69,.14); color: #ffd487 !important; }
.campaign-admin-card.type-poll .campaign-kind { background: rgba(115,151,255,.14); color: #aabfff !important; }
.campaign-results-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.campaign-result-poll { display: grid; gap: 7px; margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #101a20; }
.campaign-result-poll h3 { margin: 0 0 4px; }
.campaign-result-poll > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.05); }

.official-campaign-badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin-bottom: 7px; padding: 4px 8px; border-radius: 999px; background: rgba(34,201,130,.13); color: #75e3b1; font-size: 10px; }
.campaign-poll-card { min-width: min(330px,70vw); display: grid; gap: 10px; margin-bottom: 8px; padding: 12px; border: 1px solid rgba(115,151,255,.42); border-radius: 14px; background: linear-gradient(145deg,rgba(94,119,205,.13),rgba(13,24,30,.96)); }
.campaign-poll-card header { display: grid; gap: 4px; }
.campaign-poll-card header > span { display: flex; align-items: center; gap: 5px; color: #aabfff; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.campaign-poll-card header p { margin: 0; color: var(--muted); font-size: 12px; }
.campaign-poll-options { display: grid; gap: 7px; }
.campaign-poll-option { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 8px; overflow: hidden; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0,0,0,.12); cursor: pointer; }
.campaign-poll-option.selected { border-color: rgba(115,151,255,.65); }
.campaign-poll-option > span { position: relative; z-index: 1; display: grid; gap: 2px; }
.campaign-poll-option small { color: var(--muted); }
.campaign-poll-option i { position: absolute; z-index: 0; inset: 0 auto 0 0; width: var(--poll-progress); background: rgba(115,151,255,.1); pointer-events: none; }
.campaign-poll-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }

.admin-public-chat-toolbar { display: grid; grid-template-columns: minmax(220px,1fr) minmax(180px,.65fr) 150px auto; gap: 8px; margin: 12px 0; }
.admin-public-chat-list { display: grid; gap: 9px; }
.admin-public-chat-card { display: grid; grid-template-columns: minmax(210px,1fr) minmax(170px,.7fr) minmax(230px,1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #101a20; }
.admin-public-chat-card.deleted { opacity: .78; border-color: rgba(255,90,105,.38); }
.admin-public-chat-identity { display: flex; align-items: center; gap: 9px; min-width: 0; }
.admin-public-chat-identity > div, .admin-public-chat-owner, .admin-public-chat-preview { min-width: 0; display: grid; gap: 3px; }
.admin-public-chat-identity strong, .admin-public-chat-owner strong, .admin-public-chat-preview span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.admin-public-chat-identity small, .admin-public-chat-owner span, .admin-public-chat-owner small, .admin-public-chat-preview small { color: var(--muted); font-size: 11px; }
.admin-public-chat-preview em { color: #ff9aa3; font-size: 10px; }
.public-chat-admin-summary { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: #101a20; }
.admin-public-chat-transcript { display: grid; gap: 8px; margin-top: 12px; }
.admin-public-chat-transcript article { max-width: 82%; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: #101a20; }
.admin-public-chat-transcript article.owner { margin-left: auto; background: #0d3428; }
.admin-public-chat-transcript article.deleted { border-color: rgba(255,90,105,.45); }
.admin-public-chat-transcript header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.admin-public-chat-transcript time { color: var(--muted); font-size: 10px; }

@media (max-width: 900px) {
  .admin-public-chat-card { grid-template-columns: 1fr 1fr; }
  .admin-public-chat-card .admin-actions { grid-column: 1/-1; }
  .admin-public-chat-toolbar { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .campaign-type-selector { grid-template-columns: 1fr; }
  .public-link-copy-row { grid-template-columns: 1fr 1fr; }
  .public-link-copy-row .input { grid-column: 1/-1; }
  .admin-public-chat-toolbar, .admin-public-chat-card { grid-template-columns: 1fr; }
  .admin-public-chat-card .admin-actions { grid-column: auto; }
  .campaign-poll-card { min-width: 0; width: min(100%,calc(100vw - 70px)); }
}


/* 2.9.7 - ciclo de chamadas robusto e interface fluida */
.chat-shell,
.sidebar,
.chat-area,
.conversation-list,
.messages,
.public-chat-messages {
  contain: layout paint;
}

.conversation-list,
.messages,
.public-chat-messages,
.modal-body,
.admin-content {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.conversation-item,
.message-row,
.public-chat-message,
.call-history-row,
.admin-public-chat-card {
  contain: layout style paint;
}

.call-backdrop {
  isolation: isolate;
  touch-action: manipulation;
}

.call-backdrop[hidden],
.call-backdrop.call-ending {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  .modal-backdrop:not(.call-backdrop) {
    backdrop-filter: none;
  }

  .conversation-item,
  .message-row,
  .public-chat-message {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* 2.9.7 - compartilhamento do app, permissões obrigatórias e gestão administrativa */
.app-share-profile-card {
  margin: 12px 0 16px;
  padding: 13px;
  border: 1px solid rgba(88, 166, 255, .38);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(34, 119, 238, .12), rgba(34, 201, 130, .06));
  display: grid;
  gap: 10px;
}
.app-share-profile-card > div { display: grid; gap: 4px; }
.app-share-profile-card strong { font-size: 14px; }
.app-share-profile-card small { color: var(--muted); line-height: 1.4; }
.permission-summary {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: #101a20;
}
.permission-summary > span { display: grid; gap: 3px; }
.permission-summary small { color: var(--muted); line-height: 1.35; }
.permission-summary.attention { border-color: rgba(255, 185, 71, .48); background: rgba(255, 185, 71, .08); color: #ffd08a; }
.permission-summary.complete { border-color: rgba(34, 201, 130, .45); background: rgba(34, 201, 130, .08); color: #83e7b8; }
.required-permission-modal { max-height: min(92dvh, 820px); overflow: auto; }
.required-permission-backdrop { z-index: 1200; }
.reserved-username-create {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(240px, 1.4fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
}
.reserved-username-list { display: grid; gap: 8px; }
.reserved-username-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101a20;
}
.reserved-username-card > div { min-width: 0; display: grid; gap: 3px; }
.reserved-username-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reserved-username-card small { color: var(--muted); }
@media (max-width: 760px) {
  .reserved-username-create { grid-template-columns: 1fr; }
  .reserved-username-card { align-items: flex-start; flex-direction: column; }
}

.message-external-link {
  color: #6eb6ff;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
  -webkit-touch-callout: default;
  user-select: text;
}
.message-row.mine .message-external-link,
.public-chat-message.outgoing .message-external-link { color: #6eb6ff; }
.message-external-link:visited { color: #6eb6ff; }
.message-external-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 3px; }
.custom-link-display { display: inline-block; max-width: 100%; font-weight: 600; overflow-wrap: anywhere; }

/* 2.9.7 - API externa, widget e links personalizados */
.attachment-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.attachment-choice{border:1px solid var(--line);border-radius:14px;background:var(--panel-2);color:var(--text);padding:15px;display:flex;align-items:center;gap:12px;text-align:left;cursor:pointer}.attachment-choice:hover{border-color:var(--accent);background:rgba(34,201,130,.08)}.attachment-choice span{display:flex;flex-direction:column;gap:3px}.attachment-choice small{color:var(--muted)}
.custom-link-safety-note,.api-security-warning,.api-secret-once{display:flex;gap:10px;align-items:flex-start;padding:12px;border-radius:13px;background:rgba(34,201,130,.1);border:1px solid rgba(34,201,130,.22);color:var(--text)}
.api-integration-modal .modal-body{display:block}.api-create-grid{display:grid;grid-template-columns:1fr 1.4fr auto;gap:10px;align-items:end;margin-bottom:18px}.api-credential-list{display:grid;gap:9px}.api-credential-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--line);border-radius:13px;background:var(--panel-2)}.api-credential-card.revoked{opacity:.64}.api-credential-card>div:first-child{display:flex;flex-direction:column;gap:4px;min-width:0}.api-credential-card code{word-break:break-all;color:#75e3b1}.api-credential-card small{color:var(--muted)}.api-credential-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.api-docs{margin:18px 0;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#0e181e}.api-docs summary{padding:13px 15px;cursor:pointer;font-weight:700;background:var(--panel-2)}.api-docs-body{padding:15px}.api-docs pre{max-height:330px;overflow:auto;padding:12px;border-radius:10px;background:#071015;color:#bdebd7;white-space:pre-wrap;word-break:break-word}.api-route-list{display:grid;gap:5px}.api-route-list code{display:block;padding:8px;border-radius:8px;background:#101d24;color:#75e3b1}.api-log-list{display:grid;gap:5px}.api-log-list>div{display:flex;justify-content:space-between;gap:12px;padding:8px 10px;border-bottom:1px solid var(--line)}.api-log-list span{color:var(--muted);font-size:12px}.api-secret-once code{display:block;margin-top:8px;padding:10px;border-radius:8px;background:#071015;color:#75e3b1;word-break:break-all;user-select:text}
@media(max-width:760px){.api-create-grid{grid-template-columns:1fr}.attachment-choice-grid{grid-template-columns:1fr}.custom-link-card{min-width:0;width:100%}.api-credential-card{align-items:flex-start;flex-direction:column}.api-credential-actions{justify-content:flex-start}.api-log-list>div{flex-direction:column;gap:3px}}

/* 2.9.7 - editor centralizado de fotos de perfil e grupos */
.avatar img { object-position: center center; }
.avatar-editor-hint { margin: -9px auto 16px; max-width: 360px; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: center; }
.group-photo-editor { margin-top: 4px; }
body.avatar-cropper-open { overflow: hidden !important; touch-action: none; }
.avatar-cropper-host { position: fixed; z-index: 15000; inset: 0; font-family: inherit; color: var(--text); user-select: none; -webkit-user-select: none; }
.avatar-cropper-backdrop { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.82); }
.avatar-cropper-modal { width: min(480px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow: auto; border: 1px solid rgba(255,255,255,.12); border-radius: 20px; background: #111b21; box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.avatar-cropper-modal > header { min-height: 66px; padding: 10px 12px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); background: #f7f7f7; color: #111; }
.avatar-cropper-modal > header > div { min-width: 0; display: grid; gap: 2px; }
.avatar-cropper-modal > header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-cropper-modal > header small { color: #555; font-size: 12px; }
.avatar-cropper-modal > header .icon-btn { color: #222; }
.avatar-cropper-modal > header .crop-confirm { white-space: nowrap; }
.avatar-cropper-stage { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; background: #737373; }
.avatar-cropper-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.avatar-cropper-stage canvas:active { cursor: grabbing; }
.avatar-cropper-mask { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.avatar-cropper-mask::before { content: ''; position: absolute; inset: 7%; border: 2px solid rgba(255,255,255,.95); border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.3) inset; }
.avatar-cropper-mask::after { content: ''; position: absolute; inset: calc(7% + 1px); border-radius: 50%; background: linear-gradient(90deg, transparent 33.1%, rgba(255,255,255,.2) 33.3%, rgba(255,255,255,.2) 33.7%, transparent 33.9%, transparent 66.1%, rgba(255,255,255,.2) 66.3%, rgba(255,255,255,.2) 66.7%, transparent 66.9%), linear-gradient(0deg, transparent 33.1%, rgba(255,255,255,.2) 33.3%, rgba(255,255,255,.2) 33.7%, transparent 33.9%, transparent 66.1%, rgba(255,255,255,.2) 66.3%, rgba(255,255,255,.2) 66.7%, transparent 66.9%); opacity: .55; }
.avatar-cropper-controls { padding: 14px 16px 8px; display: grid; grid-template-columns: 42px minmax(0,1fr) 42px auto; align-items: center; gap: 10px; }
.avatar-cropper-controls input[type='range'] { width: 100%; accent-color: var(--accent); }
.crop-zoom-button { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 25px; line-height: 1; cursor: pointer; }
.crop-zoom-button:active { transform: scale(.96); }
.avatar-cropper-modal > p { margin: 0; padding: 0 18px 16px; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: center; }
@media (max-width: 560px) {
  .avatar-cropper-backdrop { padding: 0; align-items: stretch; }
  .avatar-cropper-modal { width: 100%; max-height: 100dvh; min-height: 100dvh; border: 0; border-radius: 0; display: flex; flex-direction: column; }
  .avatar-cropper-modal > header { padding-top: max(10px, env(safe-area-inset-top)); }
  .avatar-cropper-stage { margin: auto 0; }
  .avatar-cropper-controls { grid-template-columns: 42px minmax(0,1fr) 42px; padding-bottom: 6px; }
  .crop-reset { grid-column: 1 / -1; }
  .avatar-cropper-modal > p { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
}

/* 2.9.7 - gesto de arrastar para a direita e responder */
.message-row[data-message-id] {
  touch-action: pan-y;
  isolation: isolate;
}
.message-row[data-message-id] .message-bubble {
  z-index: 1;
  transform: translate3d(0, 0, 0);
}
.swipe-reply-indicator {
  position: absolute;
  left: -38px;
  top: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(17, 27, 33, .94);
  border: 1px solid rgba(34, 201, 130, .3);
  opacity: 0;
  transform: translate3d(-8px, -50%, 0) scale(.82);
  transition: opacity 120ms ease, transform 120ms ease, background 120ms ease;
  pointer-events: none;
  z-index: 0;
}
.message-row.swipe-reply-active .swipe-reply-indicator {
  opacity: .7;
  transform: translate3d(0, -50%, 0) scale(.92);
}
.message-row.swipe-reply-ready .swipe-reply-indicator {
  opacity: 1;
  color: #05271e;
  background: var(--accent);
  transform: translate3d(0, -50%, 0) scale(1);
}
@media (hover: hover) and (pointer: fine) {
  .swipe-reply-indicator { display: none; }
}

/* Responder por gesto também no atendimento público */
.public-chat-message {
  position: relative;
  touch-action: pan-y;
}
.public-chat-swipe-wrap {
  position: relative;
  display: flex;
  max-width: min(78%, 680px);
  min-width: 82px;
  isolation: isolate;
}
.public-chat-swipe-wrap .public-chat-bubble {
  max-width: 100%;
  min-width: 82px;
  z-index: 1;
  transform: translate3d(0, 0, 0);
}
.public-reply-host:empty { display: none; }
.public-reply-host {
  flex: 0 0 auto;
  padding: 0 max(10px, calc((100vw - 920px) / 2));
  background: #111b21;
}
.public-reply-host .reply-preview { margin: 7px 0 0; }
.public-reply-quote { max-width: 100%; }
@media (max-width: 680px) {
  .public-chat-swipe-wrap { max-width: 88%; }
}

/* 2.9.7 - compartilhamento de localização */
.message-location-card{min-width:min(310px,72vw);display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px 12px;border:1px solid rgba(110,182,255,.28);border-radius:13px;background:rgba(18,39,54,.72);color:#6eb6ff;text-decoration:none!important;cursor:pointer}.message-location-card:visited{color:#6eb6ff}.message-location-card:hover{border-color:rgba(110,182,255,.58);background:rgba(18,48,68,.82)}.message-location-icon{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;color:#fff;background:rgba(39,132,216,.9)}.message-location-card>span:nth-child(2){min-width:0;display:grid;gap:3px}.message-location-card strong{color:#e9f5ff;font-size:13px}.message-location-card small{color:#a8c5d8;font-size:10px;line-height:1.35;overflow-wrap:anywhere}.message-location-open{transform:rotate(180deg);opacity:.8}.message-row.mine .message-location-card,.public-chat-message.outgoing .message-location-card{background:rgba(12,70,54,.72);border-color:rgba(111,224,177,.32)}.message-row.mine .message-location-icon,.public-chat-message.outgoing .message-location-icon{background:rgba(34,201,130,.9)}@media(max-width:480px){.message-location-card{min-width:min(270px,76vw);grid-template-columns:40px minmax(0,1fr) auto;padding:10px}.message-location-icon{width:38px;height:38px}}

/* 2.9.7 - edição explícita das origens da API */
.api-origin-editor{display:grid;gap:7px;margin-top:9px;padding-top:9px;border-top:1px solid var(--line)}
.api-origin-editor label{font-weight:700;font-size:12px;color:var(--text)}
.api-origin-editor .textarea{min-height:86px;resize:vertical}
.api-origin-editor .btn{justify-self:start}
.api-credential-main{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}
@media(max-width:760px){.api-origin-editor,.api-origin-editor .btn{width:100%}.api-origin-editor .btn{justify-self:stretch}}


/* Perfil organizado em páginas separadas e seleção de texto no computador */
.profile-navigation-modal { width: min(620px, calc(100vw - 24px)); }
.profile-account-summary { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 16px; padding: 14px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, rgba(34,201,130,.08), rgba(16,26,32,.96)); }
.profile-identity-grid { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.profile-identity-card { min-width: 0; position: relative; display: grid; gap: 4px; padding: 12px 38px 12px 13px; border: 1px solid var(--line); border-radius: 13px; background: #0d171d; color: var(--text); text-align: left; cursor: pointer; }
.profile-identity-card:hover { border-color: rgba(34,201,130,.55); background: #101d24; }
.profile-identity-card span { color: var(--muted); font-size: 11px; }
.profile-identity-card strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-identity-card > svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--accent); }
.profile-navigation-list { display: grid; gap: 8px; }
.profile-navigation-button { width: 100%; display: grid; grid-template-columns: 42px minmax(0,1fr) 24px; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); color: var(--text); text-align: left; cursor: pointer; }
.profile-navigation-button > svg:first-child { width: 42px; height: 42px; padding: 10px; border-radius: 12px; background: rgba(34,201,130,.11); color: var(--accent); }
.profile-navigation-button span { min-width: 0; display: grid; gap: 3px; }
.profile-navigation-button strong { font-size: 14px; }
.profile-navigation-button small { color: var(--muted); line-height: 1.35; }
.profile-navigation-button:hover { border-color: rgba(34,201,130,.48); transform: translateY(-1px); }
.profile-navigation-arrow { transform: rotate(180deg); color: var(--muted); }
.profile-navigation-button.danger { border-color: rgba(255,93,108,.2); color: #ff8994; }
.profile-navigation-button.danger > svg:first-child { background: rgba(255,93,108,.12); color: #ff8994; }
.profile-settings-section { padding: 13px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 14px; background: #101a20; }
.profile-settings-section > h3 { margin-top: 0; }
.profile-form-entry { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; }
.profile-form-entry > svg { color: var(--accent); }
.profile-form-entry > div { min-width: 0; display: grid; gap: 3px; }
.profile-form-entry small { color: var(--muted); line-height: 1.4; }
.privacy-navigation-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #101a20; }
.privacy-navigation-card > div { min-width: 0; display: flex; align-items: center; gap: 10px; }
.privacy-navigation-card > div > svg { color: var(--accent); flex: 0 0 auto; }
.privacy-navigation-card span { min-width: 0; display: grid; gap: 3px; }
.privacy-navigation-card small { color: var(--muted); line-height: 1.35; }
.username-edit-field { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 8px; }
.username-edit-field > span { color: var(--accent); font-size: 20px; font-weight: 800; }
.mobile-profile-account-summary { margin: 0 12px 12px; }

@media (max-width: 640px) {
  .profile-account-summary { grid-template-columns: 1fr; justify-items: center; }
  .profile-identity-grid { width: 100%; grid-template-columns: 1fr 1fr; }
  .profile-form-entry { grid-template-columns: auto minmax(0,1fr); }
  .profile-form-entry .btn { grid-column: 1 / -1; width: 100%; }
  .privacy-navigation-card { align-items: stretch; flex-direction: column; }
  .privacy-navigation-card .btn { width: 100%; }
}

@media (hover: hover) and (pointer: fine) {
  html, body, #app, .chat-shell, .public-chat-shell {
    -webkit-user-select: auto;
    user-select: auto;
    -webkit-touch-callout: default;
  }
  .message-bubble, .message-text, .sender-name, .reply-quote, .system-message,
  .member-row, .user-result, .user-info, .profile-lines, .chat-title,
  .conversation-info-head, .modal-body p, .modal-body small, .modal-body strong,
  .notification-device-card, .privacy-fact-card, .selectable-content, code, pre {
    -webkit-user-select: text;
    user-select: text;
  }
  button, [role="button"], .conversation-item, .message-menu-button, .message-actions,
  .profile-navigation-button, .profile-identity-card {
    -webkit-user-select: none;
    user-select: none;
  }
  input, textarea, select, [contenteditable="true"], .public-link-copy-row input {
    -webkit-user-select: text;
    user-select: text;
  }
}

/* Perfil: foto editável e painel administrativo persistente */
.profile-avatar-edit-button {
  position: relative;
  display: grid;
  place-items: center;
  width: max-content;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.profile-avatar-edit-button > span:last-child {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 3px solid var(--panel);
  border-radius: 50%;
  background: var(--accent);
  color: #05271e;
  box-shadow: 0 6px 16px rgba(0,0,0,.28);
}
.profile-avatar-edit-button:hover .avatar { box-shadow: 0 0 0 3px rgba(34,201,130,.28); }
.profile-avatar-edit-button:focus-visible { outline: 3px solid rgba(34,201,130,.5); outline-offset: 4px; }

.admin-submodal-layer > .modal-backdrop { z-index: 1300; }
.admin-user-bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-2);
}
.admin-user-bulk-toolbar label,
.admin-user-bulk-toolbar > div { display: flex; align-items: center; gap: 10px; }
.admin-user-bulk-toolbar input[type=checkbox],
.admin-user-select-column input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.admin-user-select-column { width: 42px; min-width: 42px; text-align: center; }
.admin-bulk-user-list {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 7px;
  margin: 12px 0 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0,0,0,.12);
}
.admin-bulk-user-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 9px; border-radius: 9px; background: var(--panel-2); }
.admin-bulk-user-list span { color: var(--muted); }

@media (max-width: 640px) {
  .admin-user-bulk-toolbar { align-items: stretch; flex-direction: column; }
  .admin-user-bulk-toolbar > div { justify-content: space-between; }
  .admin-user-bulk-toolbar .btn { flex: 1; }
}

/* Aplicativo Android 3.0.0: frontend empacotado localmente. */
html.native-android-app,
html.native-android-app body { min-height: 100%; overscroll-behavior: none; }
html.native-android-app body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
html.native-android-app #admin-btn,
html.native-android-app [data-device-action="install"],
html.native-android-app .pwa-install-only { display: none !important; }
html.native-android-app .chat-shell { height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }


/* Arroba Chat Android 3.2.0 — atalhos e filtros sempre visíveis no cliente nativo */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  html.native-android-app .sidebar .sidebar-shortcuts { display: grid !important; }
  html.native-android-app .sidebar .conversation-filters:not([hidden]) { display: flex !important; }
  html.native-android-app .sidebar .conversation-filters[hidden] { display: none !important; }
}

/* Arroba Chat Android 3.2.3 — gravação por gesto no estilo de mensageiro nativo */
.voice-recorder {
  --cancel-progress: 0;
  --lock-progress: 0;
  transition: transform .06s linear, box-shadow .16s ease, border-color .16s ease;
  will-change: transform;
}
.recording-status {
  min-width: 60px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}
.recording-status #recording-timer { min-width: 40px; }
.recording-slide-cancel {
  min-width: 132px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #b9c5ca;
  font-size: 11px;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}
.recording-slide-cancel .recording-slide-arrow {
  animation: recordingSlideLeft 1.05s ease-in-out infinite;
}
.voice-recorder.cancelling {
  border-color: rgba(255,93,108,.48);
  box-shadow: 0 0 0 1px rgba(255,93,108,.24), 0 8px 24px rgba(0,0,0,.28);
}
.voice-recorder.cancelling .recording-slide-cancel,
.voice-recorder.cancelling .recording-live-wave i { color: #ff7d89; }
.voice-recorder.cancelling .recording-slide-cancel { font-weight: 700; }
@keyframes recordingSlideLeft {
  0%, 100% { transform: translateX(3px); opacity: .55; }
  50% { transform: translateX(-4px); opacity: 1; }
}

.recording-lock-guide {
  right: 13px;
  bottom: 71px;
  width: 62px;
  height: 130px;
  padding: 8px 5px 9px;
  border-radius: 31px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  overflow: hidden;
  background: linear-gradient(180deg, #26343b, #172229);
}
.recording-lock-track {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.recording-lock-arrow {
  color: #dce7eb;
  animation: recordingLockRise 1.15s ease-in-out infinite;
}
.recording-lock-bubble {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #05271e;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(34,201,130,.10);
}
.recording-lock-guide > span:last-child {
  max-width: 52px;
  color: #aebbc2;
  font-size: 8px;
  line-height: 1.05;
  text-align: center;
}
.voice-recorder.locking + * { opacity: 1; }
@keyframes recordingLockRise {
  0%, 100% { transform: translateY(7px); opacity: .48; }
  55% { transform: translateY(-5px); opacity: 1; }
}

.voice-recorder.locked {
  right: 7px !important;
  left: 7px !important;
  display: grid;
  grid-template-columns: 42px auto 42px minmax(46px, 1fr) 42px;
  align-items: center;
  gap: 7px;
  padding: 0 7px;
  transform: none !important;
  border: 1px solid rgba(83,189,235,.18);
}
.voice-recorder.locked #cancel-recording { grid-column: 1; }
.voice-recorder.locked .recording-status { grid-column: 2; min-width: 56px; }
.voice-recorder.locked #pause-recording { grid-column: 3; }
.voice-recorder.locked .recording-live-wave { grid-column: 4; min-width: 44px; }
.voice-recorder.locked #send-recording { grid-column: 5; }
.voice-recorder.locked .recording-hint {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  transform: translateX(-50%);
  max-width: min(260px, 78vw);
  padding: 6px 10px;
  border-radius: 999px;
  background: #202c33;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 10px;
}
.voice-record-action.resume {
  color: #05271e;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(34,201,130,.12);
}
.composer.voice-recording #record-btn.locked {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 430px) {
  .recording-slide-cancel { min-width: 102px; font-size: 10px; }
  .recording-slide-cancel span { max-width: 82px; overflow: hidden; text-overflow: ellipsis; }
  .voice-recorder.locked { grid-template-columns: 40px 54px 40px minmax(38px, 1fr) 40px; gap: 5px; }
  .voice-recorder.locked .recording-status { gap: 6px; min-width: 52px; }
  .voice-recorder.locked .recording-live-wave { gap: 1px; }
}

@media (max-width: 360px) {
  .recording-slide-cancel span { display: none; }
  .recording-slide-cancel { min-width: 32px; }
  .voice-recorder.locked { grid-template-columns: 38px 48px 38px minmax(28px, 1fr) 38px; gap: 4px; }
}

/* 3.2.4 - Foto de perfil limpa, circular e sem elementos sobre a imagem */
.avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  line-height: 0;
}
.avatar {
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 1px 2px rgba(0,0,0,.22);
  isolation: isolate;
}
.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: 50% 50%;
  transform: none;
  user-select: none;
  -webkit-user-drag: none;
}
.official-avatar-badge { display: none !important; }
.avatar-wrap.official-avatar .avatar { box-shadow: 0 1px 2px rgba(0,0,0,.22) !important; }
.sidebar-header .profile-trigger .avatar { width: 46px; height: 46px; }

/* 3.2.5 — chamada minimizada, troca de câmera e modo PiP Android */
.call-modal header {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
}
.call-header-back {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #f4faf7;
  background: rgba(255,255,255,.08);
  cursor: pointer;
}
.call-header-back:active { transform: scale(.96); }
.call-header-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.call-header-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#switch-call-camera:disabled { opacity: .48; cursor: wait; }

.active-call-dock {
  position: fixed;
  z-index: 4900;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  top: calc(10px + env(safe-area-inset-top));
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 48px;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 10px;
  border: 1px solid rgba(34,201,130,.45);
  border-radius: 18px;
  background: rgba(17,27,33,.97);
  box-shadow: 0 12px 32px rgba(0,0,0,.42);
  backdrop-filter: blur(14px);
}
.active-call-dock-open {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) 28px;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.active-call-dock-open .avatar { width: 44px; height: 44px; }
.active-call-dock-open > span { min-width: 0; display: grid; gap: 3px; }
.active-call-dock-open strong,
.active-call-dock-open small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-call-dock-open small { color: var(--accent); font-size: 12px; }
.active-call-dock-end {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #e53945;
  transform: rotate(135deg);
  cursor: pointer;
}

html.call-pip-mode,
html.call-pip-mode body {
  width: 100%;
  height: 100%;
  overflow: hidden !important;
  background: #000 !important;
}
html.call-pip-mode #app,
html.call-pip-mode #toast-root,
html.call-pip-mode .active-call-dock { display: none !important; }
html.call-pip-mode #modal-root,
html.call-pip-mode .call-backdrop,
html.call-pip-mode .call-modal,
html.call-pip-mode .call-stage {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
html.call-pip-mode .call-modal header,
html.call-pip-mode .call-modal footer,
html.call-pip-mode #local-call-video { display: none !important; }
html.call-pip-mode #remote-call-video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

@media (max-width: 720px) {
  .call-modal header { grid-template-columns: 42px minmax(0,1fr); }
  .call-modal header > #call-status { grid-column: 2; margin-top: -7px; }
  .call-controls { gap: 9px !important; padding-left: 8px !important; padding-right: 8px !important; }
  .call-control, .call-end { width: 50px !important; height: 50px !important; }
  .active-call-dock { top: calc(7px + env(safe-area-inset-top)); }
}

/* Histórico paginado de mensagens 3.2.7 */
.message-history-loader {
  width: max-content;
  max-width: calc(100% - 32px);
  min-height: 34px;
  margin: 10px auto 14px;
  padding: 7px 13px;
  border: 1px solid var(--border, rgba(255,255,255,.1));
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel, #15232b) 90%, transparent);
  color: var(--muted, #9fb0ba);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 12px;
  box-shadow: 0 4px 18px rgba(0,0,0,.12);
}
button.message-history-loader.action {
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
button.message-history-loader.action:active { transform: scale(.97); }
.message-history-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: message-history-spin .75s linear infinite;
}
@keyframes message-history-spin { to { transform: rotate(360deg); } }
.message-load-error {
  min-height: 180px;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: var(--muted, #9fb0ba);
}
.message-load-error strong { color: var(--text, #eef6f8); font-size: 15px; }
.message-load-error span { max-width: 360px; line-height: 1.45; }

/* ARROBA CHAT 3.2.8 — editor de imagens e vídeos */
.video-record-trigger{color:var(--muted);touch-action:none}.video-record-trigger:active{color:var(--accent);transform:scale(.94)}
.media-source-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.media-source-grid .attachment-choice{min-height:92px}
.media-editor-backdrop{padding:0;background:rgba(0,0,0,.84)}
.media-editor-modal{width:min(760px,100vw);height:min(920px,100dvh);max-height:100dvh;border-radius:22px;overflow:hidden;background:#0b171d;display:flex;flex-direction:column}
.media-editor-header{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--border);background:#15252d}.media-editor-header>div{display:flex;flex-direction:column;min-width:0}.media-editor-header small{color:var(--muted);font-size:12px}
.image-editor-workspace,.video-editor-workspace{display:flex;flex-direction:column;gap:14px;padding:16px;overflow:auto;flex:1;min-height:0}
.image-crop-viewport{position:relative;width:min(100%,560px);max-height:62dvh;margin:auto;overflow:hidden;background:#020608;border-radius:16px;touch-action:none;box-shadow:0 0 0 1px rgba(255,255,255,.08)}
.image-crop-viewport:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,transparent 33.1%,rgba(255,255,255,.35) 33.3%,transparent 33.5%,transparent 66.4%,rgba(255,255,255,.35) 66.6%,transparent 66.8%),linear-gradient(transparent 33.1%,rgba(255,255,255,.35) 33.3%,transparent 33.5%,transparent 66.4%,rgba(255,255,255,.35) 66.6%,transparent 66.8%);opacity:.5}
.image-crop-viewport img{position:absolute;left:50%;top:50%;max-width:none;max-height:none;user-select:none;-webkit-user-drag:none;will-change:transform}
.image-editor-toolbar{display:flex;flex-direction:column;gap:12px}.image-editor-toolbar label{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:12px;color:var(--muted)}
.image-aspect-buttons{display:flex;gap:8px;overflow-x:auto}.image-aspect-buttons button{border:1px solid var(--border);background:#15252d;color:var(--muted);border-radius:999px;padding:8px 12px;white-space:nowrap}.image-aspect-buttons button.active{background:rgba(33,211,145,.18);border-color:var(--accent);color:var(--accent)}
.media-caption{min-height:62px;resize:none}.media-editor-note{font-size:12px;color:var(--muted);margin:0}
.video-editor-workspace video{width:100%;max-height:56dvh;background:#000;border-radius:16px;object-fit:contain}.video-trim-panel{display:flex;flex-direction:column;gap:10px;background:#12222a;border:1px solid var(--border);border-radius:16px;padding:14px}.video-trim-panel label{display:grid;grid-template-columns:55px 1fr;align-items:center;gap:10px;color:var(--muted)}.video-trim-panel input{width:100%}.video-trim-times{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px}.video-trim-times span{text-align:center;color:var(--muted);font-size:12px}.video-trim-times strong{color:var(--accent)}
.inline-video-recording-overlay{position:fixed;inset:0;z-index:99999;background:#000;display:flex;align-items:center;justify-content:center;overflow:hidden}.inline-video-recording-overlay video{width:100%;height:100%;object-fit:cover}.inline-video-recording-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.55),transparent 25%,transparent 70%,rgba(0,0,0,.65))}.inline-video-recording-overlay header{position:absolute;top:max(18px,env(safe-area-inset-top));left:18px;display:flex;align-items:center;gap:8px;color:#fff;font-size:17px}.inline-video-recording-instruction{position:absolute;bottom:max(82px,calc(env(safe-area-inset-bottom) + 72px));left:50%;transform:translateX(-50%);background:rgba(0,0,0,.55);color:#fff;border-radius:999px;padding:10px 16px;white-space:nowrap}.inline-video-recording-overlay>[data-cancel-inline-video]{position:absolute;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);border:0;border-radius:999px;padding:11px 18px;background:#d83b4e;color:#fff;display:flex;align-items:center;gap:8px;font-weight:700}
.native-video-message{position:relative;display:block;border:0;padding:0;background:#000;border-radius:12px;overflow:hidden;max-width:100%;cursor:pointer}.native-video-message .message-media{display:block;pointer-events:none}.native-video-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:rgba(0,0,0,.62);color:#fff;backdrop-filter:blur(4px)}
@media(max-width:640px){.media-source-grid{grid-template-columns:1fr}.media-editor-modal{border-radius:0;width:100vw;height:100dvh}.media-editor-header{padding-top:max(12px,env(safe-area-inset-top))}.image-editor-workspace,.video-editor-workspace{padding:12px}.image-crop-viewport{width:100%}.composer .video-record-trigger{display:inline-grid}}

/* ARROBA CHAT 3.2.9 - câmera interna e compositor dinâmico */
.composer .composer-camera-trigger{color:var(--muted)}
.composer .composer-camera-trigger:active{color:var(--accent);transform:scale(.94)}
.composer .composer-primary-action.text-send-mode{color:#05271e;background:var(--accent);box-shadow:0 5px 16px rgba(34,201,130,.2)}
.composer .composer-primary-action.text-send-mode:hover{filter:brightness(1.04)}
.composer.voice-recording #attach-btn,
.composer.voice-recording #message-input,
.composer.voice-recording #composer-camera-btn{visibility:hidden;pointer-events:none}
.composer.voice-recording #composer-action-btn{position:relative;z-index:12;visibility:visible;color:#fff!important;background:#e94f5f;box-shadow:0 0 0 7px rgba(233,79,95,.15)}
.composer.voice-recording .voice-recorder{right:59px}
body.camera-studio-open{overflow:hidden!important;overscroll-behavior:none}

.app-camera-studio,.camera-media-review{position:fixed;inset:0;z-index:100000;background:#000;color:#fff;display:flex;flex-direction:column;overflow:hidden;touch-action:none}
.app-camera-studio>[data-camera-preview]{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000}
.app-camera-studio>[data-camera-preview].front-camera{transform:scaleX(-1)}
.camera-studio-gradient{position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(0,0,0,.58) 0,transparent 22%,transparent 58%,rgba(0,0,0,.76) 100%)}
.camera-studio-top,.media-review-top{position:relative;z-index:4;display:grid;grid-template-columns:54px 1fr 86px;align-items:center;gap:10px;padding:max(14px,env(safe-area-inset-top)) 14px 12px}
.media-review-top strong{text-align:center;font-size:17px}.media-review-top>span{display:block}
.camera-round-button,.camera-side-button,.camera-flash-button{border:0;color:#fff;background:rgba(5,12,16,.48);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.camera-round-button{width:48px;height:48px;border-radius:50%;display:grid;place-items:center}
.camera-flash-button{justify-self:end;min-width:82px;height:42px;padding:0 12px;border-radius:999px;display:flex;align-items:center;justify-content:center;gap:6px;font-weight:700}
.camera-flash-button span{font-size:12px}.camera-flash-button.active{background:#fff;color:#101820}.camera-flash-button:disabled{opacity:.42}
.camera-recording-time{justify-self:center;background:rgba(210,40,57,.88);border-radius:999px;padding:7px 12px;font-variant-numeric:tabular-nums;font-weight:800}
.camera-gallery-strip{position:absolute;z-index:5;left:0;right:0;bottom:190px;display:flex;align-items:center;gap:8px;overflow-x:auto;padding:8px 14px;scrollbar-width:none;overscroll-behavior-x:contain;touch-action:pan-x}
.camera-gallery-strip::-webkit-scrollbar{display:none}
.camera-gallery-item,.camera-gallery-more{position:relative;flex:0 0 72px;width:72px;height:72px;border:2px solid rgba(255,255,255,.52);border-radius:10px;overflow:hidden;background:rgba(9,19,24,.72);color:#fff;padding:0}
.camera-gallery-item img{width:100%;height:100%;object-fit:cover;display:block}
.camera-gallery-more{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:11px;font-weight:700}
.camera-gallery-video-badge{position:absolute;right:3px;bottom:3px;display:flex;align-items:center;gap:3px;padding:2px 4px;border-radius:5px;background:rgba(0,0,0,.72);font-size:9px}
.camera-gallery-loading{flex:0 0 auto;border-radius:999px;background:rgba(0,0,0,.45);padding:7px 11px;font-size:12px}
.camera-studio-bottom{position:absolute;z-index:6;left:0;right:0;bottom:0;padding:12px 18px max(18px,env(safe-area-inset-bottom));background:linear-gradient(180deg,transparent,rgba(0,0,0,.74) 30%)}
.camera-capture-row{display:grid;grid-template-columns:64px 1fr 64px;align-items:center;justify-items:center;min-height:88px}
.camera-side-button{width:54px;height:54px;border-radius:50%;display:grid;place-items:center}.camera-side-button:disabled{opacity:.42}
.camera-shutter{width:78px;height:78px;border-radius:50%;border:4px solid #fff;background:transparent;padding:5px;display:grid;place-items:center;transition:transform .16s ease}
.camera-shutter>span{width:100%;height:100%;border-radius:50%;background:#fff;transition:.18s ease}
.app-camera-studio.is-recording .camera-shutter>span{width:34px;height:34px;border-radius:8px;background:#ef4456}
.app-camera-studio.is-recording .camera-shutter{transform:scale(.93)}
.app-camera-studio.is-paused .camera-shutter>span{background:#ff8b96}
.camera-mode-selector{display:flex;justify-content:center;align-items:center;gap:28px;height:36px}
.camera-mode-selector button{border:0;background:none;color:rgba(255,255,255,.68);font-weight:800;font-size:14px;padding:7px 12px;border-radius:999px}
.camera-mode-selector button.active{color:#fff;background:rgba(255,255,255,.18)}
.app-camera-studio.is-recording .camera-mode-selector{opacity:.42;pointer-events:none}

.camera-media-review{background:#071116;touch-action:auto}
.image-review-workspace{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:10px 14px 132px;overflow:auto}
.camera-media-review .image-crop-viewport{width:min(100%,560px);max-height:62dvh;background:#000;border-radius:12px;overflow:hidden;position:relative}
.camera-media-review .image-editor-toolbar{width:min(100%,560px)}
.media-review-bottom{position:absolute;z-index:5;left:0;right:0;bottom:0;display:grid;grid-template-columns:minmax(0,1fr) 58px;align-items:end;gap:10px;padding:12px 14px max(16px,env(safe-area-inset-bottom));background:linear-gradient(180deg,transparent,rgba(7,17,22,.96) 24%)}
.media-review-bottom textarea{min-height:46px;max-height:110px;resize:none;border:1px solid rgba(255,255,255,.18);border-radius:22px;background:rgba(32,44,51,.94);color:#fff;padding:12px 15px;font:inherit;outline:none}
.media-review-send{width:54px;height:54px;border:0;border-radius:50%;display:grid;place-items:center;color:#05271e;background:var(--accent);box-shadow:0 6px 18px rgba(34,201,130,.28)}
.media-review-send:disabled{opacity:.55}
.video-review-stage{position:relative;flex:1;min-height:0;display:grid;place-items:center;background:#000;margin-bottom:176px}
.video-review-stage video{width:100%;height:100%;max-height:calc(100dvh - 270px);object-fit:contain;background:#000}
.video-review-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:66px;height:66px;border:0;border-radius:50%;display:grid;place-items:center;color:#fff;background:rgba(0,0,0,.54);backdrop-filter:blur(7px)}
.video-review-play.playing{opacity:0;pointer-events:none}
.video-review-controls{position:absolute;z-index:6;left:12px;right:12px;bottom:92px}
.video-frame-timeline{position:relative;height:70px;border-radius:10px;overflow:hidden;background:#17242a;touch-action:none;box-shadow:0 0 0 2px rgba(255,255,255,.75)}
.video-frame-strip{position:absolute;inset:0;display:flex;overflow:hidden}
.video-frame-strip img{height:100%;flex:1 1 0;min-width:0;object-fit:cover}.video-frame-strip>span{margin:auto;color:#c7d2d7;font-size:12px}
.video-trim-dim{position:absolute;top:0;bottom:0;background:rgba(0,0,0,.62);pointer-events:none}.video-trim-dim.left{left:0}.video-trim-dim.right{right:0}
.video-trim-handle{position:absolute;top:0;bottom:0;width:18px;transform:translateX(-50%);border:0;background:#fff;z-index:4;touch-action:none}
.video-trim-handle::after{content:'';position:absolute;top:24px;left:6px;width:6px;height:22px;border-left:2px solid #111;border-right:2px solid #111}
.video-playhead{position:absolute;top:-6px;bottom:-6px;width:3px;transform:translateX(-50%);border:0;background:#25d366;z-index:5;padding:0;box-shadow:0 0 0 1px rgba(0,0,0,.3)}
.video-playhead::before{content:'';position:absolute;left:50%;top:-1px;transform:translate(-50%,-50%);width:10px;height:10px;border-radius:50%;background:#25d366}
.video-trim-times{display:grid;grid-template-columns:74px 1fr 74px;align-items:center;margin-top:7px;font-size:12px}.video-trim-times strong:last-child{text-align:right}.video-trim-times span{text-align:center;color:#d4dee2}

@media(max-width:640px){
  .composer.voice-recording .voice-recorder{right:57px;left:7px}
  .camera-studio-top,.media-review-top{padding-top:max(12px,env(safe-area-inset-top))}
  .camera-gallery-strip{bottom:182px}
  .camera-gallery-item,.camera-gallery-more{flex-basis:68px;width:68px;height:68px}
  .camera-shutter{width:72px;height:72px}
  .camera-side-button{width:50px;height:50px}
  .camera-media-review .image-crop-viewport{width:100%;max-height:60dvh;border-radius:8px}
}
/* Ajuste 3.2.9: legenda acima do botão circular de envio, igual à prévia da câmera */
.media-review-bottom{display:flex;flex-direction:column;align-items:stretch;gap:9px;padding:18px 14px max(14px,env(safe-area-inset-bottom))}
.media-review-actions{display:flex;justify-content:center;align-items:center}
.media-review-bottom textarea{width:100%;min-height:44px;max-height:92px}
.video-review-controls{bottom:154px}
.video-review-stage{margin-bottom:238px}
.image-review-workspace{padding-bottom:190px}

/* ARROBA CHAT 3.3.0 — mídia nativa, câmera centralizada e transição Foto/Vídeo */
.native-android-app .message-bubble .message-media{
  width:auto;
  min-width:120px;
  max-width:min(340px,72vw);
  max-height:440px;
  object-fit:contain;
  background:#071116;
}
.native-video-message{min-width:160px;min-height:120px}
.native-video-loading{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);padding:5px 9px;border-radius:999px;background:rgba(0,0,0,.58);color:#fff;font-size:11px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .18s ease}
.native-video-message.media-repairing .native-video-loading{opacity:1}
.native-video-message.media-ready .native-video-loading{display:none}

.camera-capture-row{position:relative;display:grid;grid-template-columns:64px minmax(88px,1fr) 64px;align-items:center;justify-items:center}
.camera-capture-row [data-camera-pause].hidden{display:grid!important;visibility:hidden;pointer-events:none}
.camera-capture-row [data-camera-pause]:not(.hidden){visibility:visible}
.camera-shutter{grid-column:2;justify-self:center;z-index:2}
.camera-side-button[data-camera-pause]{grid-column:1}
.camera-side-button[data-camera-flip]{grid-column:3}
.app-camera-studio.is-recording .camera-shutter{transform:scale(.93)}

.camera-mode-selector{position:relative;width:176px;height:40px;margin:2px auto 0;overflow:hidden;display:block}
.camera-mode-track{position:absolute;top:0;left:50%;display:flex;align-items:center;gap:22px;transform:translateX(-38px);transition:transform .26s cubic-bezier(.22,.78,.22,1);will-change:transform}
.app-camera-studio.mode-video .camera-mode-track{transform:translateX(-136px)}
.camera-mode-selector button{flex:0 0 76px;height:36px;transition:color .22s ease,background .22s ease,transform .22s ease,opacity .22s ease}
.camera-mode-selector button.active{transform:scale(1.04)}
.camera-mode-selector button:not(.active){opacity:.7}

html.call-pip-mode .video-call-waiting{display:none!important}
html.call-pip-mode #remote-call-video{display:block!important;background:#000}

/* 3.4.0 - mensagens automáticas e privacidade */
.automation-settings-modal .modal-body{display:grid;gap:14px}
.automation-section{display:grid;gap:12px;padding:14px;border:1px solid var(--border);border-radius:16px;background:color-mix(in srgb,var(--panel) 92%,transparent)}
.automation-section>.setting-row{margin:0}
.automation-delay-grid{display:grid;grid-template-columns:minmax(120px,1fr) minmax(140px,.7fr);gap:12px}
.automation-schedule-grid{display:grid;gap:8px}
.automation-schedule-row{display:grid;grid-template-columns:minmax(145px,1fr) 110px auto 110px;align-items:center;gap:9px;padding:9px 10px;border:1px solid var(--border);border-radius:12px}
.automation-schedule-row label{display:flex;align-items:center;gap:8px}
.automation-schedule-row .input{padding:8px 9px;min-height:38px}
@media(max-width:620px){.automation-delay-grid{grid-template-columns:1fr 1fr}.automation-schedule-row{grid-template-columns:1fr 1fr 22px 1fr}.automation-schedule-row label{grid-column:1/-1}}
