* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  background: #14161a;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #e8eaef;
}

.hidden { display: none !important; }

#game { position: fixed; inset: 0; }

/* ---------- Login ---------- */
#login {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(217, 182, 76, 0.08), transparent),
    linear-gradient(160deg, #191c22 0%, #101216 100%);
}

.card {
  width: 420px; max-width: 94vw;
  background: #1d2127;
  border: 1px solid #2c323b;
  border-radius: 16px;
  padding: 28px 30px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  display: flex; flex-direction: column; gap: 16px;
}

.brand { display: flex; align-items: center; justify-content: center; gap: 12px; padding-bottom: 6px; }
.brand-s {
  font-family: Georgia, serif; font-size: 44px; font-weight: 900;
  background: linear-gradient(180deg, #ffffff, #9aa2ab);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-top { font-size: 11px; letter-spacing: 6px; color: #b9c0c9; }
.brand-main {
  font-size: 30px; font-weight: 800; letter-spacing: 2px;
  background: linear-gradient(180deg, #ffffff, #9aa2ab);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-hub {
  font-size: 12px; font-weight: 700; letter-spacing: 3px; color: #14161a;
  background: #d9b64c; border-radius: 6px; padding: 4px 8px; align-self: flex-start;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.preset-grid img {
  width: 72px; height: 72px;
  object-fit: contain;
  background: #f4f1e9;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 6px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.preset-grid img:hover { border-color: rgba(217, 182, 76, 0.5); }
.preset-grid img.sel {
  border-color: #d9b64c;
  transform: scale(1.06);
}

#personalize-btn {
  background: #14171c; border: 1px solid #2c323b; border-radius: 10px;
  padding: 10px; color: #e8eaef; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease;
}
#personalize-btn:hover { border-color: #d9b64c; background: #1a1e24; }

.credits-link {
  align-self: center; font-size: 11px; color: #667085;
  text-decoration: none; margin-top: -6px;
}
.credits-link:hover { color: #d9b64c; text-decoration: underline; }

#name {
  background: #14171c; border: 1px solid #2c323b; border-radius: 10px;
  padding: 12px 14px; color: #e8eaef; font-size: 15px; outline: none;
}
#name:focus { border-color: #d9b64c; }

#enter {
  background: linear-gradient(180deg, #e6c55e, #cba43b);
  color: #14161a; font-weight: 800; font-size: 15px;
  border: none; border-radius: 10px; padding: 13px; cursor: pointer;
  letter-spacing: 0.4px;
}
#enter:hover { filter: brightness(1.07); }

.hint { font-size: 11px; color: #778; text-align: center; line-height: 1.6; }

/* ---------- Tela de carregamento ---------- */
#loading {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(217, 182, 76, 0.08), transparent),
    linear-gradient(160deg, #191c22 0%, #101216 100%);
}
#load-phrase {
  font-size: 17px; font-weight: 600; color: #d7dbe2;
  font-style: italic; text-align: center; max-width: 80vw;
  transition: opacity 0.25s ease;
  min-height: 24px;
}
.load-bar {
  width: 240px; height: 5px; border-radius: 999px;
  background: #2c323b; overflow: hidden;
}
.load-bar i {
  display: block; height: 100%; width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, #cba43b, #e6c55e);
  animation: loadslide 1.1s ease-in-out infinite;
}
@keyframes loadslide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(340%); }
}

/* ---------- Rail fina estilo SoWork (Fase C) ---------- */
#rail {
  position: fixed; top: 12px; left: 12px; bottom: 12px; z-index: 37;
  width: 56px;
  background: #f7f8fa;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.12);
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0;
  gap: 8px;
  color: #667085;
}
.rail-logo {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(160deg, #23262d, #3c4149);
  color: #e8c968; font-family: Georgia, serif; font-weight: 900; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.rail-btn {
  position: relative;
  width: 40px; height: 40px; border-radius: 12px; border: none; cursor: pointer;
  background: transparent; color: #667085;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background 0.12s ease, color 0.12s ease;
}
.rail-btn:hover { background: #eef0f3; color: #1d2433; }
.rail-btn.active {
  background: #ffffff; color: #1d2433;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.14);
}
.rail-kbd {
  font-size: 9.5px; font-weight: 700; color: #98a2b3;
  letter-spacing: 0.4px; margin-top: -6px;
}
.rail-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.rail-foot { margin-top: auto; }
.rail-badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: #e5484d; color: #fff; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #f7f8fa;
}

/* ---------- Painéis laterais (Pessoas / Chat / Notificações / Calendário) ---------- */
.panel {
  position: fixed; top: 12px; left: 76px; bottom: 12px; z-index: 35;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.16);
  display: flex; flex-direction: column;
  color: #1d2433;
  overflow: hidden;
}
#sidebar { width: 264px; }
#chat-panel { width: 320px; }
#notif-panel { width: 280px; }
#cal-panel { width: 280px; }

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 10px; flex-shrink: 0;
}
.panel-title { font-weight: 700; font-size: 15px; }
.panel-close {
  width: 26px; height: 26px; border: none; border-radius: 7px; cursor: pointer;
  background: #f1f3f6; color: #667085; font-size: 15px; line-height: 1;
}
.panel-close:hover { background: #e4e7ec; }

.sb-team { display: flex; align-items: center; gap: 9px; }
.sb-title { font-weight: 700; font-size: 15px; }

.sb-search { padding: 0 14px 10px; }
#sb-filter {
  width: 100%; border: 1px solid #e4e7ec; border-radius: 9px;
  padding: 8px 11px; font-size: 13px; outline: none; color: #1d2433;
  background: #f8f9fb;
}
#sb-filter:focus { border-color: #a9b4c4; }

