/* Discord V2 — 1:1 Dark Theme */

/* ── Font Face ────────────────────────────────────── */
@font-face { font-family: "gg sans"; font-style: normal; font-weight: 400; src: url("fonts/gg-sans-400.woff2") format("woff2"); }
@font-face { font-family: "gg sans"; font-style: normal; font-weight: 500; src: url("fonts/gg-sans-500.woff2") format("woff2"); }
@font-face { font-family: "gg sans"; font-style: normal; font-weight: 600; src: url("fonts/gg-sans-600.woff2") format("woff2"); }
@font-face { font-family: "gg sans"; font-style: normal; font-weight: 700; src: url("fonts/gg-sans-700.woff2") format("woff2"); }

/* ── Design Tokens ────────────────────────────────── */
.discord-v2 {
  /* Backgrounds */
  --dc-bg-app-frame:    #25262a;  /* neutral-78 */
  --dc-bg-guild-bar:    #1b1c1f;  /* neutral-85 */
  --dc-bg-sidebar:      #2c2d32;  /* neutral-73 */
  --dc-bg-chat:         #36373e;  /* neutral-66 */
  --dc-bg-surface-high: #393a41;  /* neutral-64 */
  --dc-bg-surface-higher:#3c3d45; /* neutral-62 */
  --dc-bg-surface-highest:#3f4048;/* neutral-60 */
  --dc-bg-input:        #393a41;  /* neutral-64 */
  --dc-bg-user-panel:   #25262a;  /* neutral-78 */
  --dc-bg-overlay-subtle: rgba(148,149,159, 0.08);
  --dc-bg-overlay-normal: rgba(148,149,159, 0.16);
  --dc-bg-overlay-strong: rgba(148,149,159, 0.24);

  /* Brand */
  --dc-blurple:         #5865f2;
  --dc-blurple-hover:   #4752c4;
  --dc-blurple-light:   #94a8ff;
  --dc-green:           #3d9e60;
  --dc-red:             #da3e44;
  --dc-yellow:          #ffcb6e;

  /* Text */
  --dc-text-default:    #f3f3f4;  /* neutral-4  */
  --dc-text-subtle:     #c5c6ca;  /* neutral-16 */
  --dc-text-muted:      #abacb2;  /* neutral-23 */
  --dc-text-faint:      #9d9ea5;  /* neutral-27 */
  --dc-text-interactive: #81828a; /* neutral-35 */
  --dc-text-interactive-hover: #dcdcdf; /* neutral-10 */
  --dc-text-interactive-active: #ffffff;
  --dc-text-link:       #76aff6;

  /* Status */
  --dc-status-online:   #3d9e60;
  --dc-status-idle:     #ffcb6e;
  --dc-status-dnd:      #dc4247;
  --dc-status-offline:  #9d9ea5;

  /* Border */
  --dc-border-subtle:   rgba(148,149,159, 0.12);
  --dc-border-strong:   rgba(148,149,159, 0.44);

  /* Typography */
  --dc-font: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --dc-font-code: "Consolas", "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;

  /* Dimensions */
  --dc-guild-bar-width:   72px;
  --dc-sidebar-width:     240px;
  --dc-member-list-width: 240px;
  --dc-chat-header-height: 48px;
  --dc-user-panel-height:  52px;
  --dc-avatar-size:       40px;
  --dc-avatar-sm:         32px;
  --dc-avatar-xs:         24px;
  --dc-server-icon-size:  48px;

  /* Radius */
  --dc-radius-sm: 4px;
  --dc-radius-md: 8px;
  --dc-radius-lg: 16px;
  --dc-radius-full: 50%;

  font-family: var(--dc-font);
  font-size: 16px;
  color: var(--dc-text-default);
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
}

/* ── Root Layout ──────────────────────────────────── */
.discord-v2 {
  display: flex;
  width: 100%;
  height: 100%;
  background: var(--dc-bg-app-frame);
  overflow: hidden;
  position: relative;
}

/* ── Guild Bar (far-left server strip) ────────────── */
.dc-guild-bar {
  width: var(--dc-guild-bar-width);
  min-width: var(--dc-guild-bar-width);
  background: var(--dc-bg-guild-bar);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.dc-guild-bar::-webkit-scrollbar { display: none; }

.dc-guild-item {
  position: relative;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  cursor: pointer;
}
.dc-guild-item .dc-guild-icon {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-radius 0.15s ease, background-color 0.15s ease;
  background: var(--dc-bg-surface-highest);
  color: var(--dc-text-interactive);
  font-size: 18px;
  font-weight: 500;
}
.dc-guild-item .dc-guild-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dc-guild-item:hover .dc-guild-icon,
.dc-guild-item.dp-hovered .dc-guild-icon,
.dc-guild-item.dc-active .dc-guild-icon {
  border-radius: 16px;
}
.dc-guild-item.dc-active .dc-guild-icon {
  background: var(--dc-blurple);
  color: #fff;
}
.dc-guild-item:hover .dc-guild-icon:not(.dc-guild-item.dc-active .dc-guild-icon), .dc-guild-item.dp-hovered .dc-guild-icon:not(.dc-guild-item.dc-active .dc-guild-icon) {
  background: var(--dc-blurple);
  color: #fff;
}

/* Selection pill */
.dc-guild-pill {
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  background: var(--dc-text-default);
  border-radius: 0 4px 4px 0;
  transition: height 0.15s ease;
  height: 0;
}
.dc-guild-item:hover .dc-guild-pill, .dc-guild-item.dp-hovered .dc-guild-pill { height: 20px; }
.dc-guild-item.dc-active .dc-guild-pill { height: 40px; }
.dc-guild-item.dc-unread .dc-guild-pill { height: 8px; }

/* Notification badge */
.dc-guild-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--dc-red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--dc-bg-guild-bar);
  line-height: 1;
}
.dc-guild-badge:empty { display: none; }

