/* =========================================================================
   MSN 2026 — visual
   ========================================================================= */
:root {
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Inter", Roboto, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --emoji: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;

  --bg: #dfeaff;
  --text: #13202f;
  --muted: #566579;
  --faint: #8794a6;
  --line: rgba(19, 40, 80, .10);
  --line-strong: rgba(19, 40, 80, .18);

  --glass: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .80);
  --glass-solid: #f7f9fd;
  --glass-edge: rgba(255, 255, 255, .85);
  --hover: rgba(70, 110, 200, .09);
  --press: rgba(70, 110, 200, .16);
  --msgs-bg: rgba(255, 255, 255, .72);

  --accent: #3b6dff;
  --accent-2: #18c08f;
  --accent-ink: #fff;
  --danger: #e5484d;

  --st-on: #22c55e;
  --st-busy: #f04452;
  --st-away: #f5a524;
  --st-off: #a1acba;

  --shadow-lg: 0 30px 80px -20px rgba(22, 44, 100, .45), 0 4px 14px rgba(22, 44, 100, .10);
  --shadow-md: 0 14px 40px -12px rgba(22, 44, 100, .35);
  --shadow-sm: 0 2px 8px rgba(22, 44, 100, .10);
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --aurora-1: #7cc6ff;
  --aurora-2: #8f7bff;
  --aurora-3: #6ff0c0;
  --aurora-4: #ffb0d6;
  --aurora-5: #b8f36a;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020;
    --text: #e7eef8;
    --muted: #9fb0c6;
    --faint: #6f7f95;
    --line: rgba(200, 220, 255, .10);
    --line-strong: rgba(200, 220, 255, .18);
    --glass: rgba(22, 30, 50, .58);
    --glass-strong: rgba(26, 34, 56, .84);
    --glass-solid: #161e33;
    --glass-edge: rgba(255, 255, 255, .10);
    --hover: rgba(140, 170, 255, .10);
    --press: rgba(140, 170, 255, .18);
    --msgs-bg: rgba(10, 16, 30, .45);
    --accent: #6d8fff;
    --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 4px 14px rgba(0, 0, 0, .3);
    --shadow-md: 0 14px 40px -12px rgba(0, 0, 0, .6);
    --aurora-1: #1d4fd8;
    --aurora-2: #5b2fd1;
    --aurora-3: #0b8f72;
    --aurora-4: #a8326f;
    --aurora-5: #3f7d12;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1020;
  --text: #e7eef8;
  --muted: #9fb0c6;
  --faint: #6f7f95;
  --line: rgba(200, 220, 255, .10);
  --line-strong: rgba(200, 220, 255, .18);
  --glass: rgba(22, 30, 50, .58);
  --glass-strong: rgba(26, 34, 56, .84);
  --glass-solid: #161e33;
  --glass-edge: rgba(255, 255, 255, .10);
  --hover: rgba(140, 170, 255, .10);
  --press: rgba(140, 170, 255, .18);
  --msgs-bg: rgba(10, 16, 30, .45);
  --accent: #6d8fff;
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 4px 14px rgba(0, 0, 0, .3);
  --shadow-md: 0 14px 40px -12px rgba(0, 0, 0, .6);
  --aurora-1: #1d4fd8;
  --aurora-2: #5b2fd1;
  --aurora-3: #0b8f72;
  --aurora-4: #a8326f;
  --aurora-5: #3f7d12;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 14px/1.4 var(--font);
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
.hidden { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- aurora */
.aurora { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.aurora i {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(80px); opacity: .75; mix-blend-mode: normal;
  animation: drift 26s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { background: var(--aurora-1); left: -15vmax; top: -20vmax; }
.aurora i:nth-child(2) { background: var(--aurora-2); right: -20vmax; top: -10vmax; animation-duration: 32s; animation-delay: -6s; }
.aurora i:nth-child(3) { background: var(--aurora-3); left: 10vmax; bottom: -30vmax; animation-duration: 28s; animation-delay: -12s; }
.aurora i:nth-child(4) { background: var(--aurora-4); right: -10vmax; bottom: -25vmax; animation-duration: 36s; animation-delay: -3s; opacity: .45; }
.aurora i:nth-child(5) { background: var(--aurora-5); left: 40vw; top: 30vh; width: 30vmax; height: 30vmax; animation-duration: 40s; opacity: .35; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vmax, 4vmax) scale(1.08); }
  100% { transform: translate(-4vmax, 7vmax) scale(.95); }
}
@media (prefers-reduced-motion: reduce) { .aurora i { animation: none; } }

.glass {
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .5);
}

.screen { position: fixed; inset: 0; z-index: 1; }