.sb-scroll { flex: 1; overflow-y: auto; padding: 2px 8px 12px; }
.sb-scroll::-webkit-scrollbar { width: 8px; }
.sb-scroll::-webkit-scrollbar-thumb { background: #e0e4ea; border-radius: 4px; }

.sb-section {
  font-size: 12px; font-weight: 600; color: #667085;
  padding: 10px 8px 6px;
}
.sb-person {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 10px; cursor: default;
}
.sb-person:hover { background: #f4f6f9; }
.sb-ava {
  position: relative; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #3d4451; flex-shrink: 0;
}
.sb-ava i {
  position: absolute; right: -1px; bottom: -1px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #12b76a; border: 2px solid #fff;
}
.sb-person.off .sb-ava i { background: #d0d5dd; }
.sb-person.off { opacity: 0.62; }
.sb-info { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sb-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-status { font-size: 11.5px; color: #667085; }

/* ---------- Pill de localização ---------- */
#top-pill {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 32;
  display: flex; align-items: center; gap: 8px;
  background: #ffffff; color: #1d2433;
  border: 1px solid #e4e7ec; border-radius: 12px;
  padding: 9px 16px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.14);
  white-space: nowrap;
}
.tp-icon { font-size: 14px; }

/* ---------- Vídeos ---------- */
#videos {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 30; flex-wrap: wrap; justify-content: center;
  max-width: 84vw;
}
.tile {
  position: relative; width: 176px; height: 132px;
  background: #0d0f12; border: 2px solid #ffffff; border-radius: 14px;
  overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.tile video { width: 100%; height: 100%; object-fit: cover; }
.tile span {
  position: absolute; left: 8px; bottom: 6px;
  font-size: 11px; font-weight: 600; color: #fff;
  background: rgba(0, 0, 0, 0.55); padding: 2px 8px; border-radius: 6px;
}

#local-tile {
  position: fixed; right: 14px; bottom: 78px; z-index: 30;
  width: 150px; height: 112px;
  background: #0d0f12; border: 2px solid #ffffff; border-radius: 14px;
  overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
#local-tile video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
#local-tile span {
  position: absolute; left: 8px; bottom: 6px;
  font-size: 11px; font-weight: 600; color: #fff;
  background: rgba(0, 0, 0, 0.55); padding: 2px 8px; border-radius: 6px;
}

/* ---------- Bolha de vídeo sobre o avatar (estilo SoWork) ---------- */
/* Quando não há call (≤1 peer conectado) e a câmera está ligada, o tile
   local e os tiles remotos deixam o layout fixo/grade e viram bolhas
   posicionadas via transform: translate3d, atualizado a cada frame em
   main.js (updateVideoBubbles). top:0/left:0 é a âncora — a posição real
   vem do translate3d, não de right/bottom. */
#local-tile.bubble,
.tile.bubble {
  position: fixed; top: 0; left: 0; right: auto; bottom: auto;
  width: 72px; height: 72px; border-radius: 50%;
  border: 2px solid #ffffff; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  cursor: pointer; pointer-events: auto;
  will-change: transform;
}
#local-tile.bubble video,
.tile.bubble video { border-radius: 50%; transform: scaleX(-1); }
.tile.bubble video { transform: none; } /* só o preview local é espelhado */
#local-tile.bubble span,
.tile.bubble span { display: none; } /* nome via title/tooltip, bolha fica limpa */
/* "rabinho" apontando pro boneco embaixo */
#local-tile.bubble::after,
.tile.bubble::after {
  content: ''; position: absolute; left: 50%; bottom: -7px;
  width: 13px; height: 13px; background: #ffffff;
  transform: translateX(-50%) rotate(45deg); border-radius: 3px; z-index: -1;
}

/* container de vídeos remotos: em modo bolha os tiles são posicionados
   individualmente via transform, então o container não deve fazer layout
   de flexbox por cima (senão os tiles voltam a empilhar no topo). */
#videos.bubble-mode { position: static; display: block; }

/* ---------- Barra de controles (estilo Gather) ---------- */
#bar {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  z-index: 32; display: flex; align-items: center; gap: 8px;
  background: #1b1e24; border-radius: 999px; padding: 8px 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}
#bar-avatar {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  background: #f4b8c8; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #3d4451; margin-right: 2px;
}
#bar-avatar i {
  position: absolute; right: 0; bottom: 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: #12b76a; border: 2px solid #1b1e24;
}
#bar button {
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: #2c323b; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
#bar button:hover { background: #3a414c; }
#bar button.off { background: #5c2220; }
#bar button.off:hover { background: #742b28; }
#bar button:disabled { opacity: 0.35; cursor: default; }
#exit { background: #402327 !important; }
#exit:hover { background: #b3352e !important; }
.bar-sep { width: 1px; height: 26px; background: #363c46; margin: 0 2px; }

/* ícones de linha (estilo lucide) dentro da barra, zoom e users */
#bar button .icon, #zoomctl button .icon, .rail-btn .icon { display: block; stroke: currentColor; }
#bar button .i-off { display: none; }
#bar button.off .i-on { display: none; }
#bar button.off .i-off { display: block; }

#emoji-pop {
  position: fixed; bottom: 74px; left: 50%; transform: translateX(-50%);
  z-index: 33; display: flex; gap: 4px;
  background: #1b1e24; border-radius: 14px; padding: 8px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}
#emoji-pop button {
  width: 38px; height: 38px; border: none; border-radius: 10px;
  background: transparent; font-size: 20px; cursor: pointer;
}
#emoji-pop button:hover { background: #2c323b; }