.dc-guild-separator {
  width: 32px;
  height: 2px;
  background: var(--dc-border-subtle);
  border-radius: 1px;
  margin: 4px 0 12px;
}

/* DM home icon */
.dc-guild-item.dc-guild-home .dc-guild-icon {
  background: var(--dc-bg-surface-highest);
  color: var(--dc-text-default);
}
.dc-guild-item.dc-guild-home:hover .dc-guild-icon,
.dc-guild-item.dc-guild-home.dp-hovered .dc-guild-icon,
.dc-guild-item.dc-guild-home.dc-active .dc-guild-icon {
  background: var(--dc-green);
  color: #fff;
}

/* Folder */
.dc-guild-folder {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--dc-bg-surface-high);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  padding: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: border-radius 0.15s ease;
}
.dc-guild-folder:hover, .dc-guild-folder.dp-hovered { border-radius: 16px; }
.dc-guild-folder-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--dc-bg-surface-highest);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 600;
  color: var(--dc-text-muted);
  overflow: hidden;
}
.dc-guild-folder-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Add / Discover buttons */
.dc-guild-action {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dc-bg-surface-highest);
  color: var(--dc-green);
  cursor: pointer;
  margin-bottom: 8px;
  transition: border-radius 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.dc-guild-action:hover, .dc-guild-action.dp-hovered {
  border-radius: 16px;
  background: var(--dc-green);
  color: #fff;
}
.dc-guild-action svg { width: 24px; height: 24px; }

/* ── Sidebar Panel (channels + user panel) ────────── */
.dc-sidebar-panel {
  width: var(--dc-sidebar-width);
  min-width: var(--dc-sidebar-width);
  background: var(--dc-bg-sidebar);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px 0 0 0;
}

/* Server header */
.dc-server-header {
  height: var(--dc-chat-header-height);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 1px 0 var(--dc-border-subtle);
  flex-shrink: 0;
  transition: background 0.15s;
}
.dc-server-header:hover, .dc-server-header.dp-hovered {
  background: var(--dc-bg-overlay-subtle);
}
.dc-server-header-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--dc-text-default);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.dc-server-header-name .dc-verified-badge {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.dc-server-header-chevron {
  width: 18px;
  height: 18px;
  color: var(--dc-text-muted);
  flex-shrink: 0;
  margin-left: 4px;
}

/* Channel list */
.dc-channel-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--dc-bg-surface-high) transparent;
}
.dc-channel-list::-webkit-scrollbar { width: 8px; }
.dc-channel-list::-webkit-scrollbar-track { background: transparent; }
.dc-channel-list::-webkit-scrollbar-thumb { background: var(--dc-bg-surface-high); border-radius: 4px; }

/* Category */
.dc-category {
  padding-top: 16px;
}
.dc-category-header {
  display: flex;
  align-items: center;
  padding: 0 8px 0 16px;
  cursor: pointer;
  height: 24px;
  user-select: none;
}
.dc-category-arrow {
  width: 12px;
  height: 12px;
  color: var(--dc-text-muted);
  margin-right: 2px;
  transition: transform 0.15s;
  flex-shrink: 0;
}
.dc-category.dc-collapsed .dc-category-arrow {
  transform: rotate(-90deg);
}
.dc-category-name {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--dc-text-muted);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dc-category-header:hover .dc-category-name, .dc-category-header.dp-hovered .dc-category-name {
  color: var(--dc-text-subtle);
}
.dc-category-add {
  width: 18px;
  height: 18px;
  color: var(--dc-text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.dc-category-header:hover .dc-category-add, .dc-category-header.dp-hovered .dc-category-add { opacity: 1; }
.dc-category-channels {
  padding-top: 2px;
}
.dc-category.dc-collapsed .dc-category-channels {
  display: none;
}

/* Channel item */
.dc-channel-item {
  display: flex;
  align-items: center;
  padding: 1px 8px;
  cursor: pointer;
}
.dc-channel-item-inner {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 8px;
  border-radius: var(--dc-radius-sm);
  transition: background 0.1s;
  gap: 6px;
}
.dc-channel-item:hover .dc-channel-item-inner, .dc-channel-item.dp-hovered .dc-channel-item-inner {
  background: var(--dc-bg-overlay-subtle);
}
.dc-channel-item.dc-selected .dc-channel-item-inner {
  background: var(--dc-bg-overlay-normal);
}
.dc-channel-item-icon {
  width: 20px;
  height: 20px;
  color: var(--dc-text-interactive);
  flex-shrink: 0;
}
.dc-channel-item.dc-selected .dc-channel-item-icon,
.dc-channel-item:hover .dc-channel-item-icon,
.dc-channel-item.dp-hovered .dc-channel-item-icon {
  color: var(--dc-text-subtle);
}
.dc-channel-item-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--dc-text-interactive);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  line-height: 20px;
}
.dc-channel-item.dc-selected .dc-channel-item-name {
  color: var(--dc-text-default);
}
.dc-channel-item:hover .dc-channel-item-name, .dc-channel-item.dp-hovered .dc-channel-item-name {
  color: var(--dc-text-subtle);
}
.dc-channel-item.dc-unread .dc-channel-item-name {
  color: var(--dc-text-default);
  font-weight: 600;
}
/* Thread item (indented under parent channel) */
.dc-thread-item {
  display: flex;
  align-items: center;
  padding: 1px 8px 1px 24px;
  cursor: pointer;
}
.dc-thread-item-inner {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 4px 8px;
  border-radius: var(--dc-radius-sm);
  transition: background 0.1s;
  gap: 6px;
}
.dc-thread-item:hover .dc-thread-item-inner, .dc-thread-item.dp-hovered .dc-thread-item-inner {
  background: var(--dc-bg-overlay-subtle);
}
.dc-thread-item.dc-selected .dc-thread-item-inner {
  background: var(--dc-bg-overlay-normal);
}
.dc-thread-item .dc-channel-item-icon {
  width: 18px;
  height: 18px;
}
.dc-thread-item .dc-channel-item-name {
  font-size: 15px;
  color: var(--dc-text-interactive);
}
.dc-thread-item.dc-selected .dc-channel-item-name {
  color: var(--dc-text-default);
}
.dc-thread-item:hover .dc-channel-item-name, .dc-thread-item.dp-hovered .dc-channel-item-name {
  color: var(--dc-text-subtle);
}