/* ------------------------------------------------------------ botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--glass-strong);
  font-weight: 600; transition: transform .12s, background .15s, box-shadow .15s;
}
.btn:hover { background: var(--glass-solid); box-shadow: var(--shadow-sm); }
.btn:active { transform: scale(.97); }
.btn.primary {
  background: linear-gradient(135deg, #4f8bff, #6a5cff); color: #fff; border-color: transparent;
  box-shadow: 0 8px 22px -8px #4f6bff;
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--danger); }
.btn.big { height: 44px; font-size: 15px; width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; }
.link:hover { text-decoration: underline; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  border: 0; background: transparent; font-size: 17px; line-height: 1; font-family: var(--emoji);
}
.icon-btn:hover { background: var(--hover); }
.icon-btn:active { background: var(--press); }

/* -------------------------------------------------------------- login */
#login { display: grid; place-items: center; padding: 16px; overflow: auto; }
.login-card {
  width: min(380px, 100%); border-radius: 28px; padding: 28px 28px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  animation: rise .5s cubic-bezier(.2, .8, .2, 1);
}
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.login-brand { display: flex; align-items: center; gap: 10px; }
.login-logo { width: 42px; height: 42px; filter: drop-shadow(0 4px 10px rgba(40, 90, 255, .35)); }
.brand-name { font: 700 26px/1 var(--font-display); letter-spacing: -.02em; }
.brand-name span {
  font-size: 13px; vertical-align: super; padding: 2px 7px; border-radius: 999px; margin-left: 2px;
  background: linear-gradient(135deg, #4f8bff, #19c48a); color: #fff; letter-spacing: 0;
}
.login-dp-wrap { position: relative; display: grid; place-items: center; padding: 6px 0 2px; }
.signing { display: none; flex-direction: column; align-items: center; gap: 6px; margin-top: 14px; }
.signing p { margin: 0; color: var(--muted); font-weight: 600; }
.login-card.busy .signing { display: flex; }
.login-card.busy .login-fields { display: none; }
.login-card.busy #loginDp { animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.06); box-shadow: 0 0 0 10px color-mix(in srgb, var(--st-on) 20%, transparent); } }
.signing-dots { display: flex; gap: 6px; }
.signing-dots i { width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(135deg, #4f8bff, #19c48a); animation: dot 1s ease-in-out infinite; }
.signing-dots i:nth-child(2) { animation-delay: .15s; }
.signing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-7px); opacity: .5; } }
.login-fields { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--muted); padding-left: 4px; }
.field input, .field select, .input {
  height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--glass-strong); outline: none; transition: border-color .15s, box-shadow .15s; width: 100%;
}
.field input:focus, .field select:focus, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); user-select: none; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.login-err { min-height: 0; margin: 0; color: var(--danger); font-size: 13px; text-align: center; }
.login-err:empty { display: none; }
.login-switch { margin: 2px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.reg-only { display: none; }
.login-card.register .reg-only { display: revert; }
.login-card.register label.reg-only { display: flex; }
.login-card.register .login-only { display: none; }
.login-foot { position: fixed; bottom: 14px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 12px; margin: 0; }

/* -------------------------------------------- imagem de exibição */
.dp {
  --ring: var(--st-off);
  position: relative; flex: none; border-radius: 30%;
  background: var(--acc, linear-gradient(135deg, #7cc6ff, #8f7bff));
  padding: 3px;
  box-shadow: 0 0 0 2px var(--ring), 0 4px 12px -4px rgba(0, 0, 0, .25);
  transition: box-shadow .3s;
}
.dp::after { /* brilho de vidro */
  content: ""; position: absolute; inset: 3px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 45%);
}
.dp img, .dp .ph {
  width: 100%; height: 100%; border-radius: 26%; object-fit: cover;
}
.dp .ph {
  display: grid; place-items: center; color: #fff; font-weight: 700; font-family: var(--emoji), var(--font);
  background: rgba(0, 0, 0, .08); text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.dp.st-on { --ring: var(--st-on); }
.dp.st-busy { --ring: var(--st-busy); }
.dp.st-away { --ring: var(--st-away); }
.dp.st-off { --ring: var(--st-off); }
.dp.st-off img { filter: grayscale(.35); }
.dp.xs { width: 26px; height: 26px; padding: 2px; box-shadow: 0 0 0 1.5px var(--ring); }
.dp.xs .ph { font-size: 11px; }
.dp.sm { width: 38px; height: 38px; padding: 2px; }
.dp.sm .ph { font-size: 15px; }
.dp.md { width: 56px; height: 56px; }
.dp.md .ph { font-size: 22px; }
.dp.lg { width: 76px; height: 76px; }
.dp.lg .ph { font-size: 30px; }
.dp.xl { width: 112px; height: 112px; padding: 5px; box-shadow: 0 0 0 3px var(--ring), 0 18px 40px -14px rgba(0, 0, 0, .4); }
.dp.xl .ph { font-size: 50px; }
.dp.xl::after { inset: 5px; }
.dp.side { width: 104px; height: 104px; padding: 4px; }
.dp.side .ph { font-size: 44px; }
button.dp { border: 0; cursor: pointer; }
button.dp:hover { transform: scale(1.03); }

.sdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--st-off); flex: none; box-shadow: 0 0 0 2px var(--glass-solid); }
.sdot.on { background: var(--st-on); }
.sdot.busy { background: var(--st-busy); }
.sdot.away { background: var(--st-away); }

.emo { font-family: var(--emoji); font-size: 1.25em; line-height: 1; vertical-align: -.12em; display: inline-block; }
.emo:hover { animation: emo-pop .4s; }
@keyframes emo-pop { 50% { transform: scale(1.4) rotate(-8deg); } }

/* --------------------------------------------------------- janelas */
#windows { position: absolute; inset: 0 0 60px 0; }
.window {
  position: absolute; display: flex; flex-direction: column;
  min-width: 300px; min-height: 360px; max-width: calc(100vw - 8px); max-height: calc(100vh - 68px);
  border-radius: var(--r-lg); overflow: hidden; resize: both;
  background: var(--glass); border: 1px solid var(--glass-edge);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .45);

  transition: box-shadow .2s;
}
.window.focused { box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .5); }
.window.minimized { display: none; }
.window.entering { animation: win-in .28s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes win-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.titlebar {
  flex: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 12px;
  cursor: grab; user-select: none; touch-action: none;
}
.titlebar:active { cursor: grabbing; }
.tb-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title img { width: 20px; height: 20px; }
.tb-btns { display: flex; gap: 2px; }
.tb-btns button {
  width: 32px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  display: grid; place-items: center; font-size: 13px;
}
.tb-btns button:hover { background: var(--hover); color: var(--text); }
.tb-btns .tb-close:hover { background: var(--danger); color: #fff; }
.wbody { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.shake { animation: shake .6s cubic-bezier(.36, .07, .19, .97) both !important; }
@keyframes shake {
  10%, 90% { transform: translate3d(-3px, 1px, 0); }
  20%, 80% { transform: translate3d(6px, -2px, 0); }
  30%, 50%, 70% { transform: translate3d(-12px, 3px, 0) rotate(-.6deg); }
  40%, 60% { transform: translate3d(12px, -3px, 0) rotate(.6deg); }
}
.quake { animation: quake .5s both; }
@keyframes quake { 25% { transform: translate(-2px, 1px); } 50% { transform: translate(3px, -1px); } 75% { transform: translate(-2px, -1px); } }

/* ---------------------------------------------- lista de contatos */
.w-list { width: 340px; height: min(660px, calc(100vh - 90px)); }
.me {
  position: relative; display: flex; gap: 12px; align-items: center; padding: 10px 14px 14px;
}
.me::before { /* "cena" */
  content: ""; position: absolute; inset: -40px 0 0 0; z-index: -1; opacity: .38;
  background: var(--acc); mask-image: linear-gradient(to bottom, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
.me-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.me-name {
  align-self: flex-start; max-width: 100%; display: flex; align-items: center; gap: 6px;
  border: 0; background: transparent; padding: 3px 8px; margin-left: -8px; border-radius: 8px;
  font: 700 16px/1.2 var(--font-display); text-align: left;
}
.me-name:hover { background: var(--hover); }
.me-name .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-name small { font: 500 12px var(--font); color: var(--muted); white-space: nowrap; }
.pm-input {
  width: 100%; border: 1px solid transparent; background: transparent; border-radius: 8px;
  padding: 4px 8px; margin-left: -8px; color: var(--muted); font-size: 13px; outline: none;
}
.pm-input:hover { border-color: var(--line-strong); }
.pm-input:focus { border-color: var(--accent); background: var(--glass-strong); color: var(--text); }
.pm-input::placeholder { color: var(--faint); font-style: italic; }
.me-music { font-size: 12px; color: var(--muted); padding-left: 0; display: flex; gap: 4px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-music .eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 10px; }
.me-music .eq i { width: 2px; background: var(--accent-2); animation: eq 1s ease-in-out infinite; }
.me-music .eq i:nth-child(2) { animation-delay: -.3s; }
.me-music .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 10px; } }

.list-tools { display: flex; gap: 6px; padding: 0 12px 8px; align-items: center; }
.search {
  flex: 1; height: 34px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--glass-strong);
  padding: 0 12px 0 32px; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238794a6' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 11px center;
}
.search:focus { border-color: var(--accent); }

.requests { padding: 0 10px; display: flex; flex-direction: column; gap: 6px; }
.req {
  display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--accent) 12%, var(--glass-strong)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  animation: rise .3s;
}
.req-text { flex: 1; min-width: 0; font-size: 12.5px; }
.req-text b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req .btn { height: 28px; padding: 0 10px; font-size: 12px; }

.clist { flex: 1; overflow: auto; padding: 4px 6px 10px; list-style: none; margin: 0; overscroll-behavior: contain; }
.grp-h {
  display: flex; align-items: center; gap: 6px; padding: 8px 8px 4px; margin-top: 4px;
  font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; user-select: none; border-radius: 8px;
}
.grp-h:hover { color: var(--text); }
.grp-h .chev { transition: transform .2s; font-size: 10px; }
.grp.collapsed .chev { transform: rotate(-90deg); }
.grp.collapsed .grp-items { display: none; }
.grp-h .count { font-weight: 500; color: var(--faint); }
.grp-items { list-style: none; margin: 0; padding: 0; }
.grp-empty { padding: 2px 12px 6px 30px; color: var(--faint); font-size: 12px; font-style: italic; }
.contact {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; cursor: default;
  transition: background .12s; user-select: none; outline: none;
}
.contact:hover { background: var(--hover); }
.contact:focus-visible { background: var(--press); }
.contact.offline .ci { opacity: .6; }
.contact.blocked .cn::after { content: " 🚫"; font-family: var(--emoji); }
.ci { flex: 1; min-width: 0; }
.cn { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12px; }
.cp { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp.music { font-style: italic; }
.cp .emo { font-size: 1.1em; }
.contact .unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.list-empty { text-align: center; color: var(--muted); padding: 28px 18px; font-size: 13px; }
.list-empty .big { font-size: 42px; font-family: var(--emoji); display: block; margin-bottom: 6px; }

.list-foot {
  flex: none; margin: 0 10px 10px; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--glass-strong); border: 1px solid var(--line); font-size: 12px; color: var(--muted);
  display: flex; gap: 10px; align-items: center;
}
.list-foot .tip-ico { font-size: 22px; font-family: var(--emoji); }
.list-foot b { color: var(--text); }

/* ---------------------------------------------------------- conversa */
.w-chat { width: 640px; height: 560px; }
.chat-head {
  position: relative; flex: none; padding: 4px 16px 10px; display: flex; gap: 10px; align-items: center; min-height: 52px;
}
.chat-head::before {
  content: ""; position: absolute; inset: -40px 0 0 0; z-index: -1; background: var(--acc); opacity: .35;
  mask-image: linear-gradient(to bottom, #000 40%, transparent); -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
.ch-text { flex: 1; min-width: 0; }
.ch-to { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-display); }
.ch-to small { font-weight: 500; color: var(--muted); font-size: 12px; font-family: var(--font); }
.ch-pm { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-tools { flex: none; display: flex; gap: 2px; padding: 0 10px 6px; overflow-x: auto; scrollbar-width: none; }
.chat-tools button {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 9px;
  border: 0; background: transparent; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.chat-tools button:hover { background: var(--hover); color: var(--text); }
.chat-tools .ico { font-family: var(--emoji); font-size: 15px; }

.chat-main { flex: 1; min-height: 0; display: flex; gap: 10px; padding: 0 10px; }
.chat-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.msgs {
  flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--msgs-bg); border: 1px solid var(--line); overscroll-behavior: contain;
  user-select: text;
}
.chat-side { flex: none; width: 112px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding-bottom: 6px; gap: 10px; }
.side-them { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.side-them.many { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-them.many .dp { width: 48px; height: 48px; padding: 2px; }
.side-me { cursor: pointer; }

.m-block { margin: 0 0 10px; position: relative; }
.m-who { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
.m-who b { color: var(--text); font-weight: 600; }
.m-who time { margin-left: auto; font-size: 11px; color: var(--faint); opacity: 0; transition: opacity .15s; }
.m-block:hover .m-who time { opacity: 1; }
.m-line { position: relative; padding: 1px 34px 1px 12px; word-wrap: break-word; overflow-wrap: anywhere; border-radius: 8px; }
.m-line:hover { background: var(--hover); }
.m-line a { color: var(--accent); }
.m-line.jumbo .emo { font-size: 2.6em; margin: 4px 2px; }
.m-line.media { padding-top: 4px; padding-bottom: 4px; }
.m-old { opacity: .55; }
.m-old .m-line:hover { background: transparent; }
.m-react-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 26px; height: 24px;
  border: 0; border-radius: 7px; background: var(--glass-strong); box-shadow: var(--shadow-sm); font-size: 13px;
  display: none; place-items: center; font-family: var(--emoji);
}
.m-line:hover > .m-react-btn { display: grid; }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0 2px; }
.reactions:empty { display: none; }
.reaction {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--glass-strong); font-size: 12px;
}
.reaction .emo { font-size: 13px; }
.reaction.mine { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, var(--glass-strong)); }

.m-sys {
  display: flex; align-items: center; gap: 8px; margin: 8px 0 10px; font-size: 12.5px; color: var(--muted);
}
.m-sys::before, .m-sys::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.m-sys .pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--line); max-width: 85%; text-align: center;
}
.m-sys.nudge .pill { color: var(--st-busy); font-weight: 600; border-color: color-mix(in srgb, var(--st-busy) 35%, transparent); }
.m-sys .pill button { border: 0; background: none; color: var(--accent); font-weight: 600; padding: 0; }
.m-day { text-align: center; font-size: 11px; color: var(--faint); margin: 6px 0 10px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }

.m-img { max-width: min(280px, 100%); max-height: 260px; border-radius: 12px; cursor: zoom-in; box-shadow: var(--shadow-sm); background: var(--hover); }
.m-gif { max-width: min(260px, 100%); border-radius: 12px; box-shadow: var(--shadow-sm); }
.gif-badge { position: relative; display: inline-block; }
.gif-badge::after { content: "GIF"; position: absolute; left: 8px; bottom: 8px; font: 700 10px var(--font); color: #fff; background: rgba(0, 0, 0, .55); padding: 2px 5px; border-radius: 5px; }

.filecard {
  display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; max-width: 360px; margin: 2px 0;
  background: var(--glass-strong); border: 1px solid var(--line-strong);
}
.filecard .fi { font-size: 30px; font-family: var(--emoji); }
.filecard .fn { font-weight: 600; word-break: break-all; }
.filecard .fs { font-size: 12px; color: var(--muted); }
.filecard .fa { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.filecard .fa .btn { height: 28px; font-size: 12px; padding: 0 12px; }

/* --------------------------------------------------- figurinhas */
.sticker {
  position: relative; display: inline-grid; place-items: center; width: 140px; height: 140px; margin: 2px 0;
  font-family: var(--emoji); font-size: 92px; line-height: 1; user-select: none;
}
.sticker.small { width: 76px; height: 76px; font-size: 48px; }
.sticker .s-emoji { display: block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18)); }
.sticker .s-cap {
  position: absolute; left: 0; right: 0; bottom: 4px; text-align: center;
  font: 900 22px/1 Impact, "Arial Black", var(--font); color: #fff; text-transform: uppercase; letter-spacing: .01em;
  -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 0 2px 0 #000;
}
.sticker.small .s-cap { font-size: 12px; -webkit-text-stroke: 1px #000; }
.sticker img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18)); }
.an-bounce .s-emoji { animation: s-bounce 1.1s ease-in-out infinite; }
.an-pulse .s-emoji { animation: s-pulse 1s ease-in-out infinite; }
.an-shake .s-emoji { animation: s-shake .5s ease-in-out infinite; }
.an-wobble .s-emoji { animation: s-wobble 1.2s ease-in-out infinite; }
.an-wave .s-emoji { animation: s-wave 1s ease-in-out infinite; transform-origin: 70% 80%; }
.an-tilt .s-emoji { animation: s-tilt 2s ease-in-out infinite; }
.an-pop .s-emoji { animation: s-pop 1.4s cubic-bezier(.2, .9, .3, 1.4) infinite; }
.an-flicker .s-emoji { animation: s-flicker .9s ease-in-out infinite; transform-origin: 50% 100%; }
.an-float .s-emoji { animation: s-float 2.4s ease-in-out infinite; }
.an-spin .s-emoji { animation: s-spin 2.4s linear infinite; }
.an-look .s-emoji { animation: s-look 2s ease-in-out infinite; }
.an-jump .s-emoji { animation: s-jump .8s cubic-bezier(.3, 0, .3, 1) infinite; }
@keyframes s-bounce { 50% { transform: translateY(-14px) scale(1.04); } }
@keyframes s-pulse { 30% { transform: scale(1.18); } 60% { transform: scale(.96); } }
@keyframes s-shake { 25% { transform: translateX(-5px) rotate(-4deg); } 75% { transform: translateX(5px) rotate(4deg); } }
@keyframes s-wobble { 25% { transform: rotate(-12deg) scale(1.05); } 75% { transform: rotate(12deg) scale(1.05); } }
@keyframes s-wave { 25% { transform: rotate(-18deg); } 75% { transform: rotate(18deg); } }
@keyframes s-tilt { 50% { transform: rotate(-10deg) translateX(-4px); } }
@keyframes s-pop { 0% { transform: scale(.6); } 30% { transform: scale(1.2); } 45%, 100% { transform: scale(1); } }
@keyframes s-flicker { 25% { transform: scaleY(1.08) skewX(-3deg); } 50% { transform: scaleY(.95) skewX(2deg); } 75% { transform: scaleY(1.05) skewX(-1deg); } }
@keyframes s-float { 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes s-spin { to { transform: rotate(360deg); } }
@keyframes s-look { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
@keyframes s-jump { 0%, 100% { transform: translateY(0) scaleY(1); } 10% { transform: scaleY(.85); } 45% { transform: translateY(-22px) scaleY(1.05); } }
@media (prefers-reduced-motion: reduce) { .sticker .s-emoji { animation: none !important; } }

/* ----------------------------------------------------------- compor */
.compose {
  flex: none; border-radius: var(--r-md); background: var(--msgs-bg); border: 1px solid var(--line);
  transition: border-color .15s, box-shadow .15s;
}
.compose:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.compose-tools { display: flex; gap: 1px; padding: 4px 6px 0; align-items: center; flex-wrap: wrap; }
.compose-tools .icon-btn { width: 32px; height: 30px; font-size: 16px; }
.compose-tools .gif-btn { font: 800 11px var(--font); letter-spacing: .02em; border: 1.5px solid currentColor; border-radius: 6px; width: auto; height: 20px; padding: 0 4px; margin: 0 5px; color: var(--muted); background: transparent; }
.compose-tools .gif-btn:hover { color: var(--accent); }
.compose-tools .aa { font: 700 14px var(--font-display); color: var(--muted); }
.compose-tools .sep { width: 1px; height: 18px; background: var(--line-strong); margin: 0 4px; }
.compose-row { display: flex; gap: 8px; align-items: flex-end; padding: 2px 6px 6px 10px; }
.compose textarea {
  flex: 1; resize: none; border: 0; outline: none; background: transparent; min-height: 44px; max-height: 140px; padding: 6px 0;
}
.compose textarea::placeholder { color: var(--faint); }
.send-btn {
  flex: none; height: 36px; padding: 0 16px; border-radius: 11px; border: 0; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, #4f8bff, #6a5cff); box-shadow: 0 6px 16px -6px #4f6bff;
}
.send-btn:disabled { opacity: .45; box-shadow: none; cursor: default; }
.chat-status { flex: none; height: 30px; padding: 0 16px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-status .typing-dots { display: inline-flex; gap: 3px; }
.chat-status .typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: dot 1s infinite; }
.chat-status .typing-dots i:nth-child(2) { animation-delay: .15s; }
.chat-status .typing-dots i:nth-child(3) { animation-delay: .3s; }

/* --------------------------------------------------------- pickers */
.picker {
  position: fixed; z-index: 9000; width: 360px; max-width: calc(100vw - 16px); max-height: min(420px, calc(100vh - 100px));
  display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden;
  background: var(--glass-strong); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-edge); box-shadow: var(--shadow-lg); animation: pop-in .18s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.picker-h { padding: 12px 14px 8px; display: flex; align-items: center; gap: 8px; }
.picker-h b { flex: 1; font-size: 13px; }
.picker-h .input { height: 32px; font-size: 13px; }
.picker-tabs { display: flex; gap: 4px; padding: 0 10px 8px; }
.picker-tabs button { border: 0; background: transparent; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); }
.picker-tabs button.on { background: var(--accent); color: #fff; }
.picker-body { flex: 1; overflow: auto; padding: 0 10px 12px; }
.emo-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emo-grid button { aspect-ratio: 1; border: 0; background: transparent; border-radius: 9px; font-size: 22px; font-family: var(--emoji); display: grid; place-items: center; }
.emo-grid button:hover { background: var(--hover); transform: scale(1.12); }
.wink-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wink-grid button { border: 1px solid var(--line); background: var(--glass-solid); border-radius: 14px; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); }
.wink-grid button span { font-size: 30px; font-family: var(--emoji); transition: transform .2s; }
.wink-grid button:hover { border-color: var(--accent); color: var(--text); }
.wink-grid button:hover span { transform: scale(1.2) rotate(-6deg); }
.stk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stk-grid > button { position: relative; border: 0; background: transparent; border-radius: 14px; padding: 2px; display: grid; place-items: center; }
.stk-grid > button:hover { background: var(--hover); }
.stk-grid .sticker { width: 76px; height: 76px; font-size: 48px; margin: 0; }
.stk-grid .sticker .s-cap { font-size: 12px; -webkit-text-stroke: 1px #000; }
.stk-grid .stk-del { position: absolute; top: 0; right: 0; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; font-size: 11px; display: none; place-items: center; }
.stk-grid > button:hover .stk-del { display: grid; }
.stk-new { border: 2px dashed var(--line-strong) !important; color: var(--muted); font-size: 12px; font-weight: 600; flex-direction: column; min-height: 80px; }
.stk-new span { font-size: 22px; font-family: var(--emoji); }
.gif-grid { columns: 2; column-gap: 6px; }
.gif-grid button { display: block; width: 100%; border: 0; padding: 0; margin: 0 0 6px; border-radius: 10px; overflow: hidden; background: var(--hover); break-inside: avoid; }
.gif-grid img { width: 100%; height: auto; }
.gif-grid button:hover { outline: 2px solid var(--accent); }
.picker-note { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px 10px; }
.picker-note .big { font-size: 34px; display: block; font-family: var(--emoji); margin-bottom: 6px; }
.picker-foot { padding: 8px 12px; border-top: 1px solid var(--line); font-size: 11px; color: var(--faint); display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* ----------------------------------------------------------- winks */
#winkLayer { position: fixed; inset: 0; z-index: 9500; pointer-events: none; overflow: hidden; }
.wk { position: absolute; left: 0; top: 0; translate: -50% -50%; font-family: var(--emoji); line-height: 1; will-change: transform, opacity; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .2)); }

/* ------------------------------------------------------- taskbar */
#taskbar {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 8000;
  height: 50px; width: min(1100px, calc(100vw - 16px)); border-radius: 18px;
  display: flex; align-items: center; gap: 6px; padding: 0 8px;
}
.tb-start { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 8px; border: 0; border-radius: 12px; background: transparent; font-weight: 700; }
.tb-start img { width: 26px; height: 26px; }
.tb-start:hover, .tb-start.on { background: var(--hover); }
.tb-convs { flex: 1; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tb-conv {
  position: relative; flex: none; display: flex; align-items: center; gap: 8px; height: 38px; max-width: 190px; padding: 0 12px 0 6px;
  border: 0; border-radius: 12px; background: transparent; font-size: 12.5px; font-weight: 600;
}
.tb-conv span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-conv:hover { background: var(--hover); }
.tb-conv.active { background: var(--press); }
.tb-conv.active::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 3px; height: 3px; border-radius: 3px; background: var(--accent); }
.tb-conv.flash { animation: flash 1s ease-in-out infinite; }
@keyframes flash { 0%, 100% { background: rgba(255, 159, 28, .25); } 50% { background: rgba(255, 159, 28, .75); color: #3a2200; } }
.tb-tray { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st-on); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-on) 25%, transparent); }
.conn-dot.off { background: var(--st-busy); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-busy) 25%, transparent); }
#connBanner {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 9000;
  padding: 8px 16px; border-radius: 999px; background: var(--st-busy); color: #fff; font-weight: 600; font-size: 13px; box-shadow: var(--shadow-md);
}

