/* Goklah — componentes visuais reutilizáveis. Tudo aqui referencia
   tokens de styles/tokens.css — nenhum valor de cor/espaçamento solto. */

/* ---- Cartão / superfície ---- */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.card + .card {
  margin-top: var(--space-4);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.section-header h2 {
  margin: 0;
}

.section-header .count-badge {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

/* ---- Formulários ---- */

form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

label {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-base);
  color: var(--text-secondary);
  font-weight: var(--weight-medium);
}

input,
select {
  background: var(--bg-sunken);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0 var(--space-3);
  height: var(--control-h-md);
  font-size: var(--text-md);
  font-family: var(--font-sans);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:hover,
select:hover {
  border-color: var(--text-disabled);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: none;
}

input::placeholder {
  color: var(--text-muted);
}

.hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0;
}

.hint.success {
  color: var(--success);
}

.error {
  color: var(--danger);
  font-size: var(--text-base);
  margin: 0;
  min-height: 18px;
}

.switch {
  text-align: center;
  font-size: var(--text-base);
  color: var(--text-muted);
  margin: var(--space-4) 0 0;
}

.switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: var(--weight-medium);
}

.switch a:hover {
  text-decoration: underline;
}

.auth-form-links {
  display: flex;
  justify-content: flex-end;
  margin-top: calc(var(--space-2) * -1);
}

.auth-form-links a,
.auth-description a {
  color: var(--accent);
  font-size: var(--text-sm);
  text-decoration: none;
  font-weight: var(--weight-medium);
}

.auth-form-links a:hover { text-decoration: underline; }

.auth-description {
  margin: 0 0 var(--space-4);
  color: var(--text-muted);
  line-height: 1.55;
}

.reset-code-input {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}

.legal-acceptance {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: var(--space-2);
  line-height: 1.45;
  font-size: var(--text-sm);
}

.legal-acceptance input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.link-button {
  display: inline;
  height: auto;
  padding: 0;
  background: none;
  color: var(--accent);
  font-size: inherit;
  font-weight: var(--weight-semibold);
  vertical-align: baseline;
}

.link-button:hover,
.link-button:active {
  background: none;
  text-decoration: underline;
}

.legal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: var(--space-6);
  background: color-mix(in srgb, #050711 84%, transparent);
}

.legal-dialog {
  width: min(760px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
}

.legal-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5);
  border-bottom: 1px solid var(--border);
}

.legal-dialog h2,
.legal-dialog h3 { margin: 0; }

.legal-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

.legal-content {
  overflow-y: auto;
  padding: var(--space-5);
  display: grid;
  gap: var(--space-5);
}

.legal-content section {
  display: grid;
  gap: var(--space-2);
}

.legal-content p {
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ---- Botões ---- */

/* Botão primário: texto branco sobre --accent-action (variante mais
   escura do accent, ver tokens.css). --accent "puro" fica reservado pra
   seleção/ícones/foco (sidebar-item.active, border-focus, etc.), não
   pra fundo de botão com texto em cima — inversão deliberada em relação
   à fase anterior (coral com texto escuro), pedida explicitamente nesta
   fase pra não achatar a identidade azul-violeta em todo botão. */
button {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: var(--weight-semibold);
  font-size: var(--text-md);
  height: var(--control-h-md);
  padding: 0 var(--space-4);
  background: var(--accent-action);
  color: #fff;
  transition: background var(--transition-fast), border-color var(--transition-fast),
    color var(--transition-fast), opacity var(--transition-fast), transform var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

button:hover {
  background: var(--accent-action-hover);
}

button:active {
  background: var(--accent-action-active);
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

button.secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  width: 100%;
}

button.secondary:hover {
  background: var(--bg-hover);
  border-color: var(--text-disabled);
}

button.secondary:active {
  background: var(--bg-active);
}

button.ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

button.ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

button.danger {
  background: var(--danger);
  color: #fff;
}

button.danger:hover {
  background: var(--danger-hover);
}

button.secondary.danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

button.secondary.danger:hover {
  background: var(--danger-muted);
}

button.small {
  height: var(--control-h-sm);
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  width: auto;
  margin-top: 0;
}

/* Botão só-ícone — mesma altura dos demais, largura igual à altura pra
   ficar quadrado/circular. Sempre usado com aria-label + tooltip
   (ver .tooltip) já que não tem rótulo de texto visível. */
button.btn-icon {
  width: var(--control-h-md);
  height: var(--control-h-md);
  padding: 0;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

button.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

button.btn-icon:active {
  background: var(--bg-active);
  transform: none;
}

button.btn-icon.small {
  width: var(--control-h-sm);
  height: var(--control-h-sm);
}

button.btn-icon.active {
  background: var(--accent-muted);
  color: var(--accent);
}

/* Estado "ligado negativo" persistente (mutado/silenciado) — distinto
   do hover vermelho de .danger-hover, que só reage a passar o mouse. */
button.btn-icon.negative {
  background: var(--danger-muted);
  color: var(--danger);
}

button.btn-icon.danger-hover:hover {
  background: var(--danger-muted);
  color: var(--danger);
}

/* ---- Sidebar ---- */








/* Item de navegação ainda sem funcionalidade real (Conversas nesta
   fase) — visualmente presente e honesto sobre o estado, não escondido
   nem parecendo quebrado. */




/* ---- Barra estreita (rail) ---- */





/* Botão de sala: some o padding/fundo padrão do rail-item pra deixar só
   o avatar circular (já vem com sua própria cor de fundo). O anel de
   seleção usa outline em vez de background pra não brigar com a cor do
   avatar. */


.status-pill {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
  overflow: hidden;
}

.status-pill span.label-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-user-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
}

.current-user-row .current-user-name {
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Ícones ---- */

.icon {
  display: inline-flex;
  flex-shrink: 0;
}

.icon svg {
  width: 1em;
  height: 1em;
  display: block;
}

/* ---- Tooltip ---- */

/* Tooltip: renderizado num elemento fixo no <body> (ver
   components/tooltip.ts), não como ::after do próprio elemento.
   Motivo: rail e barra contextual são contêineres roláveis com
   overflow escondido — um pseudo-elemento posicionado pra fora deles
   seria recortado, e era exatamente isso que acontecia com o nome das
   salas no rail e com o "Copiar convite" dentro do painel de sala. */
.tooltip-layer {
  position: fixed;
  z-index: 60;
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  border: 1px solid var(--border);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
  box-shadow: var(--shadow-raised);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tooltip-layer.open {
  opacity: 1;
}

/* ---- Avatar ---- */

.avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  flex-shrink: 0;
  user-select: none;
  position: relative;
  overflow: visible;
}

.avatar-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: inherit;
}

.avatar-mascot,
.avatar-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.avatar-mascot {
  object-fit: contain;
  width: 66%;
  height: 66%;
  max-width: none;
  transform: translateY(2%);
}

.avatar-photo {
  position: absolute;
  inset: 0;
}

.avatar-presence {
  position: absolute;
  right: 1px;
  bottom: 1px;
  z-index: 3;
  width: 11px;
  height: 11px;
  border: 2px solid var(--bg-surface-raised);
  border-radius: var(--radius-full);
  background: var(--presence-online);
  pointer-events: none;
}

.avatar.sm .avatar-presence {
  width: 9px;
  height: 9px;
  border-width: 2px;
}

.avatar.profile .avatar-presence {
  right: 2px;
  bottom: 2px;
  width: 17px;
  height: 17px;
  border-width: 3px;
}

.avatar-presence[data-presence="idle"] { background: var(--presence-idle); }
.avatar-presence[data-presence="focus"] { background: var(--presence-focus); }
.avatar-presence[data-presence="busy"] { background: var(--presence-busy); }
.avatar-presence[data-presence="invisible"] { background: var(--presence-invisible); }
.avatar-presence[data-presence="offline"] { background: var(--presence-offline); }

.avatar.sm {
  width: 28px;
  height: 28px;
  font-size: var(--text-xs);
}

/* 42px no rail e 32px no menu de perfil — medidas do Avatar do Stoat
   nesses dois contextos. */
.avatar.rail {
  width: var(--rail-avatar);
  height: var(--rail-avatar);
  font-size: var(--text-base);
}

.avatar.menu {
  width: 32px;
  height: 32px;
  font-size: var(--text-sm);
}

.avatar.profile {
  width: 84px;
  height: 84px;
  border: 5px solid var(--bg-surface-raised);
  box-shadow: 0 0 0 1px var(--border);
}

.avatar.profile .avatar-mascot {
  width: 66%;
  height: 66%;
  transform: translateY(2%);
}

.register-avatar-title {
  display: block;
  font-size: var(--label-lg-size);
  font-weight: var(--weight-semibold);
  margin-bottom: 2px;
}

.register-preview-customize .hint {
  margin: 0 0 var(--space-2);
}

.register-avatar-colors {
  display: flex;
  gap: var(--space-2);
}

.username-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  color: var(--text-muted);
}

.username-input-wrap > span { padding-left: var(--space-3); }
.username-input-wrap input { border: 0; background: transparent; box-shadow: none; }

.register-profile-preview {
  overflow: hidden;
  min-height: 190px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface-raised);
}

.register-preview-banner { height: 66px; }
.register-preview-body { display: flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-4) var(--space-4); }
.register-preview-body .avatar.profile { width: 68px; height: 68px; margin-top: -28px; border-width: 4px; }
.register-preview-body > div { display: flex; flex-direction: column; min-width: 0; }
.register-preview-body strong { font-size: var(--text-lg); }
.register-preview-body span { color: var(--text-muted); font-size: var(--body-sm-size); }