/* Unread dot */
.dc-channel-item.dc-unread::before {
  content: '';
  position: absolute;
  left: 0;
  width: 4px;
  height: 8px;
  background: var(--dc-text-default);
  border-radius: 0 4px 4px 0;
}
.dc-channel-item-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  flex-shrink: 0;
}
.dc-channel-item:hover .dc-channel-item-actions, .dc-channel-item.dp-hovered .dc-channel-item-actions { opacity: 1; }
.dc-channel-item-actions svg {
  width: 16px;
  height: 16px;
  color: var(--dc-text-muted);
  cursor: pointer;
}
.dc-channel-item-actions svg:hover, .dc-channel-item-actions svg.dp-hovered { color: var(--dc-text-subtle); }

/* Utility links (Browse Channels, Members, Boosts) */
.dc-sidebar-utility {
  padding: 2px 8px;
}
.dc-sidebar-utility-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: var(--dc-radius-sm);
  cursor: pointer;
  color: var(--dc-text-interactive);
  font-size: 16px;
  font-weight: 500;
  transition: background 0.1s, color 0.1s;
}
.dc-sidebar-utility-item:hover, .dc-sidebar-utility-item.dp-hovered {
  background: var(--dc-bg-overlay-subtle);
  color: var(--dc-text-subtle);
}
.dc-sidebar-utility-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── User Panel ───────────────────────────────────── */
.dc-user-panel {
  height: var(--dc-user-panel-height);
  background: var(--dc-bg-user-panel);
  display: flex;
  align-items: center;
  padding: 0 8px;
  flex-shrink: 0;
}
.dc-user-panel-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 4px;
  border-radius: var(--dc-radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.dc-user-panel-info:hover, .dc-user-panel-info.dp-hovered {
  background: var(--dc-bg-overlay-subtle);
}
.dc-user-panel-avatar {
  position: relative;
  width: var(--dc-avatar-sm);
  height: var(--dc-avatar-sm);
  flex-shrink: 0;
}
.dc-user-panel-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--dc-blurple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}
.dc-user-panel-avatar-img img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.dc-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 3px solid var(--dc-bg-user-panel);
  box-sizing: content-box;
}
.dc-status-dot.dc-online  { background: var(--dc-status-online); }
.dc-status-dot.dc-idle    { background: var(--dc-status-idle); }
.dc-status-dot.dc-dnd     { background: var(--dc-status-dnd); }
.dc-status-dot.dc-offline { background: var(--dc-status-offline); }

.dc-user-panel-text {
  min-width: 0;
  flex: 1;
}
.dc-user-panel-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--dc-text-default);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 18px;
}
.dc-user-panel-status {
  font-size: 12px;
  color: var(--dc-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 13px;
}
.dc-user-panel-buttons {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.dc-user-panel-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--dc-radius-sm);
  cursor: pointer;
  color: var(--dc-text-interactive);
  transition: background 0.15s, color 0.15s;
}
.dc-user-panel-btn:hover, .dc-user-panel-btn.dp-hovered {
  background: var(--dc-bg-overlay-normal);
  color: var(--dc-text-subtle);
}
.dc-user-panel-btn svg { width: 20px; height: 20px; }

/* ── Main Area ────────────────────────────────────── */
.dc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--dc-bg-chat);
}

/* ── Chat Header ──────────────────────────────────── */
.dc-chat-header {
  height: var(--dc-chat-header-height);
  min-height: var(--dc-chat-header-height);
  display: flex;
  align-items: center;
  padding: 0 8px 0 16px;
  box-shadow: 0 1px 0 var(--dc-border-subtle);
  flex-shrink: 0;
}
.dc-chat-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.dc-chat-header-icon {
  width: 24px;
  height: 24px;
  color: var(--dc-text-muted);
  flex-shrink: 0;
}
.dc-chat-header-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--dc-text-default);
  white-space: nowrap;
}
.dc-chat-header-divider {
  width: 1px;
  height: 24px;
  background: var(--dc-border-strong);
  margin: 0 8px;
  flex-shrink: 0;
}
.dc-chat-header-topic {
  font-size: 14px;
  color: var(--dc-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.dc-chat-header-toolbar {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  margin-left: auto;
}
.dc-toolbar-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dc-text-interactive);
  padding: 4px;
  margin: 0 2px;
  border-radius: var(--dc-radius-sm);
  transition: color 0.15s;
}
.dc-toolbar-btn:hover, .dc-toolbar-btn.dp-hovered {
  color: var(--dc-text-subtle);
}
.dc-toolbar-btn svg { width: 24px; height: 24px; }

.dc-toolbar-search {
  display: flex;
  align-items: center;
  background: var(--dc-bg-surface-high);
  border-radius: var(--dc-radius-sm);
  padding: 0 6px;
  height: 24px;
  margin: 0 2px;
  cursor: text;
}
.dc-toolbar-search-text {
  font-size: 14px;
  color: var(--dc-text-muted);
  padding: 0 4px;
  white-space: nowrap;
}
.dc-toolbar-search svg {
  width: 16px;
  height: 16px;
  color: var(--dc-text-muted);
}

/* ── Chat Content Area ────────────────────────────── */
.dc-chat-content {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.dc-message-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* ── Message List ─────────────────────────────────── */
.dc-message-list-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.dc-message-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px 16px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  scrollbar-width: thin;
  scrollbar-color: var(--dc-bg-surface-high) transparent;
}
.dc-message-list::-webkit-scrollbar { width: 8px; }
.dc-message-list::-webkit-scrollbar-track { background: transparent; }
.dc-message-list::-webkit-scrollbar-thumb { background: var(--dc-bg-surface-high); border-radius: 4px; }

