:root {
  --brand: #5b5fc7;
  --brand-2: #06b6d4;
  --brand-grad: linear-gradient(135deg, #5b5fc7, #4f8fd6);
  --rail: #ebebeb;
  --topbar: #ebebeb;
  --bg: #f5f5f5;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --mine: #e8ebfa;
  --mine-text: #242424;
  --theirs: #ffffff;
  --hover: #f0f0f0;
  --active: #ffffff;
  --danger: #dc2626;
  --ok: #16a34a;
  --warn: #f59e0b;
  --shadow: 0 10px 30px rgba(15, 23, 42, .12);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --rail: #0a0a0a;
  --topbar: #0a0a0a;
  --bg: #1f1f1f;
  --panel: #292929;
  --panel-2: #1f1f1f;
  --line: #3d3d3d;
  --text: #f0f0f0;
  --muted: #adadad;
  --mine: #2f2f4a;
  --mine-text: #f0f0f0;
  --theirs: #292929;
  --hover: #333333;
  --active: #3d3d3d;
  --shadow: 0 10px 30px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; fill: currentColor; }
a { color: var(--brand); }
:root[data-theme="dark"] a { color: #818cf8; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 600; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--brand-grad); color: #fff; border: 0; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); }
.btn.primary.danger-bg { background: var(--danger); }
.btn.block { width: 100%; padding: 11px; }
.btn:disabled { opacity: .6; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); }

input:not([type=checkbox]):not([type=radio]):not([type=file]), textarea, select {
  width: 100%; border: 1px solid var(--line); background: var(--panel-2); border-radius: 8px; padding: 9px 11px; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
label { display: block; font-weight: 600; font-size: 13px; margin: 10px 0; }
label > input, label > select { margin-top: 5px; font-weight: 400; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.form-error { color: var(--danger); min-height: 1em; margin: 6px 0; }

/* Login */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, rgba(79,70,229,.18), transparent 45%), radial-gradient(circle at 80% 90%, rgba(6,182,212,.18), transparent 45%), var(--bg); }
.auth-card { width: min(400px, 100%); background: var(--panel); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); }
.auth-logo { width: 240px; display: block; margin: 0 auto 18px; }
.auth h1 { font-size: 20px; margin: 0 0 4px; }