/* ---------- Minimapa ---------- */
#minimap {
  position: fixed; left: 14px; bottom: 16px; z-index: 30;
  border-radius: 14px;
  background: #1b1e24;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
/* qualquer painel do rail aberto (pessoas/chat/notif/calendário) empurra o
   minimapa — usa a largura do maior painel (chat, 320px) como folga comum,
   assim não recalcula por painel. */
body.sb-openned #minimap { left: 410px; }

/* ---------- Zoom ---------- */
#zoomctl {
  position: fixed; right: 14px; bottom: 16px; z-index: 30;
  display: flex; flex-direction: column; gap: 6px;
}
#zoomctl button {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid #e4e7ec;
  background: #ffffff; color: #1d2433; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.14);
}
#zoomctl button:hover { background: #f4f6f9; }

/* ---------- Card de perfil ---------- */
#profile-card, #self-card {
  position: fixed; top: 70px; right: 14px; z-index: 36;
  width: 250px;
  background: #ffffff; color: #1d2433;
  border: 1px solid #e4e7ec; border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.18);
  display: flex; flex-direction: column; gap: 9px;
}
#pc-close, #sc-close {
  position: absolute; top: 8px; right: 10px;
  border: none; background: transparent; color: #98a2b3;
  font-size: 18px; cursor: pointer;
}
.pc-head { display: flex; align-items: center; gap: 11px; margin-bottom: 4px; }
#pc-ava, #sc-ava {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: #3d4451;
}
.pc-info { display: flex; flex-direction: column; line-height: 1.3; }
#pc-name, #sc-name { font-weight: 700; font-size: 15px; }
#pc-status, #sc-status { font-size: 12px; color: #667085; }
#pc-wave, #sc-wardrobe {
  border: none; border-radius: 10px; padding: 11px; cursor: pointer;
  background: #6a53c9; color: #fff; font-weight: 700; font-size: 13.5px;
}
#pc-wave:hover, #sc-wardrobe:hover { filter: brightness(1.08); }
#pc-goto {
  border: 1px solid #e4e7ec; border-radius: 10px; padding: 10px; cursor: pointer;
  background: #fff; color: #1d2433; font-weight: 600; font-size: 13.5px;
}
#pc-goto:hover { background: #f4f6f9; }