.register-preview-customize {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

.register-preview-customize .hint {
  margin: 2px 0 0;
}

.avatar-color-swatch {
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 1px var(--border-strong);
}

.avatar-color-swatch.selected {
  border-color: var(--bg-app);
  box-shadow: 0 0 0 2px var(--accent);
}

/* ---- Badge ---- */

.badge {
  background: var(--bg-active);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 2px var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}

.badge.owner {
  background: var(--accent-muted);
  color: var(--accent);
}

.badge-count {
  background: var(--accent);
  color: var(--text-on-accent);
  border-radius: var(--radius-full);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: var(--weight-bold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---- Listas ---- */

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.list-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.list-item-main {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  flex: 1;
}

.list-item-text {
  min-width: 0;
}

.list-item-text .name {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item-text .meta {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.list-item.speaking {
  border-color: var(--success);
  box-shadow: 0 0 0 1px var(--success-muted);
}

/* Linhas sociais densas: ocupam a área de conteúdo sem parecer uma pilha de
   cards e revelam as ações quando o usuário passa o mouse ou usa o teclado. */
.friends-list {
  gap: 0;
}

.friends-list .list-item {
  min-height: 62px;
  padding: var(--space-2);
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.friends-list .list-item:hover,
.friends-list .list-item:focus-within {
  border-radius: var(--radius-md);
  background: var(--bg-hover);
}

.friends-list .avatar.sm {
  width: 40px;
  height: 40px;
}

.friends-list .list-item-actions {
  opacity: 0.72;
  transition: opacity var(--transition-fast);
}

.friends-list .list-item:hover .list-item-actions,
.friends-list .list-item:focus-within .list-item-actions {
  opacity: 1;
}

/* ---- Estado vazio ---- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  color: var(--text-muted);
}

.empty-state .icon {
  color: var(--text-disabled);
  margin-bottom: var(--space-1);
}

.empty-state .icon svg {
  width: 28px;
  height: 28px;
}

.empty-state .empty-title {
  color: var(--text-secondary);
  font-weight: var(--weight-medium);
  font-size: var(--text-base);
}

.empty-state .empty-desc {
  font-size: var(--text-sm);
  max-width: 320px;
}

/* ---- Status de conexão (dot) ---- */

.dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--text-disabled);
  flex-shrink: 0;
}

.dot.ok {
  background: var(--success);
}

.dot.fail {
  background: var(--danger);
}

/* ---- Convite ---- */

.invite-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
}

.invite-chip code {
  flex: 1;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.invite-chip code::-webkit-scrollbar {
  display: none;
}

/* ---- Barra de voz ---- */

.voice-bar-idle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.voice-bar-idle .voice-bar-copy .title {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.voice-bar-idle .voice-bar-copy .subtitle {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-top: 2px;
}

.voice-bar-connected {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.voice-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-left: auto;
}

.voice-controls select {
  height: var(--control-h-sm);
  font-size: var(--text-sm);
  max-width: 180px;
}

.voice-divider {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  margin: 0 var(--space-1);
}

.screen-share-area {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.screen-video {
  display: block;
  width: 100%;
  max-height: 320px;
  background: #000;
  border-radius: var(--radius-md);
  object-fit: contain;
  border: 1px solid var(--border);
}

.screen-video-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.mic-indicator {
  display: inline-flex;
  color: var(--text-muted);
}

.mic-indicator.muted {
  color: var(--danger);
}

.mic-indicator.live {
  color: var(--success);
}

.screen-indicator {
  display: inline-flex;
  color: var(--accent);
}

.volume-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.volume-row input[type="range"] {
  width: 72px;
  accent-color: var(--accent);
}

/* ---- Modal ---- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: goklah-fade-in var(--transition-base);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-dialog {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border);
  /* padding 24px, min 280px, max 560px, raio 28px — medidas do Dialog
     do Stoat. */
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  padding: var(--space-6);
  min-width: 280px;
  width: 420px;
  max-width: min(560px, calc(100vw - var(--space-6)));
}

.modal-dialog h3 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin: 0 0 var(--space-2);
}

.modal-dialog > p {
  color: var(--text-secondary);
  font-size: var(--body-md-size);
  line-height: var(--body-md-line);
  margin-bottom: var(--space-5);
}

.modal-dialog form {
  gap: var(--space-l);
}

.modal-dialog .modal-actions {
  margin-top: var(--space-2);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
}

.modal-actions button {
  width: auto;
}

.modal-check-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--bg-sunken);
  cursor: pointer;
}

.modal-check-row input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.delete-scope-choices {
  display: grid;
  gap: 10px;
  margin: 6px 0 4px;
  padding: 0;
  border: 0;
}

.delete-scope-choice {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: start;
  padding: 13px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-surface);
  cursor: pointer;
}

.delete-scope-choice:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

.delete-scope-choice input { margin-top: 3px; accent-color: var(--accent); }
.delete-scope-choice span { display: grid; gap: 3px; }
.delete-scope-choice strong { color: var(--text-primary); font-size: 14px; }
.delete-scope-choice small { color: var(--text-muted); font-size: 12px; line-height: 1.45; }

@keyframes goklah-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---- Placeholder não interativo (ex.: "Comunidades — em breve") ---- */




/* ---- Perfil / Conta ---- */

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-base);
}

.profile-row:last-of-type {
  border-bottom: none;
}

.profile-row .label {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.profile-row .label .icon {
  font-size: 16px;
}

.profile-row .value {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.profile-header .avatar {
  width: 56px;
  height: 56px;
  font-size: var(--text-lg);
}

.profile-header .name {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
}

/* ============================================================
   Fase A refeita — componentes com as medidas do Stoat.
   ============================================================ */

/* ---- Barra estreita (rail) ----
   Item de 56x56 com avatar/ícone de 42px centralizado. O indicador de
   seleção é a barra vertical à esquerda (::before): 12px de largura,
   altura 0 → 16px no hover → 32px selecionado. Medidas do
   `entryContainer` do Stoat. */

.rail-item {
  width: var(--rail-item);
  height: var(--rail-item);
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  position: relative;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-secondary);
}

.rail-item::before {
  content: "";
  position: absolute;
  left: -8px;
  width: 12px;
  height: 0;
  border-radius: var(--radius-xs);
  background: var(--text-primary);
  transition: height var(--transition-fast);
}

.rail-item:hover::before {
  height: 16px;
}

.rail-item.active::before {
  height: 32px;
  background: var(--accent);
}

.rail-item .icon {
  font-size: 22px;
  width: var(--rail-avatar);
  height: var(--rail-avatar);
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.rail-item:hover {
  background: transparent;
  transform: none;
  color: var(--text-primary);
}

.rail-item:hover .icon {
  background: var(--bg-surface-raised);
}

.rail-item:active {
  background: transparent;
  transform: none;
}

.rail-item.active .icon {
  background: var(--accent-muted-strong);
  color: var(--accent);
}

/* Botão de sala e de perfil: o avatar já tem cor própria, então não
   ganha a caixa de fundo do ícone. */
.rail-item.rail-room,
.rail-item.rail-profile {
  border-radius: var(--radius-full);
}

/* Ponto da preferência de presença persistida do próprio usuário. */
.rail-profile {
  position: relative;
}

.presence-dot {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  border: 3px solid var(--bg-sidebar);
  background: var(--presence-online);
  pointer-events: none;
}

.presence-dot[data-presence="idle"] { background: var(--presence-idle); }
.presence-dot[data-presence="focus"] { background: var(--presence-focus); }
.presence-dot[data-presence="busy"] { background: var(--presence-busy); }
.presence-dot[data-presence="invisible"] { background: var(--presence-invisible); }
.presence-dot[data-presence="offline"] { background: var(--presence-offline); }

/* ---- Item de menu da barra contextual ----
   O realce acompanha a linha da navegação sem formar uma pílula grande. */

.menu-button {
  height: var(--menu-item-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: 0 var(--space-md);
  padding: 0 var(--space-md);
  border: none;
  border-radius: var(--radius-xl);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: var(--weight-medium);
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.menu-button .icon {
  font-size: 20px;
  flex-shrink: 0;
}

.menu-button-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-button:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: none;
}

.menu-button:active {
  background: var(--bg-active);
  transform: none;
}

.menu-button.active {
  color: var(--text-primary);
  background: transparent;
}

.menu-button.selected {
  color: var(--accent);
  background: var(--accent-muted);
}

.menu-button.selected:hover {
  background: var(--accent-muted-strong);
}

/* Botão "+" do cabeçalho de seção. */
.context-category-action {
  width: 20px;
  height: 20px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.context-category-action .icon {
  font-size: 18px;
}

.context-category-action:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: none;
}

/* Rótulo "em breve" — usado em item de menu, botão de ação e modal. */
.pill-upcoming {
  flex-shrink: 0;
  font-size: var(--label-sm-size);
  line-height: var(--label-sm-line);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-active);
  border-radius: var(--radius-full);
  padding: 2px var(--space-md);
}

/* Badge de solicitações pendentes na linha de Amigos — medidas do
   `PendingBadge` do Stoat (padding 4px 8px, raio 12px, label pequeno). */
.pending-badge {
  flex-shrink: 0;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  background: var(--danger);
  color: #fff;
  font-size: var(--label-sm-size);
  line-height: var(--label-sm-line);
  font-weight: var(--weight-semibold);
}

/* ---- Botão de ação da Início (CategoryButton) ----
   padding 13px, gap 16px, raio 12px, caixa do ícone 36x36 redonda,
   título 14px/500 e descrição 12px/500 com 2px de gap. */

.category-button {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: var(--space-4);
  padding: 13px;
  height: auto;
  border: none;
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-sans);
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  transition: background var(--transition-fast);
}

.category-button:hover {
  background: var(--accent-muted);
  transform: none;
}

.category-button:active {
  background: var(--accent-muted-strong);
  transform: none;
}

.category-button.tertiary {
  background: var(--bg-sunken);
  color: var(--text-secondary);
}

.category-button.tertiary:hover {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
}

.category-button-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: var(--bg-app);
  color: var(--accent);
}

.category-button-icon .icon {
  font-size: 20px;
}

.category-button-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: var(--space-xs);
  min-width: 0;
}

.category-button-title {
  font-size: var(--label-lg-size);
  line-height: var(--label-lg-line);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-button-description {
  font-size: var(--label-md-size);
  line-height: var(--label-md-line);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  color: var(--text-muted);
  text-wrap: wrap;
}

/* ---- Popover (menu de perfil, menu do "+") ---- */

.popover {
  position: fixed;
  z-index: 40;
  min-width: 232px;
  max-width: 300px;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-popover);
  display: flex;
  flex-direction: column;
  gap: var(--space-xxs);
  /* Animação de entrada espelhada do UserMenu do Stoat: opacidade e um
     deslize horizontal curto. */
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.2s cubic-bezier(0.87, 0, 0.13, 1),
    transform 0.2s cubic-bezier(0.87, 0, 0.13, 1);
}