/* --------------------------------------------------------- toasts */
#toasts { position: absolute; right: 14px; bottom: 70px; z-index: 8500; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  pointer-events: auto; width: 300px; max-width: calc(100vw - 28px); display: flex; gap: 12px; align-items: center; padding: 12px 14px;
  border-radius: 18px; cursor: pointer; position: relative; overflow: hidden;
  background: var(--glass-strong); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-edge); box-shadow: var(--shadow-lg);
  animation: toast-in .45s cubic-bezier(.2, .9, .3, 1.2);
}
.toast::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--acc, var(--accent)); }
.toast.out { animation: toast-out .35s ease-in forwards; }
@keyframes toast-in { from { transform: translateY(40px) scale(.95); opacity: 0; } }
@keyframes toast-out { to { transform: translateX(110%); opacity: 0; } }
.toast-text { min-width: 0; flex: 1; }
.toast-text b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-text > span { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.toast .t-ico { font-size: 28px; font-family: var(--emoji); }

/* ------------------------------------------------------ menu/modal */
.ctx {
  position: fixed; z-index: 9800; min-width: 220px; max-width: 300px; padding: 6px; border-radius: 14px;
  background: var(--glass-strong); animation: pop-in .14s ease-out; max-height: calc(100vh - 20px); overflow: auto;
}
.ctx button {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; background: transparent;
  border-radius: 9px; text-align: left; font-size: 13px;
}
.ctx button:hover:not(:disabled) { background: var(--hover); }
.ctx button:disabled { opacity: .45; cursor: default; }
.ctx button .mi { width: 18px; text-align: center; font-family: var(--emoji); }
.ctx button .ck { margin-left: auto; color: var(--accent); font-weight: 700; }
.ctx button.danger { color: var(--danger); }
.ctx hr { border: 0; height: 1px; background: var(--line); margin: 5px 6px; }
.ctx .ctx-h { padding: 6px 10px 2px; font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }

#overlay {
  position: fixed; inset: 0; z-index: 9600; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 20, 40, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 24px; padding: 20px;
  background: var(--glass-strong); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-edge); box-shadow: var(--shadow-lg); animation: rise .25s cubic-bezier(.2, .9, .3, 1.1);
}
.modal.wide { width: min(620px, 100%); }
.modal h2 { margin: 0 0 4px; font: 700 18px var(--font-display); }
.modal .sub { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.modal-body { display: flex; flex-direction: column; gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.dp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.dp-grid button { aspect-ratio: 1; border: 0; padding: 0; border-radius: 30%; overflow: hidden; background: none; box-shadow: var(--shadow-sm); transition: transform .15s; }
.dp-grid button:hover { transform: scale(1.08); }
.dp-grid button.on { outline: 3px solid var(--accent); outline-offset: 2px; }
.dp-grid img { width: 100%; height: 100%; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 44px; height: 44px; border-radius: 14px; border: 2px solid transparent; box-shadow: var(--shadow-sm); }
.swatch.on { border-color: var(--text); transform: scale(1.06); }
.swatch.round { width: 28px; height: 28px; border-radius: 50%; }
.font-preview { padding: 14px; border-radius: 12px; background: var(--msgs-bg); border: 1px solid var(--line); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toggle { height: 34px; min-width: 38px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--glass-strong); font-weight: 700; }
.toggle.on { background: var(--accent); color: #fff; border-color: transparent; }
.meme-stage { display: grid; place-items: center; background: repeating-conic-gradient(var(--hover) 0 25%, transparent 0 50%) 50% / 20px 20px; border-radius: 14px; padding: 8px; }
.meme-stage canvas { max-width: 100%; max-height: 46vh; border-radius: 10px; box-shadow: var(--shadow-md); }
.lightbox { position: fixed; inset: 0; z-index: 9700; display: grid; place-items: center; background: rgba(0, 0, 0, .75); cursor: zoom-out; animation: fade .2s; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: var(--shadow-lg); }

#dropHint { position: fixed; inset: 0; z-index: 9900; pointer-events: none; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, transparent); }
#dropHint div { padding: 18px 28px; border-radius: 20px; background: var(--glass-strong); font-weight: 700; font-size: 18px; box-shadow: var(--shadow-lg); border: 2px dashed var(--accent); }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* ------------------------------------------------------------ celular */
@media (max-width: 760px) {
  #windows { inset: 0 0 64px 0; }
  .window {
    left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important;
    max-width: none; max-height: none; border-radius: 0; resize: none; border: 0;
  }
  .titlebar { cursor: default; padding-top: env(safe-area-inset-top); }
  .chat-side { display: none; }
  #taskbar { bottom: 6px; height: 52px; }
  .tb-start span, .tb-clock { display: none; }
  .tb-conv { max-width: 130px; }
  #toasts { right: 8px; left: 8px; bottom: 70px; align-items: stretch; }
  .toast { width: auto; }
  .w-chat .chat-tools .lbl { display: none; }
}

/* =========================================================================
   Chamadas, servidores e refinamentos
   ========================================================================= */
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--st-busy); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; flex: none; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--st-on); flex: none; box-shadow: 0 0 0 0 color-mix(in srgb, var(--st-on) 60%, transparent); animation: live 1.6s ease-out infinite; }
@keyframes live { to { box-shadow: 0 0 0 9px transparent; } }
.live-tag { font: 800 9px var(--font); background: var(--st-busy); color: #fff; padding: 2px 5px; border-radius: 5px; letter-spacing: .03em; }

/* abas da lista */
.list-tabs { display: flex; gap: 4px; margin: 0 12px 8px; padding: 3px; border-radius: 999px; background: var(--hover); flex: none; }
.list-tabs button { flex: 1; height: 30px; border: 0; border-radius: 999px; background: transparent; font-weight: 600; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.list-tabs button.on { background: var(--glass-solid); color: var(--text); box-shadow: var(--shadow-sm); }

/* lista de servidores */
.srv-pane { flex: 1; overflow: auto; padding: 0 8px 10px; }
.srv-actions { display: flex; gap: 6px; padding: 0 4px 8px; }
.srv-actions .btn { flex: 1; font-size: 12.5px; padding: 0 8px; }
.srv-list { list-style: none; margin: 0; padding: 0; }
.srv-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; cursor: pointer; user-select: none; }
.srv-item:hover, .srv-item:focus-visible { background: var(--hover); outline: none; }
.vc-live { color: var(--st-on); font-weight: 600; }
.srv-ico {
  flex: none; width: 44px; height: 44px; border-radius: 32%; display: grid; place-items: center; overflow: hidden;
  background: var(--acc, linear-gradient(135deg, #6fd3ff, #7b6cff)); font-size: 24px; font-family: var(--emoji); line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 10px -4px rgba(0, 0, 0, .3);
}
.srv-ico img { width: 100%; height: 100%; object-fit: cover; }
.srv-ico.sm { width: 30px; height: 30px; font-size: 16px; }
.srv-ico.xs { width: 22px; height: 22px; font-size: 12px; box-shadow: none; }
.srv-ico.lg { width: 72px; height: 72px; font-size: 40px; }
.srv-icons { grid-template-columns: repeat(9, 1fr); }
.srv-icons button.on { background: var(--press); outline: 2px solid var(--accent); }

/* janela do servidor */
.w-server { width: 1020px; height: 650px; min-width: 340px; }
.srv { flex: 1; min-height: 0; display: flex; position: relative; }
.srv-side { position: relative; flex: none; width: 232px; display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; }
.srv-side::before { content: ""; position: absolute; inset: -40px 0 auto 0; height: 150px; z-index: -1; background: var(--acc); opacity: .3; mask-image: linear-gradient(to bottom, #000 30%, transparent); -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent); }
.srv-head { flex: none; display: flex; align-items: center; gap: 10px; margin: 0 8px 6px; padding: 8px; border: 0; background: transparent; border-radius: 12px; text-align: left; }
.srv-head:hover { background: var(--hover); }
.srv-head b { flex: 1; min-width: 0; font: 700 15px var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv-chs { flex: 1; overflow-y: auto; padding: 0 8px 8px; }
.ch-cat { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.ch-cat button { border: 0; background: transparent; color: var(--muted); font-size: 15px; width: 22px; height: 22px; border-radius: 6px; line-height: 1; }
.ch-cat button:hover { background: var(--hover); color: var(--text); }
.ch { width: 100%; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 0; background: transparent; border-radius: 10px; color: var(--muted); font-weight: 500; text-align: left; }
.ch:hover { background: var(--hover); color: var(--text); }
.ch.on { background: var(--press); color: var(--text); font-weight: 600; }
.ch.unread { color: var(--text); font-weight: 700; }
.ch-ico { width: 18px; text-align: center; font-family: var(--emoji), var(--font); font-size: 15px; opacity: .8; flex: none; }
.ch-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-cnt { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.ch.voice.on { background: color-mix(in srgb, var(--st-on) 18%, transparent); }
.vc-users { padding: 2px 0 6px 30px; display: flex; flex-direction: column; gap: 2px; }
.vc-user { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 8px; font-size: 12.5px; }
.vc-user:hover { background: var(--hover); }
.vc-user .vc-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-user .vc-ic { display: flex; gap: 3px; align-items: center; font-size: 11px; font-family: var(--emoji); }
.vc-user.speaking .dp { box-shadow: 0 0 0 2px var(--st-on), 0 0 10px var(--st-on); }
.vc-user.speaking .vc-n { color: var(--st-on); font-weight: 600; }
.srv-voice { flex: none; margin: 0 8px 6px; padding: 8px; border-radius: 14px; background: color-mix(in srgb, var(--st-on) 14%, var(--glass-strong)); border: 1px solid color-mix(in srgb, var(--st-on) 35%, transparent); }
.vp-top { display: flex; align-items: center; gap: 8px; }
.vp-txt { flex: 1; min-width: 0; line-height: 1.2; }
.vp-txt b { display: block; font-size: 12.5px; color: var(--st-on); }
.vp-txt small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-btns { display: flex; gap: 4px; margin-top: 6px; justify-content: space-between; }
.vp-btns .cbtn { width: 36px; height: 34px; font-size: 15px; border-radius: 10px; }
.srv-me { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); }
.srv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0 10px; gap: 8px; }
.srv-ch-head { flex: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 4px; }
.srv-ch-head .hash { font-size: 20px; color: var(--faint); font-weight: 300; }
.srv-ch-head .ch-title { font: 700 15px var(--font-display); white-space: nowrap; }
.srv-ch-head .ch-sub { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 8px; border-left: 1px solid var(--line-strong); }
.srv-back { display: none; }
.srv-main .chat-status { padding: 0 6px; height: 24px; margin-top: -4px; }
.srv-members { flex: none; width: 210px; overflow-y: auto; padding: 4px 8px 10px; border-left: 1px solid var(--line); }
.w-server.no-members .srv-members { display: none; }
.mem-cat { padding: 12px 8px 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.mem { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 10px; }
.mem:hover { background: var(--hover); }
.mem.off { opacity: .55; }
.ch-welcome { text-align: center; padding: 40px 20px; color: var(--muted); }
.ch-welcome .big { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; font-weight: 300; background: var(--hover); color: var(--text); }
.ch-welcome h3 { margin: 0 0 4px; color: var(--text); font: 700 18px var(--font-display); }
.ch-welcome p { margin: 0; }
.invite-code { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--msgs-bg); border: 1px solid var(--line); }
.invite-code > span { font-size: 12px; font-weight: 600; color: var(--muted); width: 46px; flex: none; }
.invite-code b { flex: 1; font: 700 22px ui-monospace, Consolas, monospace; letter-spacing: .12em; user-select: all; }
.invite-code .input { flex: 1; height: 34px; font-size: 12.5px; min-width: 0; }
.inv-list { max-height: 180px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.inv-row { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 10px; }
.inv-row:hover { background: var(--hover); }
.inv-row span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-row .btn { height: 28px; font-size: 12px; }
.invcard { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; max-width: 380px; margin: 2px 0; background: var(--glass-strong); border: 1px solid var(--line-strong); position: relative; overflow: hidden; }
.invcard::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--acc); }
.invcard b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invcard .fs { font-size: 12px; color: var(--muted); }
.invcard .btn { height: 30px; }

/* chamada */
.w-call { width: 820px; height: 540px; min-height: 300px; background: rgba(12, 16, 28, .82); color: #eef3fb; border-color: rgba(255, 255, 255, .12); }
.w-call .tb-btns button { color: #b7c3d6; }
.w-call .tb-btns button:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.call { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.call-grid { flex: 1; min-height: 0; display: grid; gap: 8px; padding: 4px 10px 8px; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(0, 1fr); overflow: hidden; }
.call-grid[data-n="1"] { grid-template-columns: 1fr; }
.call-grid[data-n="2"], .call-grid[data-n="3"], .call-grid[data-n="4"] { grid-template-columns: 1fr 1fr; }
.call-grid.has-spot { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); grid-template-rows: minmax(0, 1fr) 110px; grid-auto-rows: 110px; }
.call-grid.has-spot .tile.spot { grid-column: 1 / -1; grid-row: 1; }
.tile { position: relative; min-height: 0; border-radius: 16px; overflow: hidden; background: #171d2e; display: grid; place-items: center; cursor: pointer; transition: box-shadow .15s; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.tile::before { content: ""; position: absolute; inset: 0; background: var(--acc); opacity: .22; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; background: #000; }
.tile.has-video video { display: block; }
.tile.has-video .tile-av { display: none; }
.tile.mirror video { transform: scaleX(-1); }
.tile.screen video { object-fit: contain; }
.tile-av { position: relative; }
.tile-av .dp { box-shadow: 0 0 0 3px rgba(255, 255, 255, .15), 0 18px 40px -14px rgba(0, 0, 0, .6); }
.tile.speaking { box-shadow: inset 0 0 0 3px var(--st-on), 0 0 18px -2px var(--st-on); }
.tile.speaking .tile-av .dp { box-shadow: 0 0 0 4px var(--st-on), 0 0 26px var(--st-on); }
.tile-name { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .55); font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-st { position: absolute; top: 8px; left: 8px; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #ffd98a; }
.tile-st:empty { display: none; }
.tile:fullscreen { border-radius: 0; }
.tile:fullscreen video { object-fit: contain; }
.call-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px 12px; }
.call-timer, .call-count { flex: 1; font-size: 12px; color: #a9b6ca; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-count { text-align: right; }
.call-btns { display: flex; gap: 8px; }
.cbtn { position: relative; width: 48px; height: 44px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, .12); font-size: 19px; font-family: var(--emoji); display: grid; place-items: center; transition: transform .12s, background .15s; color: inherit; }
.srv-voice .cbtn { background: var(--hover); }
.cbtn:hover { background: rgba(255, 255, 255, .22); }
.srv-voice .cbtn:hover { background: var(--press); }
.cbtn:active { transform: scale(.94); }
.cbtn.off { background: rgba(240, 68, 82, .28); }
.cbtn.off::after { content: ""; position: absolute; width: 60%; height: 2.5px; border-radius: 2px; background: #ff6b78; transform: rotate(-45deg); }
.cbtn.on { background: color-mix(in srgb, var(--st-on) 45%, transparent); }
.cbtn.danger, .srv-voice .cbtn.danger { background: var(--st-busy); }
.cbtn.danger:hover, .srv-voice .cbtn.danger:hover { background: #ff5a68; }
.cbtn span { display: inline-block; pointer-events: none; }
.cbtn[data-c="leave"] span { transform: rotate(135deg); }
.call-banner { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r-md); font-size: 12.5px; background: color-mix(in srgb, var(--st-on) 14%, var(--glass-strong)); border: 1px solid color-mix(in srgb, var(--st-on) 35%, transparent); }
.call-banner > span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-banner .btn { height: 28px; font-size: 12px; padding: 0 12px; }
.m-sys.call .pill { color: var(--text); }
.m-sys.missed .pill { color: var(--st-busy); border-color: color-mix(in srgb, var(--st-busy) 35%, transparent); }
.tb-call { background: color-mix(in srgb, var(--st-on) 22%, transparent) !important; }
.toast.ring { cursor: default; width: 330px; animation: toast-in .45s cubic-bezier(.2, .9, .3, 1.2), ringpulse 1.3s ease-in-out .45s infinite; }
.toast.ring .dp { animation: breathe 1.3s ease-in-out infinite; }
@keyframes ringpulse { 50% { box-shadow: var(--shadow-lg), 0 0 0 6px color-mix(in srgb, var(--st-on) 30%, transparent); } }
.ring-btns { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ring-btns .btn { height: 30px; font-size: 12px; padding: 0 12px; }
.ring-btns .btn.danger { background: var(--st-busy); color: #fff; border-color: transparent; }

/* --------------------------------------------- celular e telas de toque */
#taskbar { padding-bottom: env(safe-area-inset-bottom); }
@media (pointer: coarse) {
  .contact, .srv-item { padding-top: 9px; padding-bottom: 9px; }
  .icon-btn { width: 40px; height: 40px; }
  .compose-tools .icon-btn { width: 38px; height: 36px; font-size: 18px; }
  .m-react-btn { display: grid; opacity: .55; }
  .ctx button { padding: 11px 12px; font-size: 14.5px; }
  .tb-btns button { width: 40px; height: 34px; font-size: 15px; }
}
@media (max-width: 760px) {
  html, body { overscroll-behavior: none; }
  #windows { inset: 0 0 calc(62px + env(safe-area-inset-bottom)) 0; }
  #taskbar { height: calc(54px + env(safe-area-inset-bottom)); bottom: 4px; border-radius: 20px; }
  .window { min-width: 0; min-height: 0; backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); }
  .window.entering { animation: slide-in .22s ease-out; }
  .titlebar { height: 46px; }
  .tb-min { display: none !important; }
  .tb-close { font-size: 0 !important; }
  .tb-close::before { content: "←"; font-size: 20px; }
  #w-list .tb-btns { display: none; }
  .chat-main { padding: 0 6px; gap: 0; }
  .chat-head { padding: 2px 12px 8px; min-height: 0; }
  .chat-tools { padding: 0 6px 6px; }
  .chat-tools button { padding: 0 9px; height: 34px; }
  .msgs { padding: 10px; }
  .compose textarea { font-size: 16px; min-height: 40px; }
  .field input, .field select, .input, .search, .pm-input { font-size: 16px; }
  .send-btn { height: 40px; }
  .picker { left: 6px !important; right: 6px; width: auto; max-width: none; }
  .modal { border-radius: 22px; padding: 16px; }
  .modal-actions .btn { flex: 1 1 auto; }
  .dp-grid { grid-template-columns: repeat(5, 1fr); }
  .w-server .srv-members { display: none; }
  .w-server .srv-side { position: absolute; inset: 0; width: auto; z-index: 5; background: var(--glass-solid); display: none; border: 0; }
  .w-server.show-chs .srv-side { display: flex; }
  .srv-back { display: inline-grid; }
  .srv-ch-head .ch-sub { display: none; }
  .srv-ch-head .ch-title { flex: 1; overflow: hidden; text-overflow: ellipsis; }
  .srv-main { padding: 0 6px; }
  .ch { height: 44px; font-size: 15px; }
  .vc-user { padding: 6px; font-size: 14px; }
  .call-bar { flex-wrap: wrap; justify-content: center; padding-bottom: 10px; }
  .call-timer, .call-count { flex: 1 1 40%; }
  .call-btns { order: 3; width: 100%; justify-content: center; }
  .cbtn { width: 50px; height: 48px; }
  .toast.ring { width: auto; }
  .chat-tools .call-tool .lbl { display: none; }
  .login-card { padding: 22px 20px 18px; }
  .login-foot { position: static; margin-top: 14px; }
}
@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } }
@media (display-mode: standalone) {
  .login-foot::after { content: " · app instalado"; }
}
@media (max-width: 760px) {
  .w-call .tb-min { display: grid !important; }
  .w-call .tb-close { font-size: 13px !important; }
  .w-call .tb-close::before { content: none; }
}

.screen { inset: 0 0 auto 0; height: var(--app-h, 100dvh); }

/* ---------------------------------------- privacidade, supervisão, moderação */
.hint { font-size: 11.5px; color: var(--muted); padding-left: 4px; }
.check a { color: var(--accent); }
.login-err b { display: block; margin-bottom: 2px; }
.login-foot a { color: inherit; }
.priv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.priv-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; background: var(--msgs-bg); border: 1px solid var(--line); }
.priv-card span { font-size: 12.5px; color: var(--muted); flex: 1; }
.priv-card .btn { align-self: flex-start; }
.priv-facts { padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 8%, var(--glass-strong)); border: 1px solid var(--line); font-size: 13px; }
.priv-facts p { margin: 0 0 6px; }
.priv-facts p:last-child { margin: 0; }
.modal a { color: var(--accent); }
.rp-help { margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; background: color-mix(in srgb, var(--st-busy) 12%, var(--glass-strong)); border: 1px solid color-mix(in srgb, var(--st-busy) 35%, transparent); }
.guard-chip { margin: -4px 14px 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent-2) 40%, transparent); background: color-mix(in srgb, var(--accent-2) 12%, var(--glass-strong)); font-size: 12px; text-align: left; }
.pending-card { list-style: none; text-align: center; padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.pending-card .big { font-size: 46px; font-family: var(--emoji); }
.pending-card h3 { margin: 0; font: 700 17px var(--font-display); }
.pending-card p { margin: 0; color: var(--text); }
.pending-card .muted, .muted { color: var(--muted); font-size: 12.5px; }
.pending-card a { color: var(--accent); }
.link-code { margin: 6px auto; padding: 10px 18px; border-radius: 14px; font: 800 28px ui-monospace, Consolas, monospace; letter-spacing: .2em; background: var(--glass-strong); border: 2px dashed var(--accent); user-select: all; }
.ward { padding: 14px; border-radius: 16px; background: var(--msgs-bg); border: 1px solid var(--line); margin-top: 10px; }
.ward header { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.ward header b { font-size: 15px; }
.ward h4 { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); }
.ward-set { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.input.mini { width: 80px; height: 30px; display: inline-block; margin: 0 4px; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: var(--hover); color: var(--muted); vertical-align: 1px; }
.tag.adult { background: color-mix(in srgb, var(--st-away) 25%, transparent); color: var(--text); }
.tag.danger { background: var(--st-busy); color: #fff; }
.rep { padding: 12px 14px; border-radius: 16px; background: var(--msgs-bg); border: 1px solid var(--line); margin-bottom: 10px; opacity: .7; }
.rep.open { opacity: 1; border-color: color-mix(in srgb, var(--st-away) 50%, transparent); }
.rep header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rep .rep-st { margin-left: auto; font-size: 12px; }
.rep p { margin: 8px 0; font-size: 13px; overflow-wrap: anywhere; }
.rep .row .btn { height: 30px; font-size: 12px; padding: 0 10px; }
.rep .appeal { padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.m-removed { color: var(--faint); font-style: italic; }
.ft-bar { flex: 1 1 100%; height: 6px; border-radius: 6px; background: var(--hover); overflow: hidden; }
.ft-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4f8bff, #19c48a); transition: width .2s; }
.filecard .fa a.btn { height: 28px; font-size: 12px; padding: 0 12px; text-decoration: none; color: #fff; }
.bye { position: fixed; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; background: var(--bg); color: var(--text); font-family: var(--font); }
.bye h1 { font: 700 28px var(--font-display); }
@media (max-width: 760px) { .priv-grid { grid-template-columns: 1fr; } }

/* =========================================================================
   App de Windows: cada janela do MSN é uma janela de verdade
   ========================================================================= */
.modo-app #taskbar, .modo-app .window > .titlebar { display: none !important; }
.modo-app #windows { inset: 0 !important; }
.modo-app #toasts { bottom: 12px; right: 10px; }
.modo-app .window {
  position: fixed !important; inset: 0 !important; width: auto !important; height: auto !important;
  max-width: none; max-height: none; min-width: 0; min-height: 0; border-radius: 0; border: 0; resize: none;
  animation: none; box-shadow: none;
}
.modo-app .window.minimized { display: flex; }
.modo-app .aurora i { opacity: .55; }
.modo-app #login { padding: 12px; }
.modo-app .login-card { padding: 22px 18px 18px; }

/* Lista compacta (o "card" do MSN) */
.modo-lista .w-list .me { padding-top: 14px; }

/* Visão completa: janela maximizada/larga → lista à esquerda + Novidades */
#novidades { display: none; }
.vista-completa.modo-lista .w-list { right: auto !important; width: 360px !important; border-right: 1px solid var(--line); }
.vista-completa.modo-lista #novidades {
  display: flex; flex-direction: column; gap: 16px; position: fixed; left: 360px; right: 0; top: 0; bottom: 0; z-index: 2;
  padding: 22px 26px; overflow-y: auto;
}
.nv-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.nv-hi { display: flex; align-items: center; gap: 14px; }
.nv-hi h2 { margin: 0; font: 700 22px var(--font-display); }
.nv-hi p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.nv-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.nv-acoes .btn { height: 32px; font-size: 12.5px; }
.nv-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.nv-card { background: var(--glass); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); border: 1px solid var(--glass-edge); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.nv-card h3 { margin: 0 0 8px; font: 700 13px var(--font); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.nv-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nv-feed li { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; cursor: pointer; font-size: 13.5px; }
.nv-feed li:hover { background: var(--hover); }
.nv-feed li time { margin-left: 8px; font-size: 11.5px; color: var(--faint); }
.nv-feed li.nv-vazio, .nv-vazio { cursor: default; color: var(--muted); font-size: 13px; }
.nv-srv { display: flex; flex-direction: column; gap: 4px; }
.nv-srv-item { display: flex; gap: 10px; align-items: center; padding: 8px; border: 0; background: transparent; border-radius: 12px; text-align: left; width: 100%; }
.nv-srv-item:hover { background: var(--hover); }
.nv-srv-item small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 1100px) { .nv-cols { grid-template-columns: 1fr; } }

/* Janela de conversa: em chamada, o vídeo fica à direita (como a webcam no MSN) */
.em-chamada.modo-conversa .w-chat, .em-chamada.modo-servidor .w-server { right: 440px !important; }
.em-chamada.modo-app .w-call { left: auto !important; right: 0 !important; width: 440px !important; border-left: 1px solid rgba(255, 255, 255, .1); }
.modo-conversa .call-banner .btn[data-act="showcall"] { display: none; }

/* Em chamada, o vídeo já mostra as pessoas: esconde as imagens de exibição ao lado do chat */
.em-chamada.modo-conversa .w-chat .chat-side { display: none; }
.vista-completa.modo-lista #novidades > * { width: 100%; max-width: 1240px; }

/* =========================================================================
   App de Windows no formato do Windows Live Messenger (janela pequena)
   ========================================================================= */
:root { --app-bg: linear-gradient(180deg, #cfe5fb 0, #e9f3fd 120px, #fbfdff 260px, #ffffff 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --app-bg: linear-gradient(180deg, #16233f 0, #0f1729 220px, #0b1020 100%); } }
:root[data-theme="dark"] { --app-bg: linear-gradient(180deg, #16233f 0, #0f1729 220px, #0b1020 100%); }
.modo-app body { background: var(--app-bg); }
.modo-app .aurora { display: none; }
.modo-app .window { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.modo-app .me::before { opacity: .22; }

/* ---- Login */
.login-top, .app-only, .login-links { display: none; }
.modo-app #login { display: block; padding: 0; overflow-y: auto; }
.modo-app .login-card {
  width: 100%; min-height: 100%; border-radius: 0; border: 0; box-shadow: none; background: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none; padding: 6px 22px 14px; gap: 8px; align-items: stretch; animation: none;
}
.modo-app .login-top { display: flex; justify-content: flex-end; }
.modo-app .login-top .link { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.modo-app .login-brand, .modo-app .login-foot, .modo-app .login-switch { display: none; }
.modo-app .login-dp-wrap { padding: 2px 0 12px; }
.modo-app #loginDp.dp.xl { width: 122px; height: 122px; border-radius: 14px; padding: 5px; background: linear-gradient(180deg, #fff, #dfe7f0); box-shadow: 0 0 0 1px #b9c6d6, 0 6px 16px -6px rgba(20, 50, 90, .35); }
.modo-app #loginDp img, .modo-app #loginDp .ph { border-radius: 10px; }
.modo-app #loginDp::after { display: none; }
.modo-app .login-fields { gap: 8px; }
.modo-app .field { gap: 2px; }
.modo-app .field > span { font-size: 12.5px; font-weight: 400; color: var(--text); padding-left: 0; }
.modo-app .field input, .modo-app .field select { height: 27px; border-radius: 3px; padding: 0 7px; font-size: 13px; background: var(--glass-solid); border-color: var(--line-strong); }
.modo-app .linha-status { flex-direction: row; align-items: center; gap: 6px; }
.modo-app .linha-status select { width: auto; height: auto; padding: 0 2px; border: 0; background: transparent; color: var(--accent); font-weight: 600; cursor: pointer; }
.modo-app label.app-only { display: flex; }
.modo-app .login-card.register label.app-only { display: none; }
.modo-app .check { font-size: 12.5px; color: var(--text); gap: 7px; }
.modo-app .check input { width: 14px; height: 14px; }
.modo-app .hint { font-size: 11px; }
.modo-app #loginBtn.btn.big { width: auto; align-self: center; height: 28px; padding: 0 26px; font-size: 13px; border-radius: 4px; margin-top: 6px;
  background: linear-gradient(180deg, #fdfeff, #dce9f7); color: #13304f; border: 1px solid #8eaacb; box-shadow: inset 0 1px 0 #fff; font-weight: 600; }
.modo-app #loginBtn.btn.big:hover { background: linear-gradient(180deg, #ffffff, #c9def5); border-color: #5f8cc0; }
.modo-app .login-links { display: flex; flex-direction: column; gap: 3px; margin-top: 18px; }
.modo-app .login-links .link { font-weight: 400; font-size: 12.5px; text-align: left; align-self: flex-start; text-decoration: none; }
.modo-app .login-links .link:hover { text-decoration: underline; }
.modo-app .login-card.busy .login-links { display: none; }

/* ---- Lista compacta */
.modo-app .w-list .me { padding: 10px 12px 8px; gap: 10px; }
.modo-app .w-list .me .dp.lg { width: 56px; height: 56px; padding: 3px; border-radius: 10px; }
.modo-app .w-list .me .dp.lg img, .modo-app .w-list .me .dp.lg .ph { border-radius: 7px; }
.modo-app .me-name { font-size: 14px; }
.modo-app .me-name small { font-size: 11.5px; }
.modo-app .pm-input { font-size: 12px; padding: 2px 8px; }
.modo-app .list-tabs, .modo-app .list-foot { display: none; }
.lista-icones { display: none; }
.modo-lista .lista-icones { display: flex; flex-wrap: wrap; gap: 1px; padding: 0 8px 5px; border-bottom: 1px solid var(--line); }
.lista-icones button { width: 28px; height: 25px; border: 0; background: transparent; border-radius: 4px; font-family: var(--emoji); font-size: 14px; line-height: 1; display: grid; place-items: center; }
.lista-icones button:hover { background: var(--hover); box-shadow: inset 0 0 0 1px var(--line-strong); }
.lista-icones button.on { background: var(--press); box-shadow: inset 0 0 0 1px var(--line-strong); }
.modo-app .list-tools { padding: 7px 8px 5px; gap: 4px; }
.modo-app .search { height: 25px; border-radius: 3px; font-size: 12.5px; padding-left: 28px; background-position: 9px center; background-color: var(--glass-solid); }
.modo-app .list-tools .icon-btn { width: 26px; height: 26px; font-size: 14px; border-radius: 4px; }
.modo-app .clist { padding: 2px 2px 8px; }
.modo-app .grp-h { padding: 5px 6px 1px; margin-top: 2px; font-size: 12.5px; color: var(--text); }
.modo-app .grp-h .chev { font-size: 8px; color: var(--muted); }
.modo-app .grp-empty { padding: 1px 10px 3px 24px; font-size: 11.5px; }
.contact.compacto { gap: 5px; height: 21px; padding: 0 6px 0 14px; border-radius: 2px; }
.contact.compacto:hover { background: var(--hover); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.contact.compacto .linha { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; line-height: 21px; }
.contact.compacto .cn { display: inline; font-weight: 400; }
.contact.compacto .cp { display: inline; color: var(--muted); font-size: 12.5px; }
.contact.compacto .emo { font-size: 1.05em; }
.contact.compacto.offline .linha { opacity: .75; }
.contact.compacto.offline .ci { opacity: 1; }
.buddy {
  flex: none; width: 15px; height: 15px; background: var(--st-off);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='4.5' r='3.5'/%3E%3Cpath d='M1.3 15.5c.4-4 3.2-6.3 6.7-6.3s6.3 2.3 6.7 6.3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='4.5' r='3.5'/%3E%3Cpath d='M1.3 15.5c.4-4 3.2-6.3 6.7-6.3s6.3 2.3 6.7 6.3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.buddy.st-on { background: var(--st-on); }
.buddy.st-busy { background: var(--st-busy); }
.buddy.st-away { background: var(--st-away); }
.modo-app .req { padding: 6px 8px; gap: 6px; border-radius: 6px; }
.modo-app .req .dp.sm { width: 30px; height: 30px; }
.modo-app .requests { padding: 4px 6px 0; }
/* Janela de conversa estreita do app: mantém as imagens de exibição à direita, como no MSN */
@media (max-width: 760px) {
  .modo-conversa .chat-side { display: flex; width: 92px; }
  .modo-conversa .chat-side .dp.side { width: 84px; height: 84px; padding: 3px; }
  .modo-conversa .chat-main { gap: 8px; padding: 0 8px; }
}

/* =========================================================================
   Visual 2026 do app — "liquid glass", minimalista
   (mantém do MSN: moldura de status na foto, bonequinho, "Nome - mensagem", Online/Offline)
   ========================================================================= */
.modo-app {
  --lg-veil: linear-gradient(165deg, rgba(255, 255, 255, .6), rgba(232, 241, 255, .46));
  --lg-glow: radial-gradient(circle at 8% -6%, rgba(90, 75, 255, .30), transparent 46%), radial-gradient(circle at 108% 26%, rgba(23, 209, 160, .24), transparent 42%),
    radial-gradient(circle at 30% 112%, rgba(31, 143, 255, .26), transparent 52%);
  --lg-surface: rgba(255, 255, 255, .5);
  --lg-strong: rgba(255, 255, 255, .78);
  --lg-edge: rgba(255, 255, 255, .8);
  --lg-line: rgba(16, 32, 64, .08);
  --lg-hi: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(16, 32, 64, .04);
  --lg-shadow: 0 12px 32px -18px rgba(18, 38, 80, .45);
  --text: #0d1524; --muted: #576274; --faint: #8a94a6; --accent: #2f6bff;
  --hover: rgba(255, 255, 255, .55); --press: rgba(255, 255, 255, .75);
}
:root[data-theme="dark"].modo-app {
  --lg-veil: linear-gradient(165deg, rgba(22, 26, 40, .72), rgba(12, 15, 26, .64));
  --lg-surface: rgba(255, 255, 255, .06); --lg-strong: rgba(255, 255, 255, .11); --lg-edge: rgba(255, 255, 255, .13);
  --lg-line: rgba(255, 255, 255, .08); --lg-hi: inset 0 1px 0 rgba(255, 255, 255, .1); --lg-shadow: 0 12px 32px -16px rgba(0, 0, 0, .7);
  --text: #eef2f8; --muted: #a3afc2; --faint: #6f7b90; --accent: #6e95ff; --hover: rgba(255, 255, 255, .08); --press: rgba(255, 255, 255, .13);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]).modo-app {
    --lg-veil: linear-gradient(165deg, rgba(22, 26, 40, .72), rgba(12, 15, 26, .64));
    --lg-surface: rgba(255, 255, 255, .06); --lg-strong: rgba(255, 255, 255, .11); --lg-edge: rgba(255, 255, 255, .13);
    --lg-line: rgba(255, 255, 255, .08); --lg-hi: inset 0 1px 0 rgba(255, 255, 255, .1); --lg-shadow: 0 12px 32px -16px rgba(0, 0, 0, .7);
    --text: #eef2f8; --muted: #a3afc2; --faint: #6f7b90; --accent: #6e95ff; --hover: rgba(255, 255, 255, .08); --press: rgba(255, 255, 255, .13);
  }
}
.modo-app.vidro body { background: transparent; }
.modo-app.sem-vidro body {
  background: radial-gradient(at 12% 0%, #c7dbff 0, transparent 55%), radial-gradient(at 100% 35%, #cdf3e6 0, transparent 50%),
    radial-gradient(at 35% 100%, #e5dcff 0, transparent 55%), #f2f5fa;
}
:root[data-theme="dark"].modo-app.sem-vidro body { background: radial-gradient(at 12% 0%, #1d2c55 0, transparent 55%), radial-gradient(at 100% 35%, #12352c 0, transparent 50%), #0b0f1a; }
.modo-app body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--lg-glow), var(--lg-veil); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: block; flex: none; }

/* Barra de título própria */
#barraTitulo { display: none; }
.modo-app #barraTitulo {
  display: flex; position: fixed; top: 0; left: 0; right: 0; height: 38px; z-index: 9990; align-items: center; justify-content: space-between;
  padding: 0 5px 0 12px; user-select: none; app-region: drag; -webkit-app-region: drag;
}
.bt-marca { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bt-marca img { width: 18px; height: 18px; flex: none; }
.bt-titulo { font: 600 12.5px var(--font); color: var(--text); opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-botoes { display: flex; gap: 2px; app-region: no-drag; -webkit-app-region: no-drag; }
.bt-botoes button { width: 38px; height: 28px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.bt-botoes button:hover { background: var(--lg-strong); color: var(--text); }
.bt-botoes .bt-fechar:hover { background: #e5484d; color: #fff; }
.bt-botoes .ic { width: 14px; height: 14px; stroke-width: 1.8; }
/* Bordas invisíveis para redimensionar */
#bordas { display: none; }
.modo-app #bordas { display: block; }
.modo-app.maximizada #bordas { display: none; }
#bordas i { position: fixed; z-index: 9999; app-region: no-drag; -webkit-app-region: no-drag; }
#bordas [data-lado="n"] { top: 0; left: 8px; right: 8px; height: 4px; cursor: ns-resize; }
#bordas [data-lado="s"] { bottom: 0; left: 8px; right: 8px; height: 5px; cursor: ns-resize; }
#bordas [data-lado="w"] { left: 0; top: 8px; bottom: 8px; width: 5px; cursor: ew-resize; }
#bordas [data-lado="e"] { right: 0; top: 8px; bottom: 8px; width: 5px; cursor: ew-resize; }
#bordas [data-lado="nw"] { left: 0; top: 0; width: 8px; height: 8px; cursor: nwse-resize; }
#bordas [data-lado="ne"] { right: 0; top: 0; width: 8px; height: 8px; cursor: nesw-resize; }
#bordas [data-lado="sw"] { left: 0; bottom: 0; width: 8px; height: 8px; cursor: nesw-resize; }
#bordas [data-lado="se"] { right: 0; bottom: 0; width: 8px; height: 8px; cursor: nwse-resize; }
.modo-app #login { top: 38px; }
.modo-app .window { inset: 38px 0 0 0 !important; }
.vista-completa.modo-lista #novidades { top: 38px; }

/* Login */
.modo-app .login-card { padding: 0 24px 18px; gap: 10px; }
.modo-app .login-top .link { display: inline-flex; gap: 4px; align-items: center; padding: 4px 10px; border-radius: 999px; color: var(--muted); }
.modo-app .login-top .link:hover { background: var(--lg-surface); text-decoration: none; }
.modo-app #loginDp.dp.xl { width: 112px; height: 112px; border-radius: 32px; padding: 5px; background: var(--lg-strong); box-shadow: 0 0 0 1px var(--lg-edge), var(--lg-hi), 0 18px 40px -20px rgba(20, 40, 90, .5); }
.modo-app #loginDp img, .modo-app #loginDp .ph { border-radius: 27px; }
.modo-app .field > span { font-size: 12px; font-weight: 500; color: var(--muted); padding-left: 2px; }
.modo-app .field input, .modo-app .field select {
  height: 36px; border-radius: 11px; padding: 0 12px; font-size: 13.5px; background: var(--lg-strong);
  border: 1px solid var(--lg-edge); box-shadow: var(--lg-hi), 0 1px 2px rgba(16, 32, 64, .06);
}
.modo-app .field input:focus, .modo-app .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.modo-app .linha-status select { height: 28px; padding: 0 10px; border-radius: 999px; background: var(--lg-surface); border: 1px solid var(--lg-edge); box-shadow: var(--lg-hi); color: var(--text); font-weight: 600; font-size: 12.5px; }
.modo-app .check { font-size: 13px; gap: 10px; color: var(--text); }
.modo-app .check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; width: 32px; height: 19px; margin: 0; border-radius: 999px; position: relative; cursor: pointer;
  background: rgba(120, 130, 150, .32); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12); transition: background .2s;
}
.modo-app .check input[type="checkbox"]::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s cubic-bezier(.3, .7, .4, 1.3);
}
.modo-app .check input[type="checkbox"]:checked { background: #30c75e; }
.modo-app .check input[type="checkbox"]:checked::before { transform: translateX(13px); }
.modo-app #loginBtn.btn.big, .modo-app #loginBtn.btn.big:hover {
  width: 100%; height: 38px; margin-top: 8px; border-radius: 12px; border: 0; color: #fff; font-weight: 600; font-size: 14px;
  background: linear-gradient(180deg, #5289ff, #2f6bff); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 24px -12px rgba(47, 107, 255, .9);
}
.modo-app #loginBtn.btn.big:hover { filter: brightness(1.06); }
.modo-app .login-links { margin-top: 14px; gap: 4px; align-items: center; }
.modo-app .login-links .link { align-self: center; font-size: 12.5px; color: var(--accent); }

/* Lista */
.modo-app .w-list .me { margin: 4px 10px 8px; padding: 10px; border-radius: 18px; background: var(--lg-surface); box-shadow: 0 0 0 1px var(--lg-edge), var(--lg-hi), var(--lg-shadow); }
.modo-app .w-list .me::before { display: none; }
.modo-app .w-list .me .dp.lg { width: 54px; height: 54px; border-radius: 17px; padding: 3px; box-shadow: 0 0 0 2px var(--ring), 0 0 16px -3px var(--ring); }
.modo-app .w-list .me .dp.lg img, .modo-app .w-list .me .dp.lg .ph { border-radius: 14px; }
.modo-app .me-name { font: 650 14px var(--font-display); }
.modo-app .me-name small { color: var(--muted); }
.modo-app .pm-input { color: var(--muted); }
.modo-app .pm-input:focus { background: var(--lg-strong); }
.modo-lista .lista-icones { margin: 0 10px 6px; padding: 3px; border: 0; border-radius: 14px; background: var(--lg-surface); box-shadow: 0 0 0 1px var(--lg-edge), var(--lg-hi); justify-content: space-between; gap: 0; }
.lista-icones button { width: 28px; height: 28px; border-radius: 10px; color: var(--muted); }
.lista-icones button:hover { background: var(--lg-strong); box-shadow: none; color: var(--text); }
.lista-icones button.on { background: var(--lg-strong); color: var(--accent); box-shadow: none; }
.lista-icones .ic { width: 17px; height: 17px; }
.modo-app .list-tools { padding: 2px 10px 6px; gap: 6px; }
.modo-app .search { height: 32px; border-radius: 11px; background-color: var(--lg-strong); border: 1px solid var(--lg-edge); box-shadow: var(--lg-hi); padding-left: 32px; background-position: 11px center; }
.modo-app .list-tools .icon-btn { width: 32px; height: 32px; border-radius: 11px; color: var(--muted); background: var(--lg-surface); box-shadow: 0 0 0 1px var(--lg-edge), var(--lg-hi); }
.modo-app .list-tools .icon-btn:hover { background: var(--lg-strong); color: var(--text); }
.modo-app .grp-h { padding: 10px 12px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.modo-app .grp-h .count { color: var(--faint); font-weight: 600; }
.modo-app .grp-h .chev { font-size: 7px; }
.contact.compacto { height: 28px; margin: 0 6px; padding: 0 8px; gap: 8px; border-radius: 9px; }
.contact.compacto:hover, .contact.compacto:focus-visible { background: var(--lg-strong); box-shadow: 0 0 0 1px var(--lg-edge), var(--lg-hi); }
.contact.compacto .linha { font-size: 13px; line-height: 28px; }
.contact.compacto .cn { font-weight: 500; }
.contact.compacto .cp { color: var(--muted); font-size: 12.5px; }
.modo-app .grp-empty { padding-left: 30px; color: var(--faint); }
.modo-app .req { background: var(--lg-surface); border: 0; box-shadow: 0 0 0 1px var(--lg-edge), var(--lg-hi); border-radius: 14px; }

/* Conversa */
.modo-app .chat-head { padding: 4px 14px 8px; min-height: 0; }
.modo-app .chat-head::before { display: none; }
.modo-app .ch-to { font: 650 14px var(--font-display); }
.modo-app .chat-tools { margin: 0 10px 8px; padding: 3px; gap: 1px; width: fit-content; max-width: calc(100% - 20px); border-radius: 13px; background: var(--lg-surface); box-shadow: 0 0 0 1px var(--lg-edge), var(--lg-hi); }
.modo-app .chat-tools button { height: 30px; padding: 0 8px; border-radius: 10px; color: var(--muted); }
.modo-app .chat-tools button:hover { background: var(--lg-strong); color: var(--text); }
.modo-app .chat-tools .ico .ic { width: 17px; height: 17px; }
.modo-app .msgs, .modo-app .compose { background: var(--lg-surface); border: 0; border-radius: 16px; box-shadow: 0 0 0 1px var(--lg-edge), var(--lg-hi), var(--lg-shadow); }
.modo-app .compose:focus-within { box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent), var(--lg-shadow); }
.modo-app .compose-tools .icon-btn { color: var(--muted); border-radius: 9px; }
.modo-app .compose-tools .icon-btn:hover { background: var(--lg-strong); color: var(--text); }
.modo-app .compose-tools .gif-btn { color: var(--muted); }
.modo-app .send-btn { border-radius: 11px; background: linear-gradient(180deg, #5289ff, #2f6bff); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 20px -12px rgba(47, 107, 255, .9); }
.modo-app .chat-side .dp.side { border-radius: 22px; box-shadow: 0 0 0 2px var(--ring), 0 0 18px -4px var(--ring); }
.modo-app .chat-side .dp.side img, .modo-app .chat-side .dp.side .ph { border-radius: 18px; }
.modo-app .m-sys .pill { background: var(--lg-strong); border-color: var(--lg-edge); }

/* Servidor */
.modo-app .srv-side { border-right: 1px solid var(--lg-line); }
.modo-app .srv-members { border-left: 1px solid var(--lg-line); }
.modo-app .srv-side::before { opacity: .15; }

/* Código nick#1234 e convite para amigos */
.meu-codigo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--msgs-bg); border: 1px solid var(--line); }
.meu-codigo > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.meu-codigo span { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.meu-codigo b { font: 700 18px ui-monospace, Consolas, monospace; letter-spacing: .02em; user-select: all; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meu-codigo .btn { flex: none; }
.convite-texto { width: 100%; height: auto; min-height: 120px; margin-top: 10px; padding: 10px 12px; resize: none; font-size: 12.5px; line-height: 1.45; white-space: pre-wrap; }
.convite-acoes { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12.5px; }
.erro-campo { margin: -4px 0 0; min-height: 0; font-size: 12px; color: var(--danger); }
.erro-campo:empty { display: none; }
.modo-app .meu-codigo { background: var(--lg-surface); border-color: var(--lg-edge); box-shadow: var(--lg-hi); }

/* =========================================================================
   Estilos: Liquid Glass (padrão), Sólido (o mais leve) e Aurora (cores vivas)
   ========================================================================= */
/* --- Sólido: sem transparência nem desfoque --- */
:root[data-estilo="solido"] { --glass: #f4f6fa; --glass-strong: #ffffff; --msgs-bg: #ffffff; }
:root[data-estilo="solido"][data-theme="dark"] { --glass: #1b1d23; --glass-strong: #23262d; --msgs-bg: #16181d; }
@media (prefers-color-scheme: dark) { :root[data-estilo="solido"]:not([data-theme="light"]) { --glass: #1b1d23; --glass-strong: #23262d; --msgs-bg: #16181d; } }
:root[data-estilo="solido"] *, :root[data-estilo="solido"] *::before, :root[data-estilo="solido"] *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
:root[data-estilo="solido"] .aurora { display: none; }
:root[data-estilo="solido"] body { background: var(--bg); }
:root[data-estilo="solido"].modo-app {
  --lg-glow: linear-gradient(#0000, #0000); --lg-veil: linear-gradient(#f1f3f7, #f1f3f7);
  --lg-surface: #ffffff; --lg-strong: #ffffff; --lg-edge: #e2e6ee; --lg-line: #e6e9ef;
  --lg-hi: 0 0 #0000; --lg-shadow: 0 1px 2px rgba(16, 24, 40, .06);
  --hover: #e9edf4; --press: #dfe4ec;
}
:root[data-estilo="solido"][data-theme="dark"].modo-app {
  --lg-veil: linear-gradient(#141519, #141519); --lg-surface: #1e2026; --lg-strong: #262930; --lg-edge: #30333b; --lg-line: #2a2d34;
  --lg-shadow: 0 1px 2px rgba(0, 0, 0, .4); --hover: #262930; --press: #2e3139;
}
@media (prefers-color-scheme: dark) {
  :root[data-estilo="solido"]:not([data-theme="light"]).modo-app {
    --lg-veil: linear-gradient(#141519, #141519); --lg-surface: #1e2026; --lg-strong: #262930; --lg-edge: #30333b; --lg-line: #2a2d34;
    --lg-shadow: 0 1px 2px rgba(0, 0, 0, .4); --hover: #262930; --press: #2e3139;
  }
}
:root[data-estilo="solido"].modo-app body { background: #f1f3f7; }
:root[data-estilo="solido"][data-theme="dark"].modo-app body { background: #141519; }
@media (prefers-color-scheme: dark) { :root[data-estilo="solido"]:not([data-theme="light"]).modo-app body { background: #141519; } }
:root[data-estilo="solido"] .modo-app .w-list .me .dp.lg, :root[data-estilo="solido"].modo-app .w-list .me .dp.lg { box-shadow: 0 0 0 2px var(--ring); }

/* --- Aurora: vidro com roxo, rosa e laranja --- */
:root[data-estilo="aurora"] { --aurora-1: #ff6ad5; --aurora-2: #8b5cf6; --aurora-3: #ff9a3c; --aurora-4: #22d3ee; --aurora-5: #f43f5e; --accent: #7c4dff; }
:root[data-estilo="aurora"].modo-app {
  --lg-glow: radial-gradient(circle at 0% 0%, rgba(168, 85, 247, .55), transparent 50%), radial-gradient(circle at 105% 30%, rgba(236, 72, 153, .42), transparent 46%),
    radial-gradient(circle at 25% 110%, rgba(251, 146, 60, .45), transparent 55%), radial-gradient(circle at 100% 100%, rgba(34, 211, 238, .30), transparent 45%);
  --lg-veil: linear-gradient(165deg, rgba(255, 255, 255, .5), rgba(250, 240, 255, .38));
  --accent: #7c4dff;
}
:root[data-estilo="aurora"][data-theme="dark"].modo-app { --lg-veil: linear-gradient(165deg, rgba(20, 12, 36, .62), rgba(10, 8, 22, .56)); --accent: #a78bfa; }
@media (prefers-color-scheme: dark) { :root[data-estilo="aurora"]:not([data-theme="light"]).modo-app { --lg-veil: linear-gradient(165deg, rgba(20, 12, 36, .62), rgba(10, 8, 22, .56)); --accent: #a78bfa; } }
:root[data-estilo="aurora"].modo-app.sem-vidro body { background: radial-gradient(at 10% 0%, #e9d5ff 0, transparent 55%), radial-gradient(at 100% 40%, #fbcfe8 0, transparent 50%), radial-gradient(at 30% 100%, #fed7aa 0, transparent 55%), #faf5ff; }
:root[data-estilo="aurora"][data-theme="dark"].modo-app.sem-vidro body { background: radial-gradient(at 10% 0%, #3b1a6b 0, transparent 55%), radial-gradient(at 100% 40%, #5a1640 0, transparent 50%), #0f0a1a; }
:root[data-estilo="aurora"].modo-app #loginBtn.btn.big, :root[data-estilo="aurora"].modo-app .send-btn, :root[data-estilo="aurora"] .btn.primary {
  background: linear-gradient(135deg, #8b5cf6, #ec4899); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 12px 24px -12px rgba(168, 85, 247, .9);
}

/* --- Janela "Aparência" --- */
.estilos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.estilo-card { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: left; padding: 8px 8px 10px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--msgs-bg); color: var(--text); transition: border-color .15s, transform .15s; }
.estilo-card:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line-strong)); }
.estilo-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.estilo-card b { font-size: 13px; margin-top: 4px; }
.estilo-card small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.estilo-prev { position: relative; width: 100%; height: 62px; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; gap: 5px; padding: 8px; }
.estilo-prev i { display: block; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .75); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); }
.estilo-prev i:nth-child(1) { width: 70%; } .estilo-prev i:nth-child(2) { width: 90%; } .estilo-prev i:nth-child(3) { width: 50%; }
.ep-vidro { background: radial-gradient(circle at 0 0, #8f7bff 0, transparent 60%), radial-gradient(circle at 100% 40%, #6ff0c0 0, transparent 55%), linear-gradient(#cfe0ff, #e8f0ff); }
.ep-vidro i { background: rgba(255, 255, 255, .55); backdrop-filter: blur(4px); }
.ep-solido { background: #eef1f6; }
.ep-solido i { background: #fff; box-shadow: 0 0 0 1px #dde2ea; }
.ep-aurora { background: radial-gradient(circle at 0 0, #a855f7 0, transparent 60%), radial-gradient(circle at 100% 30%, #ec4899 0, transparent 55%), radial-gradient(circle at 30% 120%, #fb923c 0, transparent 60%), #f5e9ff; }
.ep-aurora i { background: rgba(255, 255, 255, .5); }
.modo-seg { display: flex; padding: 3px; gap: 3px; border-radius: 12px; background: var(--hover); }
.modo-seg button { flex: 1; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13px; }
.modo-seg button.on { background: var(--glass-strong); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
@media (max-width: 440px) { .estilos { grid-template-columns: 1fr; } .estilo-prev { height: 44px; } }

/* --- Medidor de senha (cadastro) --- */
.senha-forca { display: flex; flex-direction: column; gap: 5px; margin-top: -2px; }
.senha-forca[hidden] { display: none; }
.sf-barra { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.sf-barra i { height: 4px; border-radius: 4px; background: var(--line-strong); transition: background .2s; }
.senha-forca[data-forca="1"] .sf-barra i:nth-child(-n+1) { background: #ef4444; }
.senha-forca[data-forca="2"] .sf-barra i:nth-child(-n+2) { background: #f59e0b; }
.senha-forca[data-forca="3"] .sf-barra i:nth-child(-n+3) { background: #22c55e; }
.senha-forca[data-forca="4"] .sf-barra i { background: #16a34a; }
.sf-rotulo { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.sf-regras { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px 10px; font-size: 11.5px; color: var(--muted); }
.sf-regras li::before { content: "○"; display: inline-block; width: 15px; color: var(--faint); }
.sf-regras li.ok { color: var(--text); }
.sf-regras li.ok::before { content: "✓"; color: #16a34a; font-weight: 700; }
.termos-box { display: flex; flex-direction: column; gap: 2px; }
.termos-box .link { align-self: flex-start; font-size: 12px; padding-left: 42px; }
.login-card:not(.register) .termos-box { display: none; }

/* --- Leitor de termos e política --- */
.doc-abas { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--hover); }
.doc-abas button { flex: 1; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-abas button[aria-selected="true"] { background: var(--glass-strong); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.doc-leitor { max-height: min(52vh, 440px); overflow-y: auto; padding: 4px 14px 10px 2px; font-size: 13.5px; line-height: 1.55; overscroll-behavior: contain; }
.doc-leitor h1 { display: none; }
.doc-leitor h2 { font: 650 14.5px var(--font-display); margin: 16px 0 4px; }
.doc-leitor p, .doc-leitor ul { margin: 0 0 8px; }
.doc-leitor ul { padding-left: 20px; }
.doc-leitor li { margin: 2px 0; }
.doc-leitor .meta { color: var(--muted); font-size: 12px; }
.doc-leitor .draft { padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, #f59e0b 14%, transparent); font-size: 12px; }
.doc-leitor table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.doc-leitor th, .doc-leitor td { border-bottom: 1px solid var(--line); padding: 5px 6px; text-align: left; vertical-align: top; }
.doc-carregando { color: var(--muted); }

/* =========================================================================
   Ícones da marca (icones.js): traço + preenchimento suave
   ========================================================================= */
.ic .f { fill: currentColor; stroke: none; opacity: .17; transition: opacity .15s; }
button:hover > .ic .f, button:hover .ico .ic .f, .on > .ic .f { opacity: .3; }
.compose-tools .gif-btn, .compose-tools .aa { border: 0; width: 32px; height: 30px; padding: 0; margin: 0; font: inherit; display: grid; place-items: center; }
.compose-tools .icon-btn .ic { width: 20px; height: 20px; }
.compose-tools .icon-btn:hover { color: var(--accent); }
.chat-tools .ico .ic { width: 19px; height: 19px; }
.chat-tools button:hover .ico { color: var(--accent); }
.ctx button .mi { display: grid; place-items: center; color: var(--muted); }
.ctx button .mi .ic { width: 17px; height: 17px; }
.ctx button:hover .mi { color: var(--accent); }
.ctx button.danger .mi { color: var(--danger); }
.toast .t-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.toast .t-ico .ic { width: 22px; height: 22px; }
.modal h2 .m-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 8px; vertical-align: -7px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.modal h2 .m-ic .ic { width: 18px; height: 18px; }
.srv-ch-head .icon-btn .ic { width: 18px; height: 18px; }

/* =========================================================================
   Chamada: quadros posicionados pelo layoutCall() (cabe em qualquer tamanho)
   ========================================================================= */
.call-grid { display: block; position: relative; padding: 0; margin: 2px 8px 4px; }
.call-grid .tile { position: absolute; transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease, box-shadow .15s; }
.call-grid .tile-av .dp { width: var(--av, 96px); height: var(--av, 96px); padding: calc(var(--av, 96px) * .045); border-radius: calc(var(--av, 96px) * .28); }
.call-grid .tile-av .dp img, .call-grid .tile-av .dp .ph { border-radius: calc(var(--av, 96px) * .24); }
.call-grid .tile-av .ph { font-size: calc(var(--av, 96px) * .44); }
.tile-name { display: flex; align-items: center; gap: 5px; }
.tile-name .tn { overflow: hidden; text-overflow: ellipsis; }
.tile-name .ic { width: 14px; height: 14px; }
.tile-name .tn-ic { color: #ff8a94; display: grid; }
.tile.mini .tile-name { left: 5px; bottom: 5px; padding: 1px 7px; font-size: 11px; }
.tile.mini .tile-st { top: 5px; left: 5px; font-size: 10.5px; }
.tile-acts { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.tile:hover .tile-acts, .tile:focus-within .tile-acts { opacity: 1; }
.tile-acts button { width: 30px; height: 30px; border: 0; border-radius: 9px; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .5); backdrop-filter: blur(6px); }
.tile-acts button:hover { background: rgba(0, 0, 0, .72); }
.tile-acts button.on { background: var(--accent); }
.tile-acts .ic { width: 16px; height: 16px; }
.tile.mini .tile-acts button { width: 24px; height: 24px; border-radius: 7px; }
.tile.mini .tile-acts .ic { width: 13px; height: 13px; }
@media (hover: none) { .tile-acts { opacity: 1; } }
.call-split { position: absolute; z-index: 3; cursor: col-resize; touch-action: none; }
.call-split[data-lado="bottom"] { cursor: row-resize; }
.call-split::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 44px; transform: translate(-50%, -50%); border-radius: 4px; background: rgba(255, 255, 255, .28); transition: background .15s, height .15s; }
.call-split[data-lado="bottom"]::after { width: 44px; height: 4px; }
.call-split:hover::after, .call-split.arrastando::after { background: var(--accent); height: 64px; }
.call-split[data-lado="bottom"]:hover::after, .call-split[data-lado="bottom"].arrastando::after { width: 64px; height: 4px; }
.call-bar { gap: 8px; padding: 6px 10px 10px; }
.call-btns { gap: clamp(4px, 1.6vw, 8px); flex-wrap: nowrap; }
.cbtn { width: clamp(36px, 10.5vw, 48px); height: clamp(34px, 10vw, 44px); border-radius: 13px; font-family: inherit; }
.cbtn .ic { width: 20px; height: 20px; }
.cbtn.off::after { content: none; }
.cbtn.off { color: #ffb3ba; }
.cbtn.danger { color: #fff; }
.cbtn.danger .ic .f { opacity: .35; }
@media (max-width: 460px) { .call-timer, .call-count { display: none; } .call-bar { justify-content: center; } }

/* Conversa em chamada: lado a lado na janela larga; empilhado (chamada em cima) na estreita */
.em-chamada.modo-app .w-call { width: clamp(300px, 46vw, 620px) !important; }
.em-chamada.modo-conversa .w-chat, .em-chamada.modo-servidor .w-server { right: clamp(300px, 46vw, 620px) !important; }
@media (max-width: 720px) {
  .em-chamada.modo-app .w-call { width: auto !important; left: 0 !important; right: 0 !important; bottom: auto !important; height: 56vh !important; border-left: 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .em-chamada.modo-conversa .w-chat, .em-chamada.modo-servidor .w-server { right: 0 !important; top: calc(56vh + 38px) !important; }
}
.nudge-tool .ico { color: #f59e0b; }

/* --- Janela "Compartilhar": escolhas em botões --- */
.esc-grupo { display: flex; flex-direction: column; gap: 6px; }
.esc-grupo > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.esc-ops { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 6px; }
.esc { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--msgs-bg); color: var(--text); text-align: left; }
.esc b { font-size: 13px; }
.esc small { font-size: 11px; color: var(--muted); }
.esc:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line-strong)); }
.esc.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.esc-aviso { margin: 0; font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------- Entrar com o Google */
.google-wrap { display: grid; gap: 10px; }
.google-wrap[hidden] { display: none; }
.google-wrap .ou { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.google-wrap .ou::before, .google-wrap .ou::after { content: ""; flex: 1; height: 1px; background: var(--line, rgba(127,127,127,.25)); }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; }
.google-btn:hover { background: #f6f8fb; }
:root[data-theme="dark"] .google-btn { background: #131314; color: #e3e3e3; border-color: #8e918f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .google-btn { background: #131314; color: #e3e3e3; border-color: #8e918f; } }
.gc-nick { display: flex; align-items: center; gap: 6px; }
.gc-nick .input { flex: 1; min-width: 0; font-size: 14px; color: var(--text); }
.gc-nick em { font-size: 13px; font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