/* Date separator */
.dc-date-separator {
  display: flex;
  align-items: center;
  margin: 16px 0 8px;
}
.dc-date-separator-line {
  flex: 1;
  height: 1px;
  background: var(--dc-border-subtle);
}
.dc-date-separator-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--dc-text-muted);
  padding: 0 8px;
  white-space: nowrap;
}

/* Message */
.dc-message {
  display: flex;
  padding: 2px 0;
  position: relative;
  margin-top: 0;
}
.dc-message:hover, .dc-message.dp-hovered {
  background: var(--dc-bg-overlay-subtle);
}
.dc-message.dc-message-group-start {
  margin-top: 16px;
}
.dc-message-avatar-col {
  width: 56px;
  min-width: 56px;
  display: flex;
  justify-content: center;
  padding-top: 2px;
}
.dc-message-avatar {
  width: var(--dc-avatar-size);
  height: var(--dc-avatar-size);
  border-radius: 50%;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}
.dc-message-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
}
.dc-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Timestamp shown for non-group-start messages on hover */
.dc-message-compact-time {
  display: none;
  font-size: 11px;
  color: var(--dc-text-faint);
  width: 56px;
  min-width: 56px;
  text-align: center;
  padding-top: 4px;
  cursor: default;
}
.dc-message:not(.dc-message-group-start) .dc-message-compact-time {
  display: none;
}
.dc-message:not(.dc-message-group-start):hover .dc-message-compact-time, .dc-message:not(.dc-message-group-start).dp-hovered .dc-message-compact-time {
  display: block;
}
.dc-message:not(.dc-message-group-start) .dc-message-avatar-col {
  display: flex;
}
.dc-message:not(.dc-message-group-start) .dc-message-avatar-col .dc-message-avatar {
  display: none;
}
.dc-message:not(.dc-message-group-start):hover .dc-message-avatar-col .dc-message-compact-time, .dc-message:not(.dc-message-group-start).dp-hovered .dc-message-avatar-col .dc-message-compact-time {
  display: block;
}

.dc-message-body {
  flex: 1;
  min-width: 0;
}
.dc-message-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 22px;
}
.dc-message:not(.dc-message-group-start) .dc-message-header {
  display: none;
}
.dc-message-username {
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}
.dc-message-username:hover, .dc-message-username.dp-hovered { text-decoration: underline; }
.dc-message-tag {
  background: var(--dc-blurple);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 0 4px;
  border-radius: 3px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  vertical-align: middle;
}
.dc-message-timestamp {
  font-size: 12px;
  color: var(--dc-text-faint);
  font-weight: 400;
}
.dc-message-content {
  font-size: 16px;
  line-height: 1.375;
  color: var(--dc-text-default);
  word-wrap: break-word;
  padding: 2px 0;
}
.dc-message-content a {
  color: var(--dc-text-link);
  text-decoration: none;
}
.dc-message-content a:hover, .dc-message-content a.dp-hovered { text-decoration: underline; }
.dc-message-content h1 { font-size: 24px; line-height: 1.375; font-weight: 700; margin: 12px 0 4px; color: var(--dc-text-default); }
.dc-message-content h2 { font-size: 20px; line-height: 1.375; font-weight: 700; margin: 12px 0 4px; color: var(--dc-text-default); }
.dc-message-content h3 { font-size: 16px; line-height: 1.375; font-weight: 700; margin: 12px 0 4px; color: var(--dc-text-default); }
.dc-message-content p { margin: 0; padding: 2px 0; }
.dc-message-content p + p { margin-top: 4px; }

/* Reactions */
.dc-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 4px;
}
.dc-reaction {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid var(--dc-border-subtle);
  background: var(--dc-bg-overlay-subtle);
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
}
.dc-reaction:hover, .dc-reaction.dp-hovered {
  border-color: var(--dc-border-strong);
  background: var(--dc-bg-overlay-normal);
}
.dc-reaction.dc-me {
  border-color: var(--dc-blurple);
  background: rgba(88, 101, 242, 0.15);
}
.dc-reaction-emoji { font-size: 16px; line-height: 1; }
.dc-reaction-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--dc-text-subtle);
}
.dc-reaction.dc-me .dc-reaction-count { color: var(--dc-blurple-light); }

/* Message hover action bar */
.dc-message-actions {
  position: absolute;
  top: -16px;
  right: 16px;
  display: none;
  background: var(--dc-bg-surface-high);
  border-radius: var(--dc-radius-sm);
  box-shadow: 0 0 0 1px var(--dc-border-subtle);
  overflow: hidden;
}
.dc-message:hover .dc-message-actions, .dc-message.dp-hovered .dc-message-actions { display: flex; }
.dc-message-action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dc-text-interactive);
  transition: background 0.1s, color 0.1s;
}
.dc-message-action-btn:hover, .dc-message-action-btn.dp-hovered {
  background: var(--dc-bg-overlay-normal);
  color: var(--dc-text-subtle);
}
.dc-message-action-btn svg { width: 20px; height: 20px; }

/* Typing indicator */
.dc-typing-indicator {
  height: 24px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--dc-text-muted);
  flex-shrink: 0;
}
.dc-typing-indicator:empty { height: 24px; }
.dc-typing-dots {
  display: flex;
  gap: 3px;
  align-items: center;
}
.dc-typing-dot {
  width: 6px;
  height: 6px;
  background: var(--dc-text-default);
  border-radius: 50%;
  animation: dc-typing-bounce 1.4s infinite ease-in-out both;
}
.dc-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.dc-typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes dc-typing-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── Message Input ────────────────────────────────── */
.dc-message-input-wrapper {
  padding: 0 16px 16px;
  flex-shrink: 0;
}
.dc-message-input {
  display: flex;
  align-items: flex-end;
  background: var(--dc-bg-input);
  border-radius: var(--dc-radius-md);
  padding: 2px 4px;
}
.dc-input-attach {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dc-text-interactive);
  flex-shrink: 0;
  border-radius: var(--dc-radius-sm);
  transition: color 0.15s;
}
.dc-input-attach:hover, .dc-input-attach.dp-hovered { color: var(--dc-text-subtle); }
.dc-input-attach svg { width: 24px; height: 24px; }