.popover.open {
  opacity: 1;
  transform: translateX(0);
}

/* Camada persistente usada por painéis ricos ancorados. A lógica de
   posicionamento fica em components/popover.ts; aqui ficam somente elevação
   e movimento, iguais para mouse e teclado. */
.anchored-layer {
  position: fixed !important;
  z-index: 120;
}

.emoji-picker.anchored-layer,
.attachment-picker.anchored-layer {
  margin: 0;
  /* Menus utilitários precisam ser legíveis no primeiro frame, sem expor o
     conteúdo do chat por baixo durante uma animação de opacidade. */
  opacity: 1;
  transform: none;
  transition: none;
}

.popover-item {
  display: flex;
  align-items: center;
  gap: var(--space-l);
  width: 100%;
  height: 34px;
  padding: 0 var(--space-md);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--body-md-size);
  font-weight: var(--weight-medium);
  text-align: left;
  cursor: pointer;
}

.popover-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: none;
}

.popover-item:active {
  background: var(--bg-active);
  transform: none;
}

.popover-item-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popover-item .icon {
  font-size: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.popover-item.danger-hover:hover {
  color: var(--danger);
}

.popover-item.danger-hover:hover .icon {
  color: var(--danger);
}

/* Caixa de 16px em volta do ponto de status de 10px — mesma proporção
   do `Status` do UserMenu do Stoat. */
.popover-status {
  width: 16px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.popover-status i {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--presence-online);
  display: block;
}

.popover-status i[data-presence="idle"] { background: var(--presence-idle); }
.popover-status i[data-presence="focus"] { background: var(--presence-focus); }
.popover-status i[data-presence="busy"] { background: var(--presence-busy); }
.popover-status i[data-presence="invisible"] { background: var(--presence-invisible); }
.popover-status i[data-presence="offline"] { background: var(--presence-offline); }

.popover-divider {
  height: 1px;
  margin: var(--space-sm) var(--space-md);
  background: var(--border);
}

/* Cabeçalho do menu de perfil: avatar 32px + nome + identificador. */
.popover-profile {
  display: flex;
  align-items: center;
  gap: var(--space-l);
  width: 100%;
  padding: var(--space-md);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  cursor: pointer;
  height: auto;
}

.popover-profile:hover {
  background: var(--bg-hover);
  transform: none;
}

.popover-profile-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.popover-profile-name {
  font-size: var(--body-md-size);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popover-profile-id {
  font-size: var(--label-md-size);
  line-height: var(--label-md-line);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Modal: cabeçalho com ícone, descrição e lista ---- */

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.modal-header h3 {
  margin: 0;
  font-size: var(--title-md-size);
  line-height: var(--title-md-line);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.modal-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  color: var(--accent);
}

.modal-icon .icon {
  font-size: 20px;
}

.modal-description {
  font-size: var(--body-md-size);
  line-height: var(--body-md-line);
  color: var(--text-secondary);
  margin: var(--space-xs) 0 0;
}

.modal-bullets {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.modal-bullets li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-l);
  font-size: var(--body-md-size);
  line-height: var(--body-md-line);
  color: var(--text-secondary);
}

.modal-bullets .icon {
  font-size: 16px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

/* "Em breve" dentro da descrição do botão de ação (ver
   components/categoryButton.ts — como pílula ao lado do título ele
   truncava o título numa coluna de 260px). */
.category-button-flag {
  color: var(--accent);
  font-weight: var(--weight-semibold);
}

/* ============================================================
   Fase C — Perfil real, Sessões, Voz e vídeo expandido, Aparência.
   ============================================================ */

textarea {
  background: var(--bg-sunken);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-md);
  font-family: var(--font-sans);
  resize: vertical;
  min-height: 72px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

textarea:hover {
  border-color: var(--text-disabled);
}

textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: none;
}

.char-counter {
  align-self: flex-end;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.char-counter.limit {
  color: var(--danger);
}

/* Redefinir/Salvar (Perfil) — par de botões lado a lado, mesma ordem do
   Stoat real (secundário primeiro, ação primária por último). */
.settings-profile-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

/* ---- Perfil — banner + avatar editáveis ---- */

.settings-banner-edit {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 128px;
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  cursor: pointer;
  overflow: hidden;
}

.settings-banner-edit .settings-image-edit-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: rgba(10, 11, 18, 0.35);
  color: #fff;
  opacity: 0;
  transition: opacity var(--transition-fast);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.settings-banner-edit:hover .settings-image-edit-overlay {
  opacity: 1;
}

/* Avatar e Banner (Perfil) — seções empilhadas, cada uma com rótulo +
   controle + botão "x" de remover ao lado (correção pedida pelo usuário
   depois de comparar com o Stoat real: a versão anterior sobrepunha o
   avatar ao banner, escondendo espaço pra uma ação de remover). */
.settings-image-section-label {
  font-size: var(--label-lg-size);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  margin-top: var(--space-3);
}

.settings-image-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* ---- Perfil social público ----
   Card rápido para contexto e superfície completa para leitura/ações.
   Não compartilha a aparência de formulário da central de configurações:
   é uma apresentação de identidade, não uma "janela dentro da janela". */

.public-profile-trigger {
  min-width: 0;
  min-height: 0;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: inherit;
  text-align: inherit;
  display: inline-flex;
  align-items: center;
}

.public-profile-trigger:hover {
  transform: none;
  filter: brightness(1.08);
}

.public-profile-name-trigger {
  border-radius: var(--radius-xs);
  font: inherit;
}

.public-profile-name-trigger:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.public-profile-header-trigger {
  cursor: pointer;
  -webkit-app-region: no-drag;
}

.public-profile-header-trigger:hover {
  color: var(--accent);
}

.public-profile-popover {
  width: 340px;
  min-width: 340px;
  max-width: min(340px, calc(100vw - var(--space-4)));
  padding: 0;
  gap: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.public-profile-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.public-profile-banner {
  height: 120px;
  flex-shrink: 0;
  background-position: center;
  background-size: cover;
}

.public-profile-banner.compact {
  height: 92px;
}

.public-profile-identity {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  min-width: 0;
  margin: -42px var(--space-6) 0;
}

.public-profile-identity.compact {
  gap: var(--space-3);
  margin: -32px var(--space-4) 0;
}

.public-profile-identity.compact .avatar.profile {
  width: 64px;
  height: 64px;
  border-width: 4px;
}

.public-profile-name-block {
  min-width: 0;
  padding-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.public-profile-identity.compact .public-profile-name-block {
  padding-top: 34px;
}

.public-profile-display-name {
  max-width: 100%;
  margin: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  font-size: var(--text-2xl);
  line-height: 1.15;
  font-weight: var(--weight-bold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-profile-identity.compact .public-profile-display-name {
  font-size: var(--text-lg);
  line-height: var(--title-md-line);
}

.public-profile-display-name:hover { transform: none; filter: brightness(1.12); }
.name-font-rounded { font-family: ui-rounded, "Trebuchet MS", Inter, sans-serif; }
.name-font-mono { font-family: "Cascadia Mono", Consolas, monospace; }
.name-effect-solid { color: var(--profile-name-color); }
.name-effect-gradient { color: transparent; background: linear-gradient(90deg, var(--profile-name-color), var(--accent)); background-clip: text; }
.name-effect-neon { color: var(--profile-name-color); text-shadow: 0 0 8px color-mix(in srgb, var(--profile-name-color) 78%, transparent), 0 0 18px color-mix(in srgb, var(--profile-name-color) 42%, transparent); }

.public-profile-identifier {
  min-height: 0;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--body-sm-size);
  font-weight: var(--weight-regular);
}

.public-profile-identifier .icon {
  font-size: 12px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.public-profile-identifier:hover {
  color: var(--text-primary);
  transform: none;
}

.public-profile-identifier:hover .icon,
.public-profile-identifier:focus-visible .icon {
  opacity: 1;
}

.public-profile-pronouns {
  color: var(--text-muted);
  font-size: var(--body-sm-size);
}

.public-profile-presence {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--body-sm-size);
  line-height: var(--body-sm-line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-profile-presence i {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  background: var(--presence-online);
}

.public-profile-presence i[data-presence="idle"] { background: var(--presence-idle); }
.public-profile-presence i[data-presence="focus"] { background: var(--presence-focus); }
.public-profile-presence i[data-presence="busy"] { background: var(--presence-busy); }
.public-profile-presence i[data-presence="invisible"] { background: var(--presence-invisible); }
.public-profile-presence i[data-presence="offline"] { background: var(--presence-offline); }

.public-profile-bio {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--body-md-size);
  line-height: var(--body-md-line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.public-profile-bio.compact {
  margin: var(--space-4) var(--space-4) 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.public-profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-4);
  flex-wrap: wrap;
}

.banner-preset-aurora { background: linear-gradient(135deg, #5b6cff, #a96dff 52%, #ff88c8); }
.banner-preset-sunset { background: linear-gradient(135deg, #ff775f, #ffae5d 48%, #7c4dff); }
.banner-preset-ocean { background: linear-gradient(135deg, #0a7798, #39bfc1 52%, #3756d8); }
.banner-preset-nebula { background: linear-gradient(135deg, #171b46, #7635a8 50%, #d24889); }
.banner-preset-ember { background: linear-gradient(135deg, #35151c, #b63c2f 52%, #f49d37); }

.banner-preset-picker { display: grid; grid-template-columns: repeat(5, minmax(48px, 1fr)); gap: var(--space-2); }
.banner-preset-option {
  min-height: 52px;
  padding: 0;
  border: 1px solid color-mix(in srgb, white 72%, transparent);
  border-radius: var(--radius-md);
  box-shadow: none;
}
.banner-preset-option:hover { border-color: white; }
.banner-preset-option.selected { border: 2px solid white; box-shadow: none; }
.banner-preset-option:focus-visible { outline-color: white; }

.name-style-preview {
  min-height: 92px;
  margin-bottom: var(--space-3);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-1);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-sunken));
}
.name-style-preview small { color: var(--text-muted); font-size: var(--text-xs); }
.name-style-preview strong {
  max-width: 100%;
  font-size: var(--text-2xl);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.name-style-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  align-items: end;
}
.name-style-field { display: grid; gap: var(--space-1); min-width: 0; }
.name-style-field > span { color: var(--text-secondary); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.name-color-control { grid-column: 1 / -1; }
.name-color-picker {
  height: var(--control-h-md);
  padding: 5px var(--space-3) 5px 5px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
}
.name-color-picker input[type="color"] {
  width: 48px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: calc(var(--radius-sm) - 2px);
  overflow: hidden;
  cursor: pointer;
}
.name-color-picker output {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-transform: uppercase;
}
.name-font-serif { font-family: Georgia, "Times New Roman", serif; }
.name-font-handwritten { font-family: "Segoe Print", "Comic Sans MS", cursive; }
.name-font-condensed { font-family: "Arial Narrow", "Roboto Condensed", Inter, sans-serif; font-stretch: condensed; }
.name-effect-outline {
  color: var(--profile-name-color);
  -webkit-text-stroke: 1px color-mix(in srgb, var(--profile-name-color) 52%, white);
  text-shadow: 0 1px 0 color-mix(in srgb, black 42%, transparent);
}
.name-effect-shadow {
  color: var(--profile-name-color);
  text-shadow: 2px 2px 0 color-mix(in srgb, var(--profile-name-color) 34%, black), 0 5px 12px color-mix(in srgb, black 40%, transparent);
}
.account-password-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.account-password-panel summary {
  list-style: none;
}

.account-password-panel summary::-webkit-details-marker {
  display: none;
}

.account-panel-summary {
  width: 100%;
  min-height: 68px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}

button.account-panel-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.account-panel-summary:hover,
button.account-panel-summary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.account-panel-summary:active,
button.account-panel-summary:active {
  background: var(--bg-active);
  transform: none;
}

.account-panel-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: var(--bg-sunken);
  color: var(--text-secondary);
}

.account-panel-icon .icon {
  font-size: 19px;
}

.account-panel-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-panel-copy strong {
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

.account-panel-copy span {
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  line-height: 1.35;
}

.account-panel-chevron {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.account-password-panel[open] .account-panel-chevron {
  transform: rotate(90deg);
}

.account-password-panel[open] .account-panel-summary {
  border-bottom: 1px solid var(--border);
}

.account-password-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  padding: var(--space-4) var(--space-4) var(--space-3);
}

.account-password-fields label {
  min-width: 0;
  display: grid;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.account-password-fields input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.account-password-actions {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-4) var(--space-4);
}

.account-password-actions .hint {
  margin: 0;
}

@media (max-width: 760px) {
  .account-password-fields {
    grid-template-columns: 1fr;
  }
}

.public-profile-actions button {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding-inline: var(--space-3);
  line-height: var(--label-md-line);
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.public-profile-actions button .icon {
  font-size: 16px;
  flex: 0 0 auto;
}

.public-profile-open-full {
  min-height: 38px;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
}

.public-profile-open-full:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: none;
}

.public-profile-open-full .icon {
  font-size: 16px;
}

.public-profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--titlebar-h) + var(--space-5)) var(--space-5) var(--space-5);
  background: var(--overlay-scrim);
  animation: goklah-fade-in var(--transition-base);
}

.public-profile-dialog {
  position: relative;
  width: min(620px, 100%);
  max-height: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface-raised);
  box-shadow: var(--shadow-modal);
}

.public-profile-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  color: var(--text-primary);
  background: color-mix(in srgb, var(--bg-surface-raised) 78%, transparent);
  backdrop-filter: blur(8px);
}

.public-profile-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-6);
}

.public-profile-content section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.public-profile-content h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--label-lg-size);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
}

.public-profile-content .public-profile-actions {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding-top: var(--space-2);
}

.public-profile-content .public-profile-actions button {
  width: auto;
  flex: 1 1 148px;
}

.public-profile-date {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
}

.public-profile-date .icon {
  font-size: 16px;
}

.public-profile-friends-since {
  margin: 0;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--accent-muted);
  color: var(--text-secondary);
  font-size: var(--body-sm-size);
}

.public-profile-loading {
  min-height: 120px;
  padding: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: var(--text-muted);
}

.public-profile-loading.full {
  min-height: 360px;
}

.public-profile-loading .icon {
  animation: public-profile-spin 0.9s linear infinite;
}

@keyframes public-profile-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 620px), (max-height: 620px) {
  .public-profile-overlay {
    align-items: center;
    padding: calc(var(--titlebar-h) + var(--space-2)) var(--space-2) var(--space-2);
  }

  .public-profile-dialog {
    width: 100%;
    border-radius: var(--radius-xl);
  }

  .public-profile-banner {
    height: 104px;
  }

  .public-profile-content {
    padding: var(--space-5);
  }
}

.account-hero-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-muted-strong), var(--bg-surface) 58%);
}

.account-hero-card .avatar {
  width: 64px;
  height: 64px;
}

.account-hero-identity {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.account-hero-identity .name {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-hero-identifier {
  color: var(--text-muted);
  font-size: var(--body-sm-size);
}

.account-edit-profile {
  flex-shrink: 0;
}

.profile-summary-card .avatar {
  width: 56px;
  height: 56px;
}

.profile-summary-card {
  background: var(--accent-muted-strong);
}

.settings-section-title {
  margin: var(--space-2) 0 0;
  font-size: var(--text-xl);
  line-height: var(--title-lg-line);
}

.profile-page {
  gap: var(--space-2);
}

.profile-page .profile-summary-card {
  margin-bottom: var(--space-3);
}

.profile-page .settings-section-title {
  margin-bottom: var(--space-2);
}

.profile-page .settings-image-section-label {
  margin-top: var(--space-2);
}

.profile-page .settings-banner-edit {
  height: 96px;
}

.profile-page .char-counter {
  margin-top: calc(var(--space-2) * -1);
}

.account-details-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.account-details-card .profile-row {
  margin: 0;
  padding: var(--space-4);
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.account-details-card .profile-row:last-child {
  border-bottom: 0;
}

.avatar-color-picker {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.avatar-color-picker .avatar-color-swatch {
  width: 30px;
  height: 30px;
}

.composer-tool {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.message-tools-panel {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: var(--space-1) var(--space-1) 0;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-popover);
}
.emoji-picker {
  flex: 0 0 auto;
  display: block;
  width: min(392px, calc(100vw - (var(--space-4) * 2)));
  max-height: calc(100vh - (var(--space-6) * 2));
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface-raised);
  box-shadow: var(--shadow-popover);
  overflow: hidden;
}

.message-tools-panel[hidden], .emoji-picker[hidden] { display: none; }
.message-format-action {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: transparent;
  box-shadow: none;
}
.message-format-action:hover { color: var(--text-primary); background: var(--bg-hover); transform: none; }
.emoji-picker emoji-picker {
  display: block;
  width: 100%;
  height: min(390px, calc(100vh - 170px));
  min-height: 280px;
  --background: var(--bg-surface-raised);
  --border-color: var(--border);
  --button-hover-background: var(--bg-hover);
  --button-active-background: var(--accent-soft);
  --indicator-color: var(--accent);
  --emoji-size: 1.28rem;
  --emoji-padding: 0.3rem;
  --category-emoji-size: 1.02rem;
  --category-emoji-padding: 0.26rem;
  --category-font-size: 0.72rem;
  --input-font-size: 0.84rem;
  --input-padding: 0.42rem 0.58rem;
  --input-border-radius: 10px;
  --input-border-color: var(--border-strong);
  --input-placeholder-color: var(--text-muted);
  --input-font-color: var(--text-primary);
  --border-radius: 10px;
  --num-columns: 8;
  --emoji-font-family: "Twemoji Country Flags", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.media-picker-shell {
  width: 100%;
  max-height: inherit;
  display: flex;
  flex-direction: column;
}
.media-picker-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 5px 6px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-sunken);
}
.media-picker-tab {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 var(--space-2);
  border: 0;
  border-radius: 4px;
  color: var(--text-muted);
  background: transparent;
  box-shadow: none;
  font-size: var(--label-md-size);
  font-weight: var(--weight-semibold);
}
.media-picker-tab .icon { width: 15px; height: 15px; }
.media-picker-tab:hover { color: var(--text-primary); background: var(--bg-hover); transform: none; }
.media-picker-tab.active {
  color: var(--accent);
  background: var(--bg-active);
  box-shadow: inset 0 -2px var(--accent);
}
.media-picker-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.media-picker-pane { min-height: 0; overflow: hidden; }
.media-picker-pane[hidden] { display: none; }
.media-picker-pane > emoji-picker { width: 100%; }
.sticker-picker {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0;
  background: var(--bg-surface-raised);
}
.sticker-picker-header { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.sticker-search { position: relative; min-width: 0; flex: 1; display: flex; align-items: center; }
.sticker-search > .icon { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
.sticker-search input { width: 100%; min-height: 36px; padding-left: 36px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-sunken); }
.sticker-studio-button { flex: 0 0 auto; border-radius: 6px; }
.sticker-studio-button.active { color: var(--accent); background: var(--accent-muted); }
.sticker-studio {
  display: grid;
  gap: 9px;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-surface) 82%, var(--accent) 18%);
}
.sticker-studio[hidden] { display: none; }
.sticker-studio-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sticker-studio-heading > div { min-width: 0; display: grid; gap: 2px; }
.sticker-studio-heading strong { font-size: 13px; }
.sticker-studio-heading span { color: var(--text-muted); font-size: 11px; }
.sticker-studio > input { min-height: 36px; border-radius: 6px; }
.sticker-studio-actions { min-height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sticker-studio-state { min-width: 0; color: var(--text-muted); font-size: 10px; line-height: 1.3; }
.sticker-studio-state[data-kind="error"] { color: var(--danger); }
.sticker-studio-state[data-kind="success"] { color: var(--success); }
.sticker-library { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.sticker-library > .branded-loader { min-height: 150px; }
.sticker-pack { padding: 10px 8px 12px; border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent); }
.sticker-pack-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px 8px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: var(--weight-semibold);
}
.sticker-pack-heading > span { color: var(--text-muted); font-size: 9px; font-weight: var(--weight-medium); text-transform: uppercase; letter-spacing: .05em; }
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 82px;
  gap: 4px;
}
.sticker-result {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 1px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-secondary);
  background: transparent;
  box-shadow: none;
}
.sticker-result:hover { border-color: transparent; background: var(--bg-hover); transform: none; }
.sticker-result.sending { opacity: .48; }
.sticker-artwork {
  display: grid;
  place-items: center;
  font-family: "Twemoji Country Flags", "Segoe UI Emoji", sans-serif;
  font-size: 44px;
  line-height: 1;
  filter: drop-shadow(0 5px 5px color-mix(in srgb, black 22%, transparent));
}
.sticker-artwork.media { width: 100%; height: 100%; overflow: hidden; }
.sticker-artwork.media img,
.sticker-artwork.media video { display: block; width: 100%; height: 100%; object-fit: contain; }
.sticker-label { display: none; }
.sticker-empty { grid-column: 1 / -1; margin: auto; color: var(--text-muted); font-size: var(--body-sm-size); }
.sticker-empty-state { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--text-muted); text-align: center; }
.sticker-empty-state .icon { width: 22px; height: 22px; }

