: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; }
.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: 820px) {
  .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); }
  .chat-shell.mobile-chat-open .sidebar { visibility: hidden; }
  .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); }
.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: 820px) {
  .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-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: 820px) {
  .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); }