.dc-input-textarea {
  flex: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  position: relative;
}
.dc-input-textarea-el {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--dc-text-default);
  font-family: var(--dc-font);
  font-size: 16px;
  line-height: 22px;
  padding: 11px 0;
  max-height: 200px;
}
.dc-input-textarea-el::placeholder {
  color: var(--dc-text-interactive);
}
.dc-input-buttons {
  display: flex;
  align-items: center;
  padding: 10px 4px;
  gap: 2px;
  flex-shrink: 0;
}
.dc-input-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dc-text-interactive);
  border-radius: var(--dc-radius-sm);
  transition: color 0.15s;
  flex-shrink: 0;
}
.dc-input-btn:hover, .dc-input-btn.dp-hovered { color: var(--dc-text-subtle); }
.dc-input-btn svg { width: 24px; height: 24px; }

/* ── Member List (right sidebar) ──────────────────── */
.dc-member-list {
  width: var(--dc-member-list-width);
  min-width: var(--dc-member-list-width);
  background: var(--dc-bg-sidebar);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0 0 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--dc-bg-surface-high) transparent;
}
.dc-member-list::-webkit-scrollbar { width: 8px; }
.dc-member-list::-webkit-scrollbar-track { background: transparent; }
.dc-member-list::-webkit-scrollbar-thumb { background: var(--dc-bg-surface-high); border-radius: 4px; }
.dc-member-list.dc-hidden { display: none; }

.dc-member-group-header {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--dc-text-muted);
  padding: 16px 8px 4px;
  letter-spacing: 0.02em;
}
.dc-member-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 1px 0;
  cursor: pointer;
}
.dc-member-item-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border-radius: var(--dc-radius-sm);
  transition: background 0.1s;
}
.dc-member-item:hover .dc-member-item-inner, .dc-member-item.dp-hovered .dc-member-item-inner {
  background: var(--dc-bg-overlay-subtle);
}
.dc-member-avatar {
  position: relative;
  width: var(--dc-avatar-sm);
  height: var(--dc-avatar-sm);
  flex-shrink: 0;
}
.dc-member-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: #fff;
}
.dc-member-avatar-img img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.dc-member-avatar .dc-status-dot {
  border-color: var(--dc-bg-sidebar);
  width: 8px;
  height: 8px;
}
.dc-member-info {
  min-width: 0;
  flex: 1;
}
.dc-member-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--dc-text-subtle);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 20px;
}
.dc-member-custom-status {
  font-size: 12px;
  color: var(--dc-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 16px;
}
.dc-member-item.dc-offline .dc-member-avatar-img {
  opacity: 0.4;
}
.dc-member-item.dc-offline .dc-member-name {
  color: var(--dc-text-interactive);
}

/* ── Modal Dialog ─────────────────────────────────── */
.dc-modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.dc-modal-overlay.dc-modal-visible {
  opacity: 1;
}
.dc-modal-card {
  width: 440px;
  max-height: 80%;
  background: var(--dc-bg-surface-highest);
  border-radius: var(--dc-radius-md);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}
.dc-modal-visible .dc-modal-card {
  transform: scale(1);
}
.dc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 0;
}
.dc-modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--dc-text-default);
  margin: 0;
}
.dc-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dc-text-muted);
  border-radius: var(--dc-radius-sm);
  padding: 0;
  transition: color 0.15s;
}
.dc-modal-close:hover, .dc-modal-close.dp-hovered { color: var(--dc-text-default); }

.dc-modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}
.dc-modal-field {
  margin-bottom: 16px;
}
.dc-modal-field:last-child { margin-bottom: 0; }
.dc-modal-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--dc-text-subtle);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.dc-modal-required {
  color: var(--dc-red);
}
.dc-modal-input,
.dc-modal-textarea {
  width: 100%;
  background: var(--dc-bg-guild-bar);
  border: none;
  border-radius: var(--dc-radius-sm);
  padding: 10px 12px;
  color: var(--dc-text-default);
  font-family: var(--dc-font);
  font-size: 16px;
  line-height: 1.375;
  outline: none;
  box-sizing: border-box;
  transition: box-shadow 0.15s;
}
.dc-modal-input::placeholder,
.dc-modal-textarea::placeholder {
  color: var(--dc-text-interactive);
}
.dc-modal-input:focus,
.dc-modal-textarea:focus {
  box-shadow: 0 0 0 2px var(--dc-blurple);
}
.dc-modal-textarea {
  resize: none;
  min-height: 100px;
}

/* ── Modal file upload zone ───────────────────────── */
.dc-modal-file-zone {
  width: 100%;
  background: var(--dc-bg-guild-bar);
  border: 2px dashed var(--dc-border-subtle, #3f4147);
  border-radius: var(--dc-radius-sm);
  padding: 18px 16px;
  color: var(--dc-text-subtle);
  font-family: var(--dc-font);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}
.dc-modal-file-zone:hover,
.dc-modal-file-zone.dp-hovered {
  border-color: var(--dc-blurple);
  background: var(--dc-bg-overlay-subtle, rgba(88, 101, 242, 0.08));
}
.dc-modal-file-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--dc-text-interactive);
}
.dc-modal-file-zone-has-file .dc-modal-file-prompt {
  display: none;
}
.dc-modal-file-prompt-primary {
  font-size: 14px;
  font-weight: 500;
  color: var(--dc-text-default);
}
.dc-modal-file-prompt-secondary {
  font-size: 12px;
  color: var(--dc-text-subtle);
}
.dc-modal-file-chip-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dc-modal-file-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--dc-bg-surface-high);
  border-radius: var(--dc-radius-sm);
  padding: 8px 12px;
  font-size: 14px;
  color: var(--dc-text-default);
  text-align: left;
}
.dc-modal-file-chip-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.dc-modal-file-chip-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.dc-modal-file-chip-size {
  color: var(--dc-text-subtle);
  font-size: 13px;
  flex-shrink: 0;
}