.dm-media-shortcut,
.dm-media-panel-toggle {
  flex: 0 0 auto;
}

.dm-gif-shortcut {
  width: 36px;
  font-size: 10px;
  font-weight: var(--weight-bold);
  letter-spacing: .02em;
}

.dm-media-shortcut.active,
.dm-composer > #dmEmojiBtn.active,
.dm-media-panel-toggle.active {
  background: var(--accent-muted);
  color: var(--accent);
}

.dm-media-side-panel {
  position: absolute;
  z-index: 45;
  inset: 0 0 0 auto;
  width: 372px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--bg-surface-raised);
  box-shadow: -8px 0 24px color-mix(in srgb, black 14%, transparent);
}

.dm-media-side-panel[hidden] { display: none; }

.dm-media-side-panel > header {
  min-height: 48px;
  padding: 0 var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.dm-media-side-content {
  min-height: 0;
  flex: 1;
  display: flex;
}

.dm-media-side-content > .emoji-picker {
  width: 100%;
  height: 100%;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.dm-media-side-content .media-picker-shell,
.dm-media-side-content .media-picker-pane,
.dm-media-side-content .gif-picker {
  min-height: 0;
  flex: 1;
  height: 100%;
}

.dm-media-side-content .media-picker-pane:not([hidden]) { display: flex; }
.dm-media-side-content .sticker-picker:not([hidden]) { display: grid; }
.dm-media-side-content emoji-picker { height: 100%; min-height: 0; }
.dm-channel.media-side-open { padding-right: calc(372px + var(--space-4)); }

.gif-picker {
  min-height: min(300px, calc(100vh - 190px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-2);
  background: var(--bg-surface-raised);
}
.gif-picker[hidden] { display: none; }
.gif-picker-header {
  position: relative;
  display: flex;
  align-items: center;
}
.gif-picker-header > .icon {
  position: absolute;
  z-index: 1;
  left: var(--space-3);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.gif-picker-header input {
  width: 100%;
  min-height: 36px;
  padding-left: 38px;
  padding-right: 38px;
  border-radius: var(--radius-md);
}
.gif-search-clear {
  position: absolute;
  right: 3px;
  width: 32px;
  height: 32px;
}
.gif-picker-results {
  min-height: 0;
  display: block;
  padding-right: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.gif-result-row {
  display: flex;
  width: 100%;
  gap: 6px;
  margin-bottom: 6px;
  overflow: visible;
}
.gif-result-row:last-child { margin-bottom: 0; }
.gif-result {
  position: relative;
  min-width: 0;
  height: 100%;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-sunken);
  cursor: pointer;
}
.gif-result:hover:not(:disabled) { transform: none; border-color: var(--accent); }
.gif-result:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gif-result img { width: 100%; height: 100%; display: block; object-fit: contain; background: var(--bg-sunken); }
.gif-result.loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, var(--bg-sunken) 20%, var(--bg-active) 42%, var(--bg-sunken) 64%);
  background-size: 200% 100%;
  animation: media-skeleton 1.25s linear infinite;
}
.gif-result.sending img { opacity: .36; }
.gif-result-sending,
.gif-result-unavailable {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2);
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--bg-sunken) 84%, transparent);
  font-size: var(--label-sm-size);
  text-align: center;
}
.gif-result-sending .icon,
.gif-picker-state.loading > .icon { animation: public-profile-spin .9s linear infinite; }
.gif-result-unavailable .icon { color: var(--text-muted); }
.gif-picker-state {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5);
  color: var(--text-muted);
  text-align: center;
}
.gif-picker-state > .icon { width: 28px; height: 28px; color: var(--accent); }
.gif-picker-state > span { display: grid; gap: var(--space-1); }
.gif-picker-state strong { color: var(--text-primary); font-size: var(--body-md-size); }
.gif-picker-state small { max-width: 270px; color: var(--text-muted); line-height: var(--body-sm-line); }
.gif-picker-attribution {
  padding: 0 var(--space-1);
  color: var(--text-muted);
  font-size: 10px;
  line-height: 14px;
}
@keyframes media-skeleton { to { background-position-x: -200%; } }
.message-gif-link { display: inline-flex; width: fit-content; max-width: min(480px, 100%); margin-top: 3px; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-sunken); }
.message-gif-link img { display: block; width: auto; max-width: 100%; height: auto; max-height: 480px; object-fit: contain; }