/* ---------- Guarda-Roupa ---------- */
#wardrobe {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(10, 12, 16, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.wr-box {
  width: 880px; height: 620px; max-width: 100%; max-height: 100%;
  background: #1d2127; color: #e8eaef;
  border: 1px solid #2c323b; border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  display: flex; flex-direction: column; overflow: hidden;
}
.wr-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid #2c323b; flex-shrink: 0;
}
.wr-title { font-weight: 800; font-size: 16px; }
#wr-close {
  border: none; background: transparent; color: #98a2b3;
  font-size: 20px; cursor: pointer; line-height: 1;
}
#wr-close:hover { color: #e8eaef; }

.wr-tabs { display: flex; gap: 6px; padding: 12px 18px 0; flex-shrink: 0; }
.wr-tab {
  border: 1px solid #2c323b; background: #14171c; color: #b9c0c9;
  border-radius: 999px; padding: 7px 16px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease;
}
.wr-tab:hover { border-color: #3a414c; }
.wr-tab.sel { border-color: #d9b64c; color: #d9b64c; background: rgba(217, 182, 76, 0.08); }

.wr-body {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 168px 1fr 220px;
  gap: 12px; padding: 14px 18px;
}
@media (max-width: 720px) {
  .wr-body { grid-template-columns: 1fr; grid-auto-rows: auto; overflow-y: auto; }
}

.wr-cats {
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto; padding-right: 4px;
}
.wr-cat {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid transparent; background: transparent; color: #c6cbd3;
  border-radius: 10px; padding: 6px 8px; cursor: pointer; text-align: left;
}
.wr-cat:hover { background: #262b33; }
.wr-cat.sel { border-color: #d9b64c; background: rgba(217, 182, 76, 0.10); color: #f0d98b; }
.wr-cat-thumb {
  width: 32px; height: 32px; border-radius: 8px; overflow: hidden; flex-shrink: 0;
  background: #14171c; display: flex; align-items: center; justify-content: center;
}
.wr-cat-thumb img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.wr-cat-label { font-size: 12.5px; font-weight: 600; }

.wr-items {
  overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px; align-content: start; padding-right: 4px;
}
.wr-item {
  width: 100%; aspect-ratio: 1; border-radius: 10px;
  border: 2px solid transparent; background: #f4f1e9; padding: 4px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.wr-item:hover { border-color: rgba(217, 182, 76, 0.5); }
.wr-item.sel { border-color: #d9b64c; transform: scale(1.05); }
.wr-item img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }

.wr-preview {
  display: flex; align-items: center; justify-content: center;
  background: #14171c; border: 1px solid #2c323b; border-radius: 12px;
  overflow: hidden;
}
#wr-preview-canvas { width: 192px; height: 256px; image-rendering: pixelated; }

.wr-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 18px; border-top: 1px solid #2c323b; flex-shrink: 0;
}
#wr-cancel {
  border: 1px solid #2c323b; border-radius: 10px; padding: 10px 18px; cursor: pointer;
  background: transparent; color: #c6cbd3; font-weight: 600; font-size: 13.5px;
}
#wr-cancel:hover { background: #262b33; }
#wr-save {
  border: none; border-radius: 10px; padding: 10px 20px; cursor: pointer;
  background: linear-gradient(180deg, #e6c55e, #cba43b);
  color: #14161a; font-weight: 800; font-size: 13.5px;
}
#wr-save:hover { filter: brightness(1.07); }

/* ---------- Busca global (⌘K) ---------- */
#cmdk {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(16, 20, 28, 0.35);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 14vh;
}
.ck-box {
  width: 420px; max-width: 92vw;
  background: #ffffff; color: #1d2433;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 80px rgba(16, 24, 40, 0.35);
}
#cmdk-input {
  width: 100%; border: none; outline: none;
  padding: 16px 18px; font-size: 15px; color: #1d2433;
  border-bottom: 1px solid #eef1f4;
}
#cmdk-list { max-height: 300px; overflow-y: auto; padding: 8px; }
.ck-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px; cursor: pointer;
}
.ck-row:hover { background: #f0edff; }
.ck-empty { padding: 18px; text-align: center; color: #98a2b3; font-size: 13px; }
.ck-hint {
  padding: 9px 14px; font-size: 11px; color: #98a2b3;
  border-top: 1px solid #eef1f4; background: #fafbfc;
}

/* ---------- Toasts ---------- */
#toasts {
  position: fixed; top: 64px; right: 14px; z-index: 40;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  background: #ffffff; color: #1d2433;
  border: 1px solid #e4e7ec; border-radius: 12px;
  padding: 11px 16px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.18);
  opacity: 0; transform: translateY(-8px);
  transition: all 0.3s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ---------- Chat (Fase C) ---------- */
.chat-list-view { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 10px 12px; }
.chat-row {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 10px; border: none; background: transparent;
  cursor: pointer; text-align: left; color: #1d2433;
}
.chat-row:hover { background: #f4f6f9; }
.chat-row-ava {
  position: relative; width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #3d4451;
}
.chat-row-ava-general { background: #e8ecf1; color: #667085; font-weight: 800; }
.chat-row-name {
  flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-row.off { opacity: 0.55; }
.chat-row-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #e5484d; color: #fff; font-size: 10.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chat-list-sep {
  font-size: 12px; font-weight: 600; color: #667085;
  padding: 12px 8px 6px;
}
#chat-people:empty::after {
  content: 'Ninguém online agora';
  display: block; padding: 8px; font-size: 12.5px; color: #98a2b3;
}

.chat-thread-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-thread-head {
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px 10px; border-bottom: 1px solid #eef1f4; flex-shrink: 0;
}
.chat-back {
  width: 26px; height: 26px; border: none; border-radius: 7px; cursor: pointer;
  background: #f1f3f6; color: #667085; font-size: 14px; flex-shrink: 0;
}
.chat-back:hover { background: #e4e7ec; }
.chat-thread-title { font-weight: 700; font-size: 14px; }

.chat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { display: flex; flex-direction: column; max-width: 82%; gap: 2px; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg.theirs { align-self: flex-start; align-items: flex-start; }
.chat-msg-meta { font-size: 10.5px; color: #98a2b3; padding: 0 4px; }
.chat-msg-bubble {
  padding: 8px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.4;
  word-break: break-word; white-space: pre-wrap;
}
.chat-msg.mine .chat-msg-bubble {
  background: linear-gradient(180deg, #e6c55e, #cba43b); color: #14161a;
  border-bottom-right-radius: 4px;
}
.chat-msg.theirs .chat-msg-bubble {
  background: #f1f3f6; color: #1d2433;
  border-bottom-left-radius: 4px;
}
.chat-empty { margin: auto; text-align: center; color: #98a2b3; font-size: 12.5px; padding: 20px; }

.chat-input-row {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 14px; border-top: 1px solid #eef1f4; flex-shrink: 0;
}
#chat-input {
  flex: 1; border: 1px solid #e4e7ec; border-radius: 999px;
  padding: 9px 14px; font-size: 13px; outline: none; color: #1d2433;
  background: #f8f9fb;
}
#chat-input:focus { border-color: #a9b4c4; }
#chat-send {
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer; flex-shrink: 0;
  background: linear-gradient(180deg, #e6c55e, #cba43b); color: #14161a;
  display: flex; align-items: center; justify-content: center;
}
#chat-send:hover { filter: brightness(1.07); }

/* ---------- Notificações (Fase C) ---------- */
.notif-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 10px 12px; }
.notif-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 8px; border-radius: 10px;
}
.notif-row:hover { background: #f4f6f9; }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: #d9b64c; margin-top: 6px; flex-shrink: 0; }
.notif-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.notif-text { font-size: 13px; color: #1d2433; }
.notif-time { font-size: 11px; color: #98a2b3; }
.notif-empty { margin: auto; text-align: center; color: #98a2b3; font-size: 12.5px; padding: 30px 14px; }

/* ---------- Calendário placeholder (Fase C) ---------- */
.cal-placeholder {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: #98a2b3; padding: 20px; text-align: center;
}
.cal-placeholder p { font-size: 13px; font-weight: 600; }

/* ---------- Configurações (modal, Fase C) ---------- */
#settings-modal {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(10, 12, 16, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.st-box {
  width: 420px; max-width: 100%; max-height: 90vh;
  background: #ffffff; color: #1d2433;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(16, 24, 40, 0.35);
  display: flex; flex-direction: column; overflow: hidden;
}
.st-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid #eef1f4; flex-shrink: 0;
}
.st-title { font-weight: 800; font-size: 16px; }
#st-close {
  border: none; background: transparent; color: #98a2b3;
  font-size: 20px; cursor: pointer; line-height: 1;
}
#st-close:hover { color: #1d2433; }
.st-body { flex: 1; overflow-y: auto; padding: 6px 18px 18px; display: flex; flex-direction: column; gap: 18px; }
.st-section h4 { font-size: 12.5px; font-weight: 700; color: #667085; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.4px; }
.st-profile-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#st-profile-name { font-weight: 600; font-size: 14px; }
#st-open-wardrobe {
  border: 1px solid #e4e7ec; border-radius: 10px; padding: 9px 14px; cursor: pointer;
  background: #fff; color: #1d2433; font-weight: 600; font-size: 12.5px;
}
#st-open-wardrobe:hover { background: #f4f6f9; }
.st-field {
  display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600;
  color: #475066; margin-bottom: 10px;
}
.st-field select {
  border: 1px solid #e4e7ec; border-radius: 9px; padding: 8px 10px;
  font-size: 13px; color: #1d2433; background: #f8f9fb; outline: none;
}
.st-hint { font-size: 11.5px; color: #98a2b3; line-height: 1.5; }
.st-admin-btn {
  width: 100%; border: 1px solid #e4e7ec; border-radius: 10px; padding: 10px 14px;
  cursor: pointer; background: #fff; color: #1d2433; font-weight: 600; font-size: 13px;
  margin-bottom: 8px; text-align: left;
}
.st-admin-btn:hover { background: #f4f6f9; }