.dc-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px;
  background: var(--dc-bg-surface-high);
  border-radius: 0 0 var(--dc-radius-md) var(--dc-radius-md);
}
.dc-modal-btn {
  padding: 8px 16px;
  border-radius: var(--dc-radius-sm);
  font-family: var(--dc-font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.15s, opacity 0.15s;
  line-height: 1;
}
.dc-modal-btn-cancel {
  background: transparent;
  color: var(--dc-text-default);
  padding: 8px 12px;
}
.dc-modal-btn-cancel:hover, .dc-modal-btn-cancel.dp-hovered { text-decoration: underline; }
.dc-modal-btn-submit {
  background: var(--dc-blurple);
  color: #fff;
}
.dc-modal-btn-submit:hover, .dc-modal-btn-submit.dp-hovered { background: var(--dc-blurple-hover); }

/* ── Bot message accent ───────────────────────────── */
.dc-message-bot-tag {
  background: var(--dc-blurple);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Slash command styling ────────────────────────── */
.dc-slash-command {
  background: var(--dc-bg-overlay-subtle);
  color: var(--dc-text-link);
  padding: 0 2px;
  border-radius: 3px;
  font-size: 16px;
}

/* ── Embed card ───────────────────────────────────── */
.dc-embed {
  margin-top: 4px;
  padding: 8px 16px 8px 12px;
  border-radius: var(--dc-radius-sm);
  background: var(--dc-bg-surface-high);
  border-left: 4px solid var(--dc-blurple);
  max-width: 520px;
}
.dc-embed-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dc-text-link);
  margin-bottom: 4px;
}
.dc-embed-field {
  margin-bottom: 4px;
}
.dc-embed-field-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--dc-text-default);
}
.dc-embed-field-value {
  font-size: 14px;
  color: var(--dc-text-subtle);
}

/* ── Ephemeral Messages ───────────────────────────── */
.dc-message-ephemeral {
  background: rgba(88, 101, 242, 0.05);
  border-left: 2px solid var(--dc-blurple);
  margin-left: -2px;
}
.dc-message-ephemeral:hover, .dc-message-ephemeral.dp-hovered {
  background: rgba(88, 101, 242, 0.08);
}
.dc-ephemeral-footer {
  font-size: 12px;
  color: var(--dc-text-muted);
  margin-top: 4px;
}
.dc-ephemeral-dismiss {
  color: var(--dc-text-link);
  cursor: pointer;
}
.dc-ephemeral-dismiss:hover, .dc-ephemeral-dismiss.dp-hovered {
  text-decoration: underline;
}

/* ── Loading spinner ──────────────────────────────── */
.dc-spinner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dc-text-muted);
  font-size: 14px;
}
.dc-spinner-dots {
  display: inline-flex;
  gap: 4px;
}
.dc-spinner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dc-blurple);
  animation: dc-spinner-pulse 1.4s infinite ease-in-out both;
}
.dc-spinner-dot:nth-child(1) { animation-delay: -0.32s; }
.dc-spinner-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes dc-spinner-pulse {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── DM channel item (sidebar) ────────────────────── */
.dc-channel-dm-avatar {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin-right: 8px;
  flex-shrink: 0;
}
.dc-channel-item-dm .dc-channel-item-inner {
  padding-left: 4px;
}

/* ── DM chat header ───────────────────────────────── */
.dc-chat-header-icon.dc-chat-header-dm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dc-chat-header-dm-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

/* ── File attachment card (in messages) ───────────── */
.dc-attachment {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  padding: 10px 14px 10px 12px;
  background: var(--dc-bg-surface-high);
  border: 1px solid var(--dc-border-subtle);
  border-radius: var(--dc-radius-md);
  max-width: 432px;
}
.dc-attachment-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dc-bg-surface-higher);
  border-radius: var(--dc-radius-sm);
  color: var(--dc-text-link);
}
.dc-attachment-icon svg { width: 22px; height: 22px; }
.dc-attachment-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dc-attachment-name {
  color: var(--dc-text-link);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dc-attachment-size {
  color: var(--dc-text-muted);
  font-size: 12px;
}

/* ── Bot action buttons (e.g. "Upload Files") ─────── */
.dc-action-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.dc-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--dc-radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  border: none;
  font-family: inherit;
}
.dc-action-btn-primary {
  background: var(--dc-blurple);
  color: #fff;
}
.dc-action-btn-secondary {
  background: var(--dc-bg-surface-higher);
  color: var(--dc-text-default);
}
.dc-action-btn svg { width: 18px; height: 18px; }