.message-rich-content { min-width: 0; overflow-wrap: anywhere; }
.message-rich-content p { margin: 0; white-space: pre-wrap; }
.message-rich-content p:empty { min-height: .65em; }
.message-rich-content blockquote {
  margin: 3px 0;
  padding: 3px 10px;
  border-left: 3px solid var(--accent);
  color: var(--text-secondary);
  background: var(--accent-soft);
}
.message-rich-content pre {
  max-width: 100%;
  margin: 5px 0;
  padding: 10px 12px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  white-space: pre;
}
.message-rich-content code { font-family: var(--font-mono, ui-monospace, monospace); }
.message-rich-content :not(pre) > code { padding: 1px 5px; border-radius: 4px; background: var(--bg-sunken); }
.message-list-item { display: grid; grid-template-columns: 18px 1fr; gap: 4px; }
.message-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.message-link-preview {
  width: min(360px, 100%);
  display: grid;
  gap: 2px;
  margin-top: 7px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-primary);
  background: var(--bg-sunken);
  text-decoration: none;
}
.message-link-preview span { color: var(--text-muted); font-size: 12px; }

@media (max-width: 950px) {
  .dm-channel.media-side-open { padding-right: var(--space-4); }
  .dm-media-side-panel { width: min(372px, calc(100% - 48px)); }
}

/* ---- Mensagens diretas ---- */

.dm-conversations-empty {
  padding: var(--space-3) var(--space-2);
  color: var(--text-muted);
  font-size: var(--label-md-size);
  line-height: var(--label-md-line);
}

.dm-conversation-item {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  border: 0;
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  background: transparent;
  text-align: left;
  box-shadow: none;
}

.dm-conversation-item:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  transform: none;
}

.dm-conversation-item.selected {
  color: var(--text-primary);
  background: var(--accent-soft);
}

.dm-conversation-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dm-conversation-copy strong,
.dm-conversation-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-conversation-copy strong {
  font-size: var(--body-md-size);
}

.dm-conversation-copy span {
  color: var(--text-muted);
  font-size: var(--label-sm-size);
}

.dm-unread-badge {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding-inline: 5px;
  border-radius: var(--radius-full);
  color: var(--text-on-accent);
  background: var(--accent);
  font-size: 10px;
  font-weight: var(--weight-bold);
}

.dm-view {
  max-width: none;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.dm-view[hidden] {
  display: none;
}

.dm-channel {
  position: relative;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: var(--space-2) var(--space-4);
  border-radius: 0;
  background: var(--bg-surface);
  overflow: hidden;
}

.dm-call-start {
  width: 36px;
  height: 36px;
  color: var(--text-secondary);
}

.dm-call-panel {
  flex-shrink: 0;
  margin: 0 var(--space-1) var(--space-2);
  border-radius: var(--radius-lg);
  background: var(--accent-muted);
  overflow: hidden;
}

.dm-call-panel.expanded {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  margin: 0;
  border-radius: 0;
  background: var(--bg-surface);
}

.dm-call-panel[hidden] {
  display: none;
}

.dm-call-stage {
  position: relative;
  height: clamp(260px, 40vh, 520px);
  min-height: 260px;
  display: grid;
  place-items: center;
  margin: var(--space-2);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--bg-surface-raised) 78%, var(--accent) 22%);
  overflow: hidden;
}

.dm-call-panel.expanded .dm-call-stage {
  flex: 1;
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  border-radius: 0;
}

.dm-call-expand {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 4;
  color: #fff;
  background: rgba(8, 10, 18, .5);
  box-shadow: var(--shadow-popover);
}

.dm-call-expand:hover {
  background: rgba(8, 10, 18, .78);
}

.dm-call-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-primary);
  font-size: var(--title-md-size);
  font-weight: var(--weight-semibold);
}

.dm-call-identity .avatar {
  width: 88px;
  height: 88px;
}

.dm-call-remote-screen,
.dm-call-remote-camera {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg-sunken);
}

.dm-call-remote-camera {
  object-fit: cover;
}