/* Layout estilo Teams */
.app { display: grid; grid-template-columns: 68px 320px 1fr auto; grid-template-rows: 48px 1fr; height: 100vh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 12px; background: var(--topbar); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; width: 376px; flex: none; min-width: 0; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.topbar input[type=search] { max-width: 560px; height: 32px; padding: 4px 12px; background: var(--panel); border-radius: 6px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.me { display: flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.me:hover { background: var(--hover); }
.me strong { font-weight: 600; font-size: 13px; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail { background: var(--rail); display: flex; flex-direction: column; align-items: center; padding: 6px 0; gap: 2px; border-right: 1px solid var(--line); }
.rail-spacer { flex: 1; }
.rail-btn { position: relative; width: 60px; height: 56px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; }
.rail-btn svg { width: 22px; height: 22px; }
.rail-btn:hover { color: var(--brand); background: var(--hover); }
.rail-btn.active { color: var(--brand); }
.rail-btn.active::before { content: ""; position: absolute; left: -4px; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: var(--brand); }
:root[data-theme="dark"] .rail-btn.active, :root[data-theme="dark"] .rail-btn:hover { color: #7f85f5; }
.rail-badge { position: absolute; top: 6px; right: 12px; background: #c4314b; color: #fff; font-style: normal; font-size: 10px; font-weight: 700; border-radius: 999px; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; }
.sidebar { background: var(--bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
:root:not([data-theme="dark"]) .sidebar { background: #f0f0f0; }
.side-header { display: flex; align-items: center; padding: 12px 10px 8px 16px; gap: 2px; }
.side-header h2 { flex: 1; margin: 0; font-size: 18px; }
.list { list-style: none; margin: 0; padding: 0 6px 12px; overflow-y: auto; flex: 1; }
.list-section { padding: 10px 10px 4px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.item:hover { background: var(--hover); }
.item.active { background: var(--active); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.item-body { flex: 1; min-width: 0; }
.item-top, .item-bottom { display: flex; align-items: baseline; gap: 6px; }
.item-name { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-time { font-size: 11px; color: var(--muted); flex: none; }
.item-preview { flex: 1; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.badge { background: #c4314b; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; min-width: 20px; text-align: center; flex: none; }
.connection { background: var(--warn); color: #111; text-align: center; padding: 6px; font-weight: 600; font-size: 12px; }

.avatar { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; background: var(--brand-grad); text-transform: uppercase; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.group { border-radius: 12px; }
.avatar.broadcast { border-radius: 12px; background: linear-gradient(135deg, #f59e0b, #ef4444); }
.avatar svg { width: 20px; height: 20px; }
/* Status: disponível, ausente, ocupado, não perturbe, offline */
.avatar[data-status]::after, .dot { content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--panel); background: #94a3b8; box-sizing: content-box; }
.avatar[data-status="available"]::after, .dot[data-status="available"] { background: #22c55e; }
.avatar[data-status="away"]::after, .dot[data-status="away"] { background: #f59e0b; }
.avatar[data-status="busy"]::after, .dot[data-status="busy"] { background: #dc2626; }
.avatar[data-status="dnd"]::after, .dot[data-status="dnd"] { background: #dc2626 linear-gradient(#fff, #fff) center / 7px 2px no-repeat; }
.avatar[data-status="offline"]::after { background: var(--panel); border-color: #94a3b8; width: 8px; height: 8px; border-width: 2px; }
.dot { position: relative; display: inline-block; right: auto; bottom: auto; margin-right: 6px; vertical-align: -1px; border: 0; }
.presence-picker { display: flex; flex-wrap: wrap; gap: 6px; }

/* Conversa */
.chat { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.empty-state { margin: auto; text-align: center; padding: 24px; max-width: 420px; }
.empty-state h2 { margin: 12px 0 4px; }
.chat-view { display: flex; flex-direction: column; height: 100%; position: relative; }
.chat-header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.chat-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back { display: none; }
.messages { flex: 1; overflow-y: auto; padding: 16px 6% 8px; display: flex; flex-direction: column; gap: 2px; }
.day { align-self: center; background: var(--panel); color: var(--muted); font-size: 12px; padding: 3px 12px; border-radius: 999px; margin: 12px 0 8px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.system { align-self: center; color: var(--muted); font-size: 12px; margin: 6px 0; text-align: center; }
.msg { display: flex; flex-direction: column; position: relative; max-width: min(640px, 78%); align-self: flex-start; margin-top: 6px; }
.msg.cont { margin-top: 0; }
.msg.mine { align-self: flex-end; }
.msg .sender { font-size: 12px; font-weight: 700; margin: 0 0 2px 10px; }
.bubble { position: relative; background: var(--theirs); padding: 7px 12px 6px; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.06); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine .bubble { background: var(--mine); color: var(--mine-text); }
.msg.urgent .bubble { border-left: 4px solid var(--danger); }
.urgent-tag { display: inline-block; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; margin-bottom: 4px; letter-spacing: .05em; }
.meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); margin-top: 2px; user-select: none; }
.msg.mine .meta { color: color-mix(in srgb, var(--mine-text) 60%, transparent); }
.ticks { font-weight: 700; letter-spacing: -3px; padding-right: 3px; }
.ticks.read { color: #0ea5e9; }
.deleted { font-style: italic; color: var(--muted); }
.msg-actions { position: absolute; top: 2px; right: 2px; display: none; }
.bubble:hover .msg-actions { display: block; }
.msg-actions button { border: 0; background: var(--panel); color: var(--muted); border-radius: 6px; cursor: pointer; padding: 1px 6px; font-size: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.file { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; background: rgba(127,127,127,.1); padding: 8px 10px; border-radius: 8px; margin-bottom: 4px; min-width: 220px; }
.file:hover { background: rgba(127,127,127,.18); }
.file-icon { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-grad); color: #fff; font-size: 10px; font-weight: 800; flex: none; }
.file-name { font-weight: 600; word-break: break-all; }
.file-size { font-size: 12px; color: var(--muted); }
.thumb { display: block; max-width: 320px; max-height: 260px; border-radius: 8px; margin-bottom: 4px; cursor: zoom-in; }
.load-more { align-self: center; margin: 4px 0 10px; }
.typing { height: 20px; padding: 0 6%; font-size: 12px; color: var(--muted); font-style: italic; }
.composer { display: flex; align-items: flex-end; gap: 6px; margin: 4px 6% 16px; padding: 6px 8px; background: var(--panel); border: 1px solid var(--line); border-bottom: 2px solid var(--brand); border-radius: 6px; }
.composer textarea { resize: none; max-height: 160px; border: 0; background: transparent; padding: 8px 6px; box-shadow: none !important; }
.send { color: var(--brand); }
.send:hover { color: var(--brand); }
.urgent { display: flex; align-items: center; gap: 4px; margin: 0 0 8px; font-size: 12px; color: var(--danger); white-space: nowrap; }
.readonly-note { padding: 14px; text-align: center; color: var(--muted); background: var(--panel); border-top: 1px solid var(--line); }
.drop-overlay { position: absolute; inset: 0; display: none; place-items: center; background: rgba(79,70,229,.12); border: 3px dashed var(--brand); font-size: 18px; font-weight: 700; color: var(--brand); pointer-events: none; }
.chat-view.dragging .drop-overlay { display: grid; }

/* Painel lateral */
.drawer { width: 320px; background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; padding: 16px; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.drawer h3 { margin: 0; font-size: 16px; }
.drawer .center { text-align: center; margin: 8px 0 16px; }
.drawer .center .avatar { width: 80px; height: 80px; font-size: 28px; margin: 0 auto 10px; }
.drawer-section { border-top: 1px solid var(--line); padding: 12px 0; }
.drawer-section h4 { margin: 0 0 8px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.member { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.member .grow { flex: 1; min-width: 0; }
.member small { color: var(--muted); display: block; }
.role-tag { font-size: 11px; color: var(--brand); font-weight: 700; }
.stack { display: flex; flex-direction: column; gap: 8px; }

/* Modais */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); width: min(520px, 100%); max-height: 90vh; display: flex; flex-direction: column; }
.modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 14px 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.modal.alert-modal .modal-head { background: var(--danger); color: #fff; border-radius: 14px 14px 0 0; }
.modal.alert-modal .modal-body { font-size: 16px; white-space: pre-wrap; }
.pick-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0; font-weight: 400; cursor: pointer; }
.pick:hover { background: var(--hover); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 12px; color: var(--muted); }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--hover); font-weight: 600; }
.pill.off { color: var(--danger); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.stat strong { display: block; font-size: 20px; }
.stat span { color: var(--muted); font-size: 12px; }
.addr { font-family: Consolas, monospace; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; display: inline-block; margin: 2px 4px 2px 0; }
.admin-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; z-index: 60; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 94vh; border-radius: 6px; }

.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 70; }
.toast { background: #0f172a; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); animation: pop .2s ease; }
.toast.error { background: var(--danger); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

@media (max-width: 1100px) { .drawer { position: fixed; right: 0; top: 0; bottom: 0; z-index: 40; box-shadow: var(--shadow); } }
@media (max-width: 760px) {
  .app { grid-template-columns: 56px 1fr; }
  .rail-btn { width: 50px; }
  .brand { width: auto; }
  .brand span { display: none; }
  .app.in-chat .rail { display: none; }
  .app.in-chat { grid-template-columns: 1fr; }
  .app.in-chat .sidebar { display: none; }
  .app:not(.in-chat) .chat { display: none; }
  .back { display: inline-grid; }
  .messages { padding: 12px 10px; }
  .drawer { width: 100%; }
}

.msg-row { display: flex; gap: 8px; align-items: flex-start; align-self: flex-start; max-width: min(720px, 82%); }
.msg-row .msg { max-width: 100%; }
.msg-row .avatar-slot { width: 32px; flex: none; }
.msg .sender { margin-left: 0; font-weight: 600; }
.msg .sender time { font-weight: 400; color: var(--muted); margin-left: 8px; font-size: 11px; }

/* Chamadas */
.call { position: fixed; inset: 48px 0 0 68px; z-index: 30; background: #141414; color: #fff; display: flex; flex-direction: column; }
.call.mini { inset: auto 16px 16px auto; width: 340px; height: 250px; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.call.mini .call-controls { padding: 6px; gap: 6px; }
.call.mini .call-btn { width: 38px; height: 38px; }
.call-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.call-head strong { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-head .icon-btn { color: #ddd; }
.call-head .icon-btn:hover { background: #333; color: #fff; }
.call-grid { flex: 1; min-height: 0; display: grid; gap: 8px; padding: 8px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); grid-auto-rows: minmax(0, 1fr); }
.call.mini .call-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); padding: 4px; gap: 4px; }
.tile { position: relative; background: #292929; border-radius: 10px; overflow: hidden; display: grid; place-items: center; min-height: 0; }
.tile video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.tile.no-video video { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tile .avatar { width: 88px; height: 88px; font-size: 30px; }
.tile:not(.no-video) .avatar { display: none; }
.call.mini .tile .avatar { width: 44px; height: 44px; font-size: 16px; }
.tile-name { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.6); padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.tile.me video { transform: scaleX(-1); }
.tile.me.sharing video { transform: none; }
.call-controls { display: flex; justify-content: center; gap: 12px; padding: 12px; }
.call-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: #3d3d3d; color: #fff; cursor: pointer; display: grid; place-items: center; }
.call-btn:hover { background: #4d4d4d; }
.call-btn.off { background: #fff; color: #242424; }
.call-btn.on { background: var(--brand); }
.call-btn.hangup { background: #c4314b; }
.call-btn.hangup:hover { background: #a4262c; }
.call-buttons { display: inline-flex; }
@media (max-width: 760px) { .call { inset: 0; } }

.auth-links { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; }
.auth-links a { text-decoration: none; }
.request-code { font: 700 34px/1.2 Consolas, monospace; letter-spacing: 4px; text-align: center; padding: 14px; border-radius: 10px; background: var(--active); border: 2px dashed var(--brand); margin: 8px 0; user-select: all; }
.info-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 13px; }
.info-grid dt { color: var(--muted); }
.info-grid dd { margin: 0; overflow-wrap: anywhere; font-family: Consolas, monospace; }
.session { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 6px; }
.master-code { font: 700 28px Consolas, monospace; letter-spacing: 3px; color: var(--brand); user-select: all; }

/* Responder, editar, reagir, mencionar */
.msg-actions { top: -16px; right: 8px; gap: 2px; background: var(--panel); border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.18); padding: 2px; z-index: 2; }
.bubble:hover .msg-actions, .msg-actions:has(.emoji-picker:not([hidden])) { display: flex; }
.msg-actions button { box-shadow: none; font-size: 14px; padding: 2px 7px; }
.msg-actions button:hover { background: var(--hover); color: var(--text); }
.emoji-picker { position: absolute; top: -40px; right: 0; display: flex; gap: 2px; background: var(--panel); border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.2); padding: 3px 6px; }
.emoji-picker[hidden] { display: none; }
.emoji-picker button { font-size: 18px; padding: 2px 4px; border-radius: 50%; }
.emoji-picker button:hover { transform: scale(1.25); background: transparent; }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0 2px; }
.msg.mine .reactions { justify-content: flex-end; }
.reaction { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 1px 8px; font-size: 12px; cursor: pointer; }
.reaction.mine { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, var(--panel)); }
.quote { display: flex; flex-direction: column; border-left: 3px solid var(--brand); background: rgba(127,127,127,.12); border-radius: 4px; padding: 4px 8px; margin-bottom: 4px; font-size: 12px; cursor: pointer; max-height: 4.6em; overflow: hidden; white-space: normal; }
.quote span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.edited { font-style: italic; margin-right: 4px; }
.mention { color: var(--brand); font-weight: 600; }
:root[data-theme="dark"] .mention { color: #a5b4fc; }
.mention.me { background: color-mix(in srgb, var(--brand) 18%, transparent); border-radius: 4px; padding: 0 3px; }
.bubble.mentioned { border-left: 3px solid var(--brand); }
.bubble.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 3px var(--brand); } }
.mention-badge { background: var(--brand); }
.reply-bar { display: flex; align-items: center; gap: 8px; margin: 0 6% -2px; padding: 6px 8px 6px 12px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 6px 6px 0 0; font-size: 12px; }
.reply-bar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.reply-bar-text span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-view { position: relative; }
.mention-popup { position: absolute; left: 6%; bottom: 70px; width: min(320px, 80%); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; z-index: 5; max-height: 300px; overflow-y: auto; }
.mention-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.mention-item.active, .mention-item:hover { background: var(--hover); }
.windows-login { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; }
.windows-login svg { width: 16px; height: 16px; fill: #0078d4; }
@media (max-width: 760px) { .reply-bar { margin: 0 10px -2px; } .mention-popup { left: 10px; } }
.modal.live-alert .modal-head { background: var(--brand); }
.modal.live-alert .modal-body { font-size: 17px; }