/* ── Role badge (in messages) ─────────────────────── */
.dc-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  margin-left: 6px;
  vertical-align: middle;
}
.dc-role-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ── Message button components (Discord row of action buttons) ── */
.dc-message-components {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.dc-message-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dc-message-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  border: none;
  border-radius: 3px;
  font-family: var(--dc-font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: #fff;
  transition: background-color 0.15s ease;
}
.dc-message-button-primary    { background: var(--dc-blurple); }
.dc-message-button-primary:hover, .dc-message-button-primary.dp-hovered { background: var(--dc-blurple-hover); }
.dc-message-button-success    { background: #248046; }
.dc-message-button-success:hover, .dc-message-button-success.dp-hovered { background: #1a6334; }
.dc-message-button-danger     { background: #da373c; }
.dc-message-button-secondary  { background: #4e5058; color: var(--dc-text-default); }
.dc-message-button-secondary:hover, .dc-message-button-secondary.dp-hovered { background: #6d6f78; }
.dc-message-button-link       { background: transparent; color: var(--dc-text-link); text-decoration: underline; }

/* ── Slash command autocomplete popup ────────────── */
.dc-message-area {
  position: relative;
}
.dc-slash-autocomplete {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 72px; /* above the message input */
  background: #1f2023;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.35);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  padding: 8px 0;
  max-height: 300px;
  overflow: hidden;
  display: none;
  flex-direction: column;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 10;
}
.dc-slash-autocomplete-visible {
  opacity: 1;
  transform: translateY(0);
}
.dc-slash-autocomplete-header {
  padding: 6px 16px 8px;
  border-bottom: 1px solid rgba(148,149,159,0.12);
}
.dc-slash-autocomplete-header-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--dc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dc-slash-autocomplete-header-query {
  color: var(--dc-text-default);
  text-transform: none;
  letter-spacing: 0;
}
.dc-slash-autocomplete-list {
  overflow-y: auto;
  padding: 4px 0;
}
.dc-slash-autocomplete-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  cursor: pointer;
}
.dc-slash-autocomplete-selected {
  background: var(--dc-bg-overlay-strong);
}
.dc-slash-autocomplete-app-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
}
.dc-slash-autocomplete-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dc-slash-autocomplete-top {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.dc-slash-autocomplete-command {
  font-size: 15px;
  font-weight: 600;
  color: var(--dc-text-default);
  flex-shrink: 0;
}
.dc-slash-autocomplete-desc {
  font-size: 13px;
  color: var(--dc-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dc-slash-autocomplete-bottom {
  font-size: 12px;
  color: var(--dc-text-faint);
}
.dc-slash-autocomplete-app-name {
  font-weight: 500;
}

/* ── Server dropdown menu (opens below sidebar server header) ── */
.dc-server-dropdown {
  position: absolute;
  left: calc(8px); /* aligns with sidebar left edge w/ small gap */
  top: 56px; /* below the server header (~48px) */
  width: 224px;
  background: #111214;
  border-radius: 6px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.5);
  padding: 6px 8px;
  display: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 20;
}
.dc-server-dropdown-visible {
  opacity: 1;
  transform: translateY(0);
}
.dc-server-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dc-text-subtle);
  cursor: pointer;
  line-height: 1.3;
}
.dc-server-dropdown-item:hover, .dc-server-dropdown-item.dp-hovered {
  background: var(--dc-blurple);
  color: #fff;
}
.dc-server-dropdown-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dc-server-dropdown-icon {
  display: flex;
  align-items: center;
  color: currentColor;
  opacity: 0.85;
  margin-left: 8px;
  flex-shrink: 0;
}
.dc-server-dropdown-icon svg { width: 18px; height: 18px; }
.dc-server-dropdown-danger {
  color: #f38688;
}
.dc-server-dropdown-danger:hover, .dc-server-dropdown-danger.dp-hovered {
  background: #da373c;
  color: #fff;
}
.dc-server-dropdown-divider {
  height: 1px;
  background: rgba(148,149,159,0.16);
  margin: 4px 0;
}

/* ── Settings modal (full-screen overlay) ────────── */
.dc-settings-modal-overlay {
  position: absolute;
  inset: 0;
  background: var(--dc-bg-chat);
  display: none;
  z-index: 30;
  opacity: 0;
  transition: opacity 200ms ease;
}
.dc-settings-modal-visible {
  opacity: 1;
}
.dc-settings-sidebar {
  width: 218px;
  background: var(--dc-bg-sidebar);
  flex-shrink: 0;
  overflow-y: auto;
  padding: 60px 6px 60px 0;
  display: flex;
  justify-content: flex-end;
}
.dc-settings-sidebar-inner {
  width: 190px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dc-settings-server-header {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--dc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.dc-settings-sidebar-group-title {
  padding: 6px 10px 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--dc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 8px;
}
.dc-settings-sidebar-spacer {
  height: 12px;
}
.dc-settings-sidebar-item {
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dc-text-muted);
  cursor: pointer;
  line-height: 1.3;
}
.dc-settings-sidebar-item:hover, .dc-settings-sidebar-item.dp-hovered {
  background: var(--dc-bg-overlay-normal);
  color: var(--dc-text-default);
}
.dc-settings-sidebar-active {
  background: var(--dc-bg-overlay-strong);
  color: var(--dc-text-default);
}
.dc-settings-sidebar-danger {
  color: #f38688;
}
.dc-settings-sidebar-danger:hover, .dc-settings-sidebar-danger.dp-hovered {
  background: rgba(218,55,60,0.12);
  color: #f38688;
}

.dc-settings-content-wrap {
  flex: 1;
  position: relative;
  display: flex;
  min-width: 0;
}
.dc-settings-content {
  flex: 1;
  max-width: 740px;
  padding: 60px 40px 60px 40px;
  overflow-y: auto;
  color: var(--dc-text-default);
}
.dc-settings-close {
  position: absolute;
  top: 40px;
  right: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--dc-text-muted);
}
.dc-settings-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--dc-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dc-settings-close-btn:hover, .dc-settings-close-btn.dp-hovered {
  border-color: var(--dc-text-default);
  color: var(--dc-text-default);
}
.dc-settings-close-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Panels */
.dc-settings-panel-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--dc-text-default);
}
.dc-settings-panel-subtitle {
  font-size: 14px;
  color: var(--dc-text-muted);
  margin: 0 0 20px;
  line-height: 1.4;
}

.dc-settings-field {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(148,149,159,0.08);
}
.dc-settings-field:last-child { border-bottom: none; }
.dc-settings-field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--dc-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.dc-settings-field-required {
  color: #f38688;
  margin-left: 2px;
}
.dc-settings-field-input {
  background: #1e1f22;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 3px;
  padding: 10px 12px;
  font-size: 15px;
  color: var(--dc-text-default);
  min-height: 20px;
}
.dc-settings-field-help {
  font-size: 13px;
  color: var(--dc-text-muted);
  margin: 2px 0 10px;
  line-height: 1.4;
}
.dc-settings-field-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}
.dc-settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: none;
  border-radius: 3px;
  font-family: var(--dc-font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: #fff;
}
.dc-settings-btn-primary {
  background: var(--dc-blurple);
}
.dc-settings-btn-primary:hover, .dc-settings-btn-primary.dp-hovered {
  background: var(--dc-blurple-hover);
}
.dc-settings-btn-link {
  background: transparent;
  color: #f38688;
  padding: 8px 6px;
}

/* Roles panel */
.dc-settings-default-perms {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--dc-bg-surface-high);
  border-radius: 6px;
  margin: 4px 0 20px;
  cursor: pointer;
  transition: background-color 120ms ease;
}
.dc-settings-default-perms:hover, .dc-settings-default-perms.dp-hovered {
  background: var(--dc-bg-surface-higher);
}
.dc-settings-default-perms-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(148,149,159,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dc-text-default);
  flex-shrink: 0;
}
.dc-settings-default-perms-body { flex: 1; min-width: 0; }
.dc-settings-default-perms-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--dc-text-default);
}
.dc-settings-default-perms-subtitle {
  font-size: 13px;
  color: var(--dc-text-muted);
  margin-top: 2px;
}
.dc-settings-default-perms-caret {
  color: var(--dc-text-muted);
}