.dm-call-local-screen,
.dm-call-local-camera {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  width: min(220px, 26%);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  resize: both;
  overflow: hidden;
  min-width: 120px;
  max-width: 46%;
  cursor: grab;
}
.dm-call-local-camera:active { cursor: grabbing; }
.dm-call-local-screen:active { cursor: grabbing; }
.dm-call-local-camera.user-hidden, .dm-call-local-screen.user-hidden { display: none !important; }
.dm-call-stage.has-local-camera.has-local-screen .dm-call-local-camera {
  right: var(--space-3);
  left: auto;
}
.dm-call-stage.has-local-camera.has-local-screen .dm-call-local-screen {
  right: auto;
  left: var(--space-3);
}
.dm-call-stage.has-screen.has-camera .dm-call-remote-camera { inset: auto 16px 16px auto; width: min(240px, 30%); height: auto; aspect-ratio: 16 / 9; z-index: 3; border: 2px solid var(--border-strong); border-radius: var(--radius-md); }
.dm-call-stage.has-screen.has-camera .dm-call-remote-screen { z-index: 1; }
.dm-call-local-toggle.active { color: var(--accent); background: var(--accent-soft); }


.dm-call-local-screen {
  object-fit: contain;
}

.dm-call-footer {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3) var(--space-3);
}

.dm-call-status {
  color: var(--text-secondary);
  font-size: var(--body-md-size);
}

.dm-call-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.dm-call-controls .btn-icon {
  border-radius: var(--radius-full);
}

.dm-call-controls .btn-icon.active {
  color: var(--text-on-accent);
  background: var(--accent);
}

.dm-call-controls .dm-call-end {
  color: #fff;
  background: var(--danger);
}

.incoming-call-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background: var(--overlay-scrim);
}

.incoming-call-card {
  width: min(360px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  background: var(--bg-surface-raised);
  box-shadow: var(--shadow-modal);
}

.incoming-call-card .avatar {
  width: 88px;
  height: 88px;
}

.incoming-call-card h2,
.incoming-call-card p {
  margin: 0;
  text-align: center;
}

.incoming-call-card p {
  color: var(--text-muted);
}

.incoming-call-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.incoming-call-actions button {
  min-width: 112px;
}

.dm-call-event {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3) var(--space-2) 58px;
  color: var(--text-muted);
  font-size: var(--body-sm-size);
}

.dm-call-event .icon {
  color: var(--accent);
}

.dm-stream {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: var(--space-4) var(--space-3);
}

.dm-stream-content {
  margin-top: auto;
}

.dm-load-older {
  align-self: center;
  margin-bottom: var(--space-3);
}

.dm-start {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  padding: var(--space-5) var(--space-3) var(--space-4);
}

.dm-start .avatar {
  width: 72px;
  height: 72px;
  margin-bottom: var(--space-2);
}

.dm-start h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.dm-start > span {
  color: var(--text-muted);
  font-size: var(--body-sm-size);
}

.dm-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.dm-message-state {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: var(--body-sm-size);
}
.dm-message-state .icon { width: 18px; height: 18px; color: var(--accent); }
.dm-message-state.loading .icon { animation: public-profile-spin .9s linear infinite; }

.dm-message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
}

.dm-message:hover {
  background: var(--bg-hover);
}

.dm-message-body {
  min-width: 0;
}

.dm-message-meta {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.dm-message-meta time {
  color: var(--text-muted);
  font-size: var(--label-sm-size);
}
.dm-read-receipt { display: inline-flex; color: var(--text-muted); }
.dm-read-receipt.read { color: var(--accent); }
.dm-read-receipt .icon { width: 14px; height: 14px; }

.dm-message-content {
  margin-top: 3px;
  color: var(--text-secondary);
  line-height: var(--body-lg-line);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.dm-message-actions {
  display: flex;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.dm-message:hover .dm-message-actions,
.dm-message .dm-message-actions:focus-within {
  opacity: 1;
}

.dm-message-editor textarea { width: 100%; margin-top: var(--space-2); }
.dm-message-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.dm-edited {
  color: var(--text-muted);
  font-size: 10px;
}

.dm-deleted {
  color: var(--text-muted);
  font-style: italic;
}

.dm-search-state {
  flex-shrink: 0;
  margin: 0 var(--space-3) var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--accent-soft);
  font-size: var(--label-md-size);
}
.dm-search-state[data-kind="loading"] { color: var(--text-muted); background: var(--bg-sunken); }
.dm-search-state[data-kind="empty"] { color: var(--text-secondary); background: var(--bg-sunken); }
.dm-search-state[data-kind="error"] { color: var(--danger); background: var(--danger-muted); }

.dm-pinned-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 var(--space-1) var(--space-1);
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.dm-pinned-bar[hidden] { display: none; }
.dm-pinned-message {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 6px;
  color: var(--text-secondary);
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}
.dm-pinned-message:hover { background: var(--bg-hover); transform: none; }
.dm-pinned-message > span { min-width: 0; display: grid; }
.dm-pinned-message strong, .dm-pinned-message span span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-pinned-message strong { color: var(--accent); font-size: 12px; }
.dm-pinned-message span span { font-size: 12px; }
.dm-pinned-nav { display: flex; align-items: center; gap: 2px; color: var(--text-muted); font-size: 11px; }
.dm-message-highlight { animation: dm-message-highlight 1.6s ease; }
@keyframes dm-message-highlight { 0%, 45% { background: var(--accent-soft); } 100% { background: transparent; } }

.dm-composer {
  position: relative;
  min-height: 48px;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  margin: var(--space-1) var(--space-1) 0;
  transition: border-color var(--transition-fast);
}

.dm-composer:focus-within { border-color: var(--border-focus); }

.dm-composer > textarea {
  width: auto;
  min-width: 44px;
  min-height: 38px;
  max-height: 120px;
  flex: 1 1 auto;
  padding: 9px var(--space-1);
  border: 0;
  background: transparent;
  box-shadow: none;
  resize: none;
}

.dm-counter {
  align-self: center;
  flex: 0 0 auto;
  font-size: 10px;
}

.dm-send {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: var(--radius-full);
  color: var(--text-on-accent);
  background: var(--accent);
}

.dm-send:hover { background: var(--accent-hover); }

.dm-composer.is-recording > .composer-attach-wrap,
.dm-composer.is-recording > textarea,
.dm-composer.is-recording > #dmGifBtn,
.dm-composer.is-recording > #dmStickerBtn,
.dm-composer.is-recording > #dmEmojiBtn,
.dm-composer.is-recording > #dmMediaPanelBtn,
.dm-composer.is-recording > #dmCounter,
.dm-composer.is-recording > #dmSubmitBtn {
  display: none;
}

.dm-recording-bar {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.dm-recording-bar[hidden] { display: none; }

.dm-recording-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: var(--radius-full);
  background: var(--danger);
  box-shadow: 0 0 0 5px var(--danger-muted);
  animation: record-pulse 1.2s ease-in-out infinite;
}

.dm-recording-copy {
  min-width: 94px;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.dm-recording-copy strong { color: var(--text-primary); font-size: var(--body-sm-size); }
.dm-recording-copy span { color: var(--danger); font-variant-numeric: tabular-nums; font-size: var(--body-sm-size); }
.dm-recording-hint { min-width: 0; flex: 1; color: var(--text-muted); font-size: var(--label-sm-size); text-align: right; }

.dm-composer-feedback {
  min-height: 36px;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-1) var(--space-1) 0;
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--bg-sunken);
}

.dm-composer-feedback[hidden] { display: none; }
.dm-composer-feedback[data-kind="error"] { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); background: var(--danger-muted); }
.dm-composer-feedback[data-kind="success"] { border-color: color-mix(in srgb, var(--success) 45%, var(--border)); background: var(--success-muted); }
.dm-composer-feedback[data-kind="info"] { border-color: color-mix(in srgb, var(--accent) 42%, var(--border)); background: var(--accent-muted); }
.dm-composer-feedback p { min-width: 0; margin: 0; overflow-wrap: anywhere; color: inherit; font-size: var(--label-md-size); }
.dm-feedback-symbol { display: grid; place-items: center; }
.dm-feedback-symbol .icon { width: 16px; height: 16px; }
.dm-composer-feedback[data-kind="error"] .dm-feedback-symbol { color: var(--danger); }
.dm-composer-feedback[data-kind="success"] .dm-feedback-symbol { color: var(--success); }
.dm-composer-feedback[data-kind="info"] .dm-feedback-symbol { color: var(--accent); }

.composer-attach-wrap {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.attachment-picker {
  position: absolute;
  z-index: 20;
  left: -6px;
  bottom: calc(100% + 8px);
  display: grid;
  min-width: 178px;
  gap: 3px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-popover);
}
.attachment-picker.anchored-layer { right: auto; bottom: auto; }
.attachment-picker[hidden] { display: none; }
.attachment-picker-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  gap: 10px;
  min-height: 38px;
  padding: 7px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: transparent;
  box-shadow: none;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
}
.attachment-picker-option:hover { color: var(--text-primary); background: var(--bg-hover); transform: none; }
.attachment-picker-option .icon {
  width: 18px;
  height: 18px;
  box-sizing: content-box;
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--accent);
  background: var(--accent-soft);
}
.attachment-picker-option span { text-align: left; }

.dm-attach[aria-expanded="true"]::before,
.dm-attach[aria-expanded="true"]::after { display: none; }

.dm-attach {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
}

.dm-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
  max-width: 100%;
}

.dm-image-button {
  position: relative;
  display: inline-flex;
  width: min(320px, 100%);
  max-width: min(520px, 100%);
  min-height: 168px;
  height: auto;
  max-height: 420px;
  aspect-ratio: auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-sunken);
  box-shadow: none;
}

.dm-image-button.ready {
  width: fit-content;
  min-height: 0;
}

.dm-image-button:hover {
  transform: none;
}

.dm-image-button.unavailable { border: 1px solid var(--border); }

.dm-attachment-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
}

.dm-video-attachment {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(520px, 100%);
  max-width: min(520px, 100%);
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: #000;
}

.dm-attachment-video {
  display: block;
  width: 100%;
  max-width: min(520px, 100%);
  height: auto;
  max-height: 420px;
  aspect-ratio: auto;
  object-fit: contain;
  background: #000;
}

.dm-video-attachment.loading .dm-attachment-video,
.dm-video-attachment.unavailable .dm-attachment-video { opacity: .22; }

.dm-attachment-state-mount {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.dm-attachment-state-mount:empty { display: none; }
.dm-attachment-state-mount .dm-attachment-state { pointer-events: auto; }

.dm-attachment-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  color: var(--text-muted);
  font-size: var(--label-md-size);
  text-align: center;
}

.dm-attachment-state .icon { width: 22px; height: 22px; color: var(--accent); }
.dm-attachment-state.loading .icon { animation: public-profile-spin .9s linear infinite; }
.dm-attachment-state.unavailable .icon { color: var(--warning); }

.dm-audio-attachment {
  position: relative;
  width: min(440px, 100%);
  max-width: 100%;
  display: grid;
  grid-template-columns: 40px minmax(150px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-sunken));
}
.dm-audio-play { width: 38px; height: 38px; border-radius: var(--radius-full); color: var(--text-on-accent); background: var(--accent); }
.dm-audio-play .icon { width: 19px; height: 19px; }
.dm-audio-play:hover { background: var(--accent-hover); transform: none; }
.dm-audio-center { min-width: 0; display: grid; gap: 4px; }
.dm-audio-timeline {
  position: relative;
  width: 100%;
  height: 25px;
  display: flex;
  align-items: center;
}
.dm-audio-timeline:focus-within { outline: 2px solid var(--border-focus); outline-offset: 3px; border-radius: 4px; }
.dm-audio-waveform,
.dm-audio-waveform-played,
.dm-audio-waveform-bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}
.dm-audio-waveform { overflow: hidden; }
.dm-audio-waveform-played { width: 0; overflow: hidden; }
.dm-audio-waveform-bars { min-width: 100%; }
.dm-audio-track {
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  overflow: hidden;
  border-radius: 1px;
  background: color-mix(in srgb, var(--text-muted) 42%, transparent);
  transform: translateY(-50%);
}
.dm-audio-track-played { display: block; width: 0; height: 100%; background: color-mix(in srgb, var(--text-primary) 92%, transparent); }
.dm-audio-waveform-bars { z-index: 1; }
.dm-audio-waveform-played { z-index: 2; }
.dm-audio-waveform-bars i {
  min-width: 2px;
  flex: 1 1 2px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--text-muted) 72%, transparent);
}
.dm-audio-waveform-bars.played i { background: color-mix(in srgb, var(--text-primary) 92%, transparent); }
.dm-audio-progress {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.dm-audio-times { display: inline-flex; gap: 3px; color: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dm-audio-tools { display: inline-flex; gap: 4px; }
.dm-audio-tools { grid-column: 3; grid-row: 1; align-items: center; }
.dm-audio-attachment audio { display: none; }
.dm-audio-speed { flex: 0 0 auto; min-width: 34px; min-height: 26px; padding: 2px 6px; border-radius: 5px; font-size: 10px; }
.dm-native-sticker { width: min(224px, 100%); min-height: 80px; display: grid; place-items: center; margin-top: 5px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.dm-native-sticker img,
.dm-native-sticker video { display: block; width: auto; max-width: 224px; height: auto; max-height: 224px; object-fit: contain; }
.dm-native-sticker:hover { background: transparent; transform: none; }
.dm-native-sticker.unavailable { color: var(--text-muted); font-size: 11px; }
.dm-audio-state {
  grid-column: 1 / -1;
  min-width: 0;
}
.dm-audio-state:empty { display: none; }
.dm-audio-state .dm-attachment-state {
  min-height: 36px;
  flex-direction: row;
  justify-content: flex-start;
  padding: 0;
}
.dm-audio-attachment.loading > :not(.dm-audio-state),
.dm-audio-attachment.unavailable > :not(.dm-audio-state) { opacity: .45; }
.dm-sticker-attachment.dm-image-button,
.dm-sticker-attachment.dm-video-attachment {
  width: min(224px, 100%);
  min-height: 0;
  max-height: 224px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.dm-sticker-attachment .dm-attachment-image,
.dm-sticker-attachment .dm-attachment-video {
  width: auto;
  max-width: 224px;
  height: auto;
  max-height: 224px;
  object-fit: contain;
  background: transparent;
}
.dm-recording, #dmRecordBtn.recording { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); animation: record-pulse 1.4s infinite; }
@keyframes record-pulse { 50% { opacity: .58; } }

.dm-attachment-draft {
  max-height: min(280px, 42vh);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: var(--space-1) var(--space-1) 0;
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--bg-sunken);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.dm-attachment-draft[hidden] { display: none; }

.dm-attachment-draft:not([hidden]) ~ .dm-composer {
  margin-top: 0;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.dm-draft-summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 var(--space-1) var(--space-1);
  border-bottom: 1px solid var(--border);
}

.dm-draft-summary > span,
.dm-draft-item > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dm-draft-summary small { color: var(--text-muted); }

.dm-draft-item {
  min-height: 60px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 36px;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-1);
  border-radius: var(--radius-sm);
}

.dm-draft-item:hover { background: var(--bg-hover); }

.dm-draft-preview {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: var(--bg-surface);
}

.dm-draft-preview img,
.dm-draft-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dm-draft-item strong,
.dm-draft-item small,
.dm-draft-summary strong,
.dm-draft-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-draft-item small { color: var(--text-muted); }
.dm-draft-item progress { width: min(260px, 100%); height: 5px; accent-color: var(--accent); }

.dm-upload-message {
  grid-template-columns: 58px minmax(0, 1fr);
  margin: 4px var(--space-3);
  padding: 10px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
}
.dm-upload-message.failed {
  border-style: solid;
  border-color: color-mix(in srgb, var(--danger) 48%, var(--border));
  background: var(--danger-muted);
}
.dm-upload-preview {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
}
.dm-upload-preview img, .dm-upload-preview video { width: 100%; height: 100%; object-fit: cover; }
.dm-upload-task { min-width: 0; display: grid; gap: 4px; }
.dm-upload-task strong, .dm-upload-task span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-upload-task span { color: var(--text-muted); font-size: 12px; }
.dm-upload-task progress { width: min(320px, 100%); height: 5px; accent-color: var(--accent); }
.dm-upload-actions { display: flex; gap: 6px; }
.dm-upload-actions button { padding: 4px 8px; font-size: 11px; }

.dm-video-caption {
  display: block;
  overflow: hidden;
  padding: var(--space-2) var(--space-3);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--body-sm-size);
}

.dm-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-6);
  background: color-mix(in srgb, #05060c 92%, transparent);
}

.dm-image-lightbox img {
  display: block;
  max-width: min(92vw, 1440px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
}

.dm-image-lightbox-bar {
  width: min(92vw, 1440px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.dm-image-lightbox-name {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-image-lightbox-actions {
  display: flex;
  gap: var(--space-2);
}

.dm-image-lightbox-actions button {
  width: auto;
}

.dm-file-card {
  width: min(440px, 100%);
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--bg-sunken);
  text-align: left;
  box-shadow: none;
}

.dm-file-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-active);
  transform: none;
}

.dm-file-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.dm-file-download {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  background: var(--bg-hover);
}

.dm-file-card:hover .dm-file-download { color: var(--text-primary); background: var(--accent-muted); }
.dm-file-card.downloading .dm-file-download .icon { animation: public-profile-spin .9s linear infinite; }

.dm-file-type {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}

.dm-file-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-file-card small {
  color: var(--text-muted);
}

.dm-forward-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: var(--space-5);
  background: color-mix(in srgb, #05060c 78%, transparent);
}
.dm-forward-dialog {
  width: min(480px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 44px));
  display: grid;
  grid-template-rows: auto auto minmax(160px, 1fr) auto;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-surface-raised);
  box-shadow: var(--shadow-modal);
}
.dm-forward-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.dm-forward-dialog > header > div { display: grid; gap: 3px; }
.dm-forward-dialog > header strong { color: var(--text-primary); font-size: 18px; }
.dm-forward-dialog > header span { color: var(--text-muted); font-size: var(--body-sm-size); }
.dm-forward-search { position: relative; display: flex; align-items: center; }
.dm-forward-search > .icon { position: absolute; left: 12px; width: 17px; height: 17px; color: var(--text-muted); pointer-events: none; }
.dm-forward-search input { width: 100%; min-height: 42px; padding-left: 40px; }
.dm-forward-list { min-height: 0; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; scrollbar-gutter: stable; }
.dm-forward-list > .goklah-loader { margin: auto; }
.dm-forward-target {
  min-height: 56px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 28px;
  align-items: center;
  gap: var(--space-3);
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.dm-forward-target:hover { background: var(--bg-hover); }
.dm-forward-target.selected { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background: var(--accent-soft); }
.dm-forward-target > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dm-forward-target-copy { min-width: 0; display: grid; gap: 2px; }
.dm-forward-target strong,
.dm-forward-target small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-forward-target small { color: var(--text-muted); }
.dm-forward-saved-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--radius-full); color: var(--accent); background: var(--accent-soft); }
.dm-forward-saved-icon .icon { width: 18px; height: 18px; }
.dm-forward-check { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-full); color: transparent; }
.dm-forward-check .icon { width: 14px; height: 14px; }
.dm-forward-target.selected .dm-forward-check { border-color: var(--accent); color: var(--text-on-accent); background: var(--accent); }
.dm-forward-dialog > footer { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--border); }
.dm-forward-dialog > footer > span { min-width: 0; flex: 1; color: var(--text-muted); font-size: var(--label-md-size); }
.dm-forward-dialog > footer button { width: auto; }
.dm-forward-dialog > footer .goklah-loader { flex-direction: row; color: currentColor; }
.dm-forward-empty { margin: auto; padding: var(--space-5); color: var(--text-muted); text-align: center; }
.dm-forward-empty.error,
.dm-forward-inline-error { color: var(--danger); }
.dm-forward-inline-error { width: 100%; margin: 0; font-size: var(--label-sm-size); }

.dm-friend-picker {
  min-width: 250px;
  max-height: min(420px, 70vh);
  overflow-y: auto;
}

.dm-picker-message {
  max-width: 250px;
  margin: 0;
  padding: var(--space-3);
  color: var(--text-muted);
  line-height: var(--body-md-line);
}

.app-header-icon .avatar {
  width: 28px;
  height: 28px;
}