.dc-settings-roles-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.dc-settings-search {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--dc-bg-input);
  border-radius: 3px;
  padding: 0 12px;
  height: 36px;
}
.dc-settings-search svg {
  color: var(--dc-text-muted);
  margin-right: 8px;
  flex-shrink: 0;
}
.dc-settings-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--dc-text-default);
  font-family: var(--dc-font);
  font-size: 14px;
}
.dc-settings-search-input::placeholder {
  color: var(--dc-text-muted);
}
.dc-settings-roles-help {
  font-size: 13px;
  color: var(--dc-text-muted);
  margin: 16px 0 8px;
  line-height: 1.4;
}
.dc-settings-roles-help-link {
  color: var(--dc-text-link);
  text-decoration: none;
}
.dc-settings-roles-table-header {
  display: flex;
  align-items: center;
  padding: 10px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--dc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(148,149,159,0.12);
}
.dc-settings-roles-col-name { flex: 1; }
.dc-settings-roles-col-members { width: 100px; text-align: left; }
.dc-settings-roles-list {
  display: flex;
  flex-direction: column;
}
.dc-settings-role-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(148,149,159,0.08);
  cursor: pointer;
}
.dc-settings-role-row:hover, .dc-settings-role-row.dp-hovered {
  background: var(--dc-bg-overlay-subtle);
}
.dc-settings-role-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dc-settings-role-name {
  flex: 1;
  font-size: 15px;
  color: var(--dc-text-default);
}
.dc-settings-role-members {
  width: 100px;
  font-size: 14px;
  color: var(--dc-text-subtle);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dc-settings-role-members-icon {
  display: inline-flex;
  color: var(--dc-text-muted);
}
.dc-settings-role-members-icon svg { width: 14px; height: 14px; }

/* Edit role panel */
.dc-settings-edit-role-breadcrumb {
  margin-bottom: 8px;
}
.dc-settings-edit-role-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--dc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.dc-settings-edit-role-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid rgba(148,149,159,0.16);
  margin: 16px 0 20px;
}
.dc-settings-edit-role-tab {
  padding: 8px 0;
  margin-bottom: -1px;
  font-size: 15px;
  font-weight: 500;
  color: var(--dc-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.dc-settings-edit-role-tab:hover, .dc-settings-edit-role-tab.dp-hovered {
  color: var(--dc-text-default);
}
.dc-settings-edit-role-tab-active {
  color: var(--dc-text-link);
  border-bottom-color: var(--dc-text-link);
}
.dc-settings-edit-role-tab-content {
  min-height: 200px;
}

.dc-settings-color-swatches {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  max-width: 440px;
}
.dc-settings-color-swatch {
  aspect-ratio: 1;
  border-radius: 4px;
  cursor: pointer;
}

/* Permissions list */
.dc-settings-perms-search {
  margin-bottom: 20px;
}
.dc-settings-perms-list {
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}
.dc-settings-perms-list::-webkit-scrollbar { width: 8px; }
.dc-settings-perms-list::-webkit-scrollbar-thumb { background: var(--dc-bg-surface-highest); border-radius: 4px; }
.dc-settings-perms-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 0 8px;
  border-bottom: 1px solid rgba(148,149,159,0.12);
  margin-bottom: 4px;
}
.dc-settings-perms-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dc-text-default);
}
.dc-settings-perms-section-clear {
  font-size: 13px;
  color: var(--dc-text-link);
  cursor: pointer;
}
.dc-settings-perm-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(148,149,159,0.08);
}
.dc-settings-perm-body { flex: 1; min-width: 0; }
.dc-settings-perm-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--dc-text-default);
  margin-bottom: 2px;
}
.dc-settings-perm-desc {
  font-size: 13px;
  color: var(--dc-text-muted);
  line-height: 1.4;
}

.dc-settings-toggle {
  position: relative;
  width: 42px;
  height: 24px;
  background: #80848e;
  border-radius: 12px;
  flex-shrink: 0;
  margin-top: 2px;
  transition: background-color 160ms ease;
  cursor: pointer;
}
.dc-settings-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: left 160ms ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}
.dc-settings-toggle-on {
  background: #23a559;
}
.dc-settings-toggle-on .dc-settings-toggle-knob {
  left: 21px;
}

.dc-settings-empty {
  padding: 40px 12px;
  text-align: center;
  color: var(--dc-text-muted);
  font-size: 14px;
}