@media (max-width: 900px) {
  .dm-message .dm-message-actions { opacity: 1; }

  .dm-channel { padding-inline: var(--space-2); }
  .dm-stream { padding-inline: var(--space-1); }
  .dm-message { padding-inline: var(--space-2); }
  .dm-start { padding-inline: var(--space-2); }
  .dm-recording-hint { display: none; }
  .dm-upload-actions { flex-wrap: wrap; }
}

@media (max-width: 720px), (max-height: 600px) {
  .emoji-picker emoji-picker,
  .sticker-picker,
  .gif-picker {
    height: min(300px, calc(100vh - 150px));
    min-height: 240px;
  }

  .dm-audio-attachment {
    grid-template-columns: 44px minmax(80px, 1fr) auto;
  }
  .dm-audio-state { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .emoji-picker { width: calc(100vw - (var(--space-2) * 2)); }
  .dm-recording-copy strong { display: none; }
  .dm-composer-feedback { grid-template-columns: auto minmax(0, 1fr) auto; }
  .dm-composer-feedback #dmFeedbackAction { grid-column: 2; justify-self: start; }
  .dm-composer-feedback #dmFeedbackDismiss { grid-column: 3; grid-row: 1 / span 2; }
}

.settings-avatar-edit {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  border: 3px solid var(--bg-app);
  cursor: pointer;
  flex-shrink: 0;
  background: var(--bg-surface);
}

/* Avatar como seção própria (não mais sobreposto ao banner) — um pouco
   maior, sem a borda pensada pra recortar sobre o banner. */
.settings-avatar-edit-standalone {
  width: 96px;
  height: 96px;
  border: 1px solid var(--border);
}

.settings-image-remove-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

.settings-image-remove-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.settings-image-remove-btn .icon {
  width: 14px;
  height: 14px;
}

.settings-avatar-edit img,
.settings-avatar-edit .avatar {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.settings-avatar-edit .settings-image-edit-overlay {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 11, 18, 0.45);
  color: #fff;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.settings-avatar-edit:hover .settings-image-edit-overlay {
  opacity: 1;
}

.settings-avatar-edit .settings-image-edit-overlay .icon {
  font-size: 20px;
}

/* ---- Linha de campo genérica (rótulo + controle, usada em Voz e
   vídeo/Aparência/Perfil) — mais espaçada que .profile-row (que é
   valor-só-leitura), pensada pra caber um <select>/toggle ao lado. ---- */

.settings-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}

.settings-field-row:last-of-type {
  border-bottom: none;
}

.settings-field-row .settings-field-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-field-row .settings-field-label .title {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}

.settings-field-row .settings-field-label .desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.settings-field-row select {
  min-width: 220px;
}

.settings-preference-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.settings-preference-list .settings-field-row {
  min-height: 58px;
  padding-inline: var(--space-3);
}

.settings-preference-list .settings-field-row:last-child {
  border-bottom: 0;
}

.settings-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.settings-preview-actions button .icon {
  width: 17px;
  height: 17px;
}

.settings-preview-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  line-height: 1;
}

.settings-preview-actions button.active {
  border-color: var(--accent);
  background: var(--accent-muted);
  color: var(--text-primary);
}

.settings-volume-range {
  width: min(240px, 36vw);
  accent-color: var(--accent);
}

.settings-shortcut-list {
  display: grid;
  margin: var(--space-3) 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
}

.settings-shortcut-row {
  min-height: 68px;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.settings-shortcut-row:last-child { border-bottom: 0; }
.settings-shortcut-copy { min-width: 0; display: grid; gap: 2px; }
.settings-shortcut-copy small { color: var(--text-muted); }
.settings-shortcut-change { min-width: 150px; justify-content: space-between; }
.settings-shortcut-change kbd {
  min-width: 56px;
  padding: 3px 7px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-align: center;
}
.settings-shortcut-change.recording {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.settings-diagnostics-card {
  padding: var(--space-4);
  display: grid;
  gap: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.settings-diagnostics-card button { justify-self: start; margin-top: var(--space-2); }

@media (max-width: 760px) {
  .settings-shortcut-row { align-items: flex-start; flex-direction: column; }
  .settings-shortcut-change { width: 100%; }
}

.settings-static-value {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.settings-workspace-status:empty {
  display: none;
}

.settings-feedback-form {
  display: grid;
  gap: 16px;
  max-width: 680px;
  margin-top: 24px;
}

.settings-feedback-form label {
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.settings-feedback-form input,
.settings-feedback-form select,
.settings-feedback-form textarea {
  width: 100%;
}

.settings-feedback-form textarea {
  min-height: 150px;
  resize: vertical;
}

.settings-feedback-form button {
  justify-self: start;
}

.report-dialog label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.report-dialog select,
.report-dialog textarea {
  width: 100%;
}

.report-dialog textarea {
  min-height: 110px;
  resize: vertical;
}

/* ---- Toggle (interruptor) — Voz e vídeo (supressão de ruído/eco/AGC). ---- */

button.switch-toggle {
  width: 40px;
  height: 22px;
  padding: 0;
  border-radius: var(--radius-full);
  background: var(--bg-active);
  position: relative;
  flex-shrink: 0;
}

button.switch-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--text-secondary);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

button.switch-toggle[aria-pressed="true"] {
  background: var(--accent-muted-strong);
}

button.switch-toggle[aria-pressed="true"]::after {
  transform: translateX(18px);
  background: var(--accent);
}

/* ---- Entrada do aplicativo e notificações ---- */

.app-launch-splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  background: var(--bg-app);
  color: var(--text-primary);
}

.app-launch-splash[hidden] {
  display: none;
}

.app-launch-mark {
  position: relative;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
}

.app-launch-mark img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  animation: goklah-launch-pulse 900ms ease-in-out infinite alternate;
}

.app-launch-ring {
  position: absolute;
  inset: 0;
  border: 3px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-top-color: var(--accent);
  border-right-color: color-mix(in srgb, var(--accent) 68%, #d77bf0 32%);
  border-radius: 50%;
  animation: goklah-launch-spin 900ms linear infinite;
}

.app-launch-splash > strong {
  font-size: 24px;
}

.app-launch-splash > span {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

@keyframes goklah-launch-spin {
  to { transform: rotate(360deg); }
}

@keyframes goklah-launch-pulse {
  from { transform: scale(0.94); }
  to { transform: scale(1); }
}

.goklah-loader {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: var(--text-muted);
  vertical-align: middle;
}
.goklah-loader-mark { position: relative; display: grid; place-items: center; flex: 0 0 auto; }
.goklah-loader-mark img { width: 62%; height: 62%; object-fit: contain; }
.goklah-loader-ring {
  position: absolute;
  inset: 0;
  border: 2px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-top-color: var(--accent);
  border-right-color: color-mix(in srgb, var(--accent) 68%, #d77bf0 32%);
  border-radius: 50%;
  animation: goklah-launch-spin 900ms linear infinite;
}
.goklah-loader.medium .goklah-loader-mark { width: 58px; height: 58px; }
.goklah-loader.small .goklah-loader-mark { width: 34px; height: 34px; }
.goklah-loader.mini { flex-direction: row; gap: 6px; }
.goklah-loader.mini .goklah-loader-mark { width: 20px; height: 20px; }
.goklah-loader.mini .goklah-loader-ring { border-width: 1.5px; }
.goklah-loader-label { color: inherit; font-size: var(--label-md-size); line-height: 1.35; }

.notification-toast-region {
  position: fixed;
  top: calc(var(--titlebar-h) + var(--space-4));
  right: var(--space-4);
  z-index: 900;
  width: min(360px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

button.notification-toast {
  width: 100%;
  height: auto;
  min-height: 72px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg-surface-raised) 96%, transparent);
  box-shadow: var(--shadow-popover);
  color: var(--text-primary);
  text-align: left;
  pointer-events: auto;
  animation: goklah-toast-in 180ms ease-out both;
}

button.notification-toast:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  border-left-color: var(--accent);
}

button.notification-toast.leaving {
  animation: goklah-toast-out 160ms ease-in both;
}

.notification-toast > .icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-muted);
  color: var(--accent);
}

.notification-toast-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.notification-toast-copy strong,
.notification-toast-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-toast-copy span {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.notification-toast-close {
  color: var(--text-muted);
}

.notification-toast-close .icon {
  width: 16px;
  height: 16px;
}

@keyframes goklah-toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes goklah-toast-out {
  to { opacity: 0; transform: translateX(20px); }
}

@media (prefers-reduced-motion: reduce) {
  .app-launch-ring,
  .app-launch-mark img,
  button.notification-toast,
  button.notification-toast.leaving {
    animation: none;
  }
}

/* ---- Aparência — cartões de tema ---- */

.theme-options {
  display: flex;
  gap: var(--space-3);
}

button.theme-option {
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  height: auto;
  padding: var(--space-2);
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
}

button.theme-option:hover {
  border-color: var(--text-disabled);
  background: var(--bg-surface);
}

button.theme-option[aria-pressed="true"] {
  border-color: var(--accent);
}

.theme-option-swatch {
  height: 56px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.theme-option-swatch.dark {
  background: linear-gradient(135deg, #0a0b12 0%, #171b28 60%, #6678f4 100%);
}

.theme-option-swatch.light {
  background: linear-gradient(135deg, #f4f5fa 0%, #ffffff 60%, #6678f4 100%);
}

.theme-option-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  text-align: center;
}

/* ---- Sessões ---- */

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.session-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.session-row .session-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-active);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.session-row.current .session-icon {
  background: var(--accent-muted);
  color: var(--accent);
}

.session-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.session-row-info .title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}

.session-row-info .meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.session-current-tag {
  font-size: var(--label-sm-size);
  font-weight: var(--weight-semibold);
  color: var(--success);
  background: var(--success-muted);
  border-radius: var(--radius-full);
  padding: 2px var(--space-md);
}
/* Selo oficial: usa o asset fornecido pelo projeto e acompanha o tamanho do
   texto sem dominar nomes pequenos em listas. */
.verified-name {
  display: inline-flex;
  align-items: center;
  gap: 0.32em;
  min-width: 0;
}

.verified-badge {
  width: 1.05em;
  height: 1.05em;
  flex: 0 0 auto;
  object-fit: contain;
  user-select: none;
}
