:root {
  --bg-primary: #313338;
  --bg-secondary: #2b2d31;
  --bg-tertiary: #1e1f22;
  --bg-user-bar: #232428;
  --bg-hover: #35373c;
  --bg-active: #404249;
  --bg-input: #383a40;
  --text-normal: #dbdee1;
  --text-muted: #949ba4;
  --text-header: #f2f3f5;
  --brand: #5865f2;
  --brand-hover: #4752c4;
  --green: #23a55a;
  --red: #f23f43;
  --yellow: #f1c40f;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #1a1b1e transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #1a1b1e;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #111214;
}

body {
  font-family: var(--font);
  background-color: var(--bg-tertiary);
  color: var(--text-normal);
  height: 100vh;
  overflow: hidden;
  user-select: none;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.hidden {
  display: none !important;
}

.modal-backdrop.hidden {
  display: none !important;
}

.voice-connection-panel.hidden {
  display: none !important;
}

.modal {
  background: var(--bg-primary);
  width: 100%;
  max-width: 440px;
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.auth-header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-header h2 {
  color: var(--text-header);
  font-size: 22px;
  margin-bottom: 6px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.auth-tabs {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: 6px;
  padding: 4px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  padding: 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--brand);
  color: #fff;
}

.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.input-group label .req {
  color: var(--red);
}

.input-group input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 10px 12px;
  color: var(--text-header);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.input-group input:focus {
  border-color: var(--brand);
}

.error-msg {
  color: var(--red);
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
}

.btn {
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text-normal);
}

.btn-secondary:hover {
  text-decoration: underline;
}

.full-width {
  width: 100%;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Radio Cards */
.channel-type-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.radio-label input {
  display: none;
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
  padding: 12px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}

.radio-label input:checked + .radio-card {
  border-color: var(--brand);
  background: var(--bg-hover);
}

.type-icon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-card small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
}

/* App Layout */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* 1. SERVERS RAIL */
.servers-rail {
  width: 72px;
  background: var(--bg-tertiary);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  flex-shrink: 0;
}

.server-item {
  position: relative;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pill {
  position: absolute;
  left: 0;
  width: 4px;
  height: 0;
  background: #fff;
  border-radius: 0 4px 4px 0;
  transition: height 0.15s ease-out;
}

.server-item:hover .pill {
  height: 20px;
}

.server-item.active .pill {
  height: 40px;
}

.server-icon-inner {
  width: 48px;
  height: 48px;
  background: var(--bg-primary);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--text-normal);
  transition: all 0.2s;
}

.server-item:hover .server-icon-inner,
.server-item.active .server-icon-inner {
  border-radius: 16px;
  background: var(--brand);
  color: #fff;
}

.add-server-btn .server-icon-inner {
  color: var(--green);
  font-size: 28px;
  font-weight: 300;
}

.add-server-btn:hover .server-icon-inner {
  background: var(--green);
  color: #fff;
}

.server-separator {
  width: 32px;
  height: 2px;
  background: var(--bg-hover);
  border-radius: 1px;
}

.servers-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 2. CHANNELS SIDEBAR */
.channels-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-top-left-radius: 8px;
}

.server-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.server-header h1 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-header);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.icon-btn:hover {
  color: var(--text-header);
}

.channels-scroller {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
}

.channel-category {
  margin-bottom: 16px;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  padding: 4px 8px;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 2px;
  transition: all 0.15s;
}

.channel-item:hover {
  background: var(--bg-hover);
  color: var(--text-normal);
}

.channel-item.active {
  background: var(--bg-active);
  color: var(--text-header);
  font-weight: 500;
}

.channel-hash {
  font-size: 18px;
  color: var(--text-muted);
  width: 20px;
  text-align: center;
}

.voice-connected-users {
  margin-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0;
}

.voice-user-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.voice-user-sub.speaking {
  color: var(--green);
  font-weight: 600;
}

.voice-user-sub img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

/* Voice Connection Panel */
.voice-connection-panel {
  background: #111214;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.voice-conn-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.rtc-green {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.voice-details {
  display: flex;
  flex-direction: column;
}

.conn-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
}

.conn-channel {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-disconnect {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
}

.btn-disconnect:hover {
  background: rgba(242, 63, 67, 0.15);
}

/* User Footer */
.user-footer {
  height: 52px;
  background: var(--bg-user-bar);
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-user-bar);
}

.status-online {
  background: var(--green);
}

.status-offline {
  background: #747f8d;
}

.user-name-tag {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.display-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-header);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-tag {
  font-size: 11px;
  color: var(--text-muted);
}

.user-controls {
  display: flex;
  gap: 2px;
}

.control-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.control-btn:hover {
  background: var(--bg-hover);
  color: var(--text-normal);
}

.control-btn.muted {
  color: var(--red);
}

/* 3. CHAT AREA */
.chat-area {
  flex: 1;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.chat-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chan-icon {
  font-size: 22px;
  color: var(--text-muted);
}

.chat-header-title h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-header);
}

.header-divider {
  width: 1px;
  height: 16px;
  background: var(--bg-hover);
}

.chan-topic {
  font-size: 13px;
  color: var(--text-muted);
}

.chat-header-tools {
  display: flex;
  align-items: center;
}

.tool-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.tool-btn.active, .tool-btn:hover {
  color: var(--text-header);
}

/* Chat Body */
.chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.message-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.msg-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.msg-content {
  flex: 1;
}

.msg-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.msg-author {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-header);
}

.role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
}

.msg-time {
  font-size: 11px;
  color: var(--text-muted);
}

.msg-text {
  font-size: 14px;
  color: var(--text-normal);
  line-height: 1.4;
  word-break: break-word;
}

/* Message Input Form */
.message-input-form {
  padding: 0 16px 20px;
}

.message-input-wrapper {
  background: var(--bg-input);
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  height: 44px;
}

.message-input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-header);
  font-size: 14px;
}

.send-btn {
  background: none;
  border: none;
  color: var(--brand);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.send-btn:hover {
  color: var(--brand-hover);
}

/* Voice Room View */
.voice-room-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  align-items: center;
  background: #1a1b1e;
}

.voice-room-view.hidden {
  display: none !important;
}

.voice-room-header {
  text-align: center;
  margin-bottom: 24px;
}

.voice-room-header h2 {
  font-size: 22px;
  color: var(--text-header);
  margin-bottom: 4px;
}

.voice-room-header p {
  color: var(--text-muted);
  font-size: 13px;
}

.voice-participants-grid {
  flex: 1;
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-content: center;
}

.voice-card {
  background: var(--bg-secondary);
  border-radius: 12px;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 3px solid transparent;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.voice-card.speaking {
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(35, 165, 90, 0.4);
}

.voice-card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin-bottom: 12px;
}

.voice-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-header);
}

.voice-card-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: 50%;
  display: flex;
}

.voice-room-controls {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

.voice-ctl-btn {
  background: var(--bg-hover);
  border: none;
  color: var(--text-header);
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.voice-ctl-btn:hover {
  background: var(--bg-active);
}

.voice-ctl-btn.disconnect-btn {
  background: var(--red);
  color: #fff;
}

.voice-ctl-btn.disconnect-btn:hover {
  background: #d83a3e;
}

/* 4. MEMBERS SIDEBAR */
.members-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  flex-shrink: 0;
  overflow-y: auto;
  padding: 16px 8px;
}

.members-sidebar.hidden {
  display: none !important;
}

.member-role-group {
  margin-bottom: 16px;
}

.member-role-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  padding: 4px 8px;
}

.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.member-row:hover {
  background: var(--bg-hover);
}

.member-row.offline {
  opacity: 0.5;
}

.member-avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
}

.member-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-normal);
}

/* USER SETTINGS MODAL */
.settings-modal-box {
  max-width: 500px;
  padding: 24px;
}

.settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.settings-modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-header);
}

.settings-profile-card {
  background: var(--bg-tertiary);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-banner {
  height: 105px;
  background: linear-gradient(135deg, var(--brand), #805ad5);
  background-size: cover;
  background-position: center;
  position: relative;
}

.preview-banner-action-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(6px);
  transition: all 0.15s ease;
}

.preview-banner-action-btn:hover {
  background: rgba(0, 0, 0, 0.88);
  border-color: rgba(255, 255, 255, 0.4);
}

.settings-avatar-row {
  padding: 0 16px 16px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: -38px;
  position: relative;
  z-index: 2;
}

.settings-avatar-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  cursor: pointer;
  border: 6px solid var(--bg-tertiary);
  background: var(--bg-tertiary);
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-lg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 50%;
}

.settings-avatar-wrapper:hover .avatar-overlay {
  opacity: 1;
}

.settings-user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 4px;
}

.settings-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-header);
}

.success-msg {
  color: var(--green);
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
}

/* SETTINGS WINDOW (DISCORD STYLE) */
.settings-window {
  max-width: 960px;
  width: 94vw;
  height: 680px;
  max-height: 92vh;
  padding: 0;
  display: flex;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-nav-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.25);
}

.settings-nav-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  padding: 6px 12px;
  text-transform: uppercase;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 9px 12px;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  outline: none !important;
  box-shadow: none !important;
  transition: all 0.15s ease;
}

.settings-nav-item:focus,
.settings-nav-item:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.settings-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-normal);
}

.settings-nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 600;
}

.settings-nav-item svg {
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.settings-nav-item:hover svg,
.settings-nav-item.active svg {
  opacity: 1;
}

.settings-nav-item.danger {
  color: var(--red);
}

.settings-nav-item.danger:hover {
  background: rgba(242, 63, 67, 0.12);
  color: #ff5c5c;
}

.settings-nav-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 10px 6px;
}

/* Close ESC Pill */
.settings-close-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  user-select: none;
}

.settings-close-wrap:hover .settings-close-circle {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.settings-close-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b5bac1;
  transition: all 0.15s ease;
}

.settings-close-esc {
  font-size: 10px;
  font-weight: 700;
  color: #949ba4;
  letter-spacing: 0.5px;
}

.settings-content-area {
  flex: 1;
  padding: 28px 36px 36px;
  overflow-y: auto;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
}

.settings-tab-panel {
  display: flex;
  flex-direction: column;
}

.settings-status-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.settings-card-box {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.settings-section-title {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  display: block;
}

.settings-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
}

.settings-item-label strong {
  display: block;
  font-size: 13px;
  color: var(--text-header);
  font-weight: 600;
}

.settings-item-label span {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.settings-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-item-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 14px 0;
}

.settings-sub-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.btn-solid {
  background: #4e5058;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.15s ease;
}

.btn-solid:hover {
  background: #6d6f78;
}

.btn-icon-danger {
  background: rgba(242, 63, 67, 0.12);
  color: #f23f43;
  border: 1px solid rgba(242, 63, 67, 0.25);
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  transition: all 0.15s ease;
}

.btn-icon-danger:hover {
  background: #f23f43;
  color: #fff;
}

.banner-color-picker-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.banner-color-picker-wrap input[type="color"] {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 44px;
  height: 44px;
  border: none;
  cursor: pointer;
  background: none;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.35;
}

.settings-sticky-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ACCOUNT TAB HERO CARD */
.account-card-hero {
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.account-card-banner {
  height: 100px;
  background-color: var(--brand);
  background-size: cover;
  background-position: center;
}

.account-card-header {
  padding: 0 20px 16px;
  margin-top: -36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.account-avatar-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 6px solid var(--bg-secondary);
  background: var(--bg-secondary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.account-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.account-avatar-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--bg-secondary);
}

.account-user-meta {
  flex: 1;
  min-width: 160px;
  margin-bottom: 4px;
}

.account-meta-names {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.account-username-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-header);
}

.account-meta-sub {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-verified-pill {
  font-size: 11px;
  color: #23a55a;
  background: rgba(35, 165, 90, 0.12);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.btn-edit-profile-action {
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.account-card-details {
  background: var(--bg-tertiary);
  margin: 0 16px 16px;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-detail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-detail-info {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-val {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-header);
  margin-top: 2px;
}

.detail-val-code {
  font-size: 13px;
  color: var(--text-header);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  margin-top: 2px;
  display: inline-block;
}

.btn-solid-sm {
  background: #4e5058;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-solid-sm:hover {
  background: #6d6f78;
}

.detail-badge-pill {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 4px;
}

/* SLIDER CONTROL CARDS & PILLS */
.slider-control-card {
  background: var(--bg-tertiary);
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.slider-card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.slider-val-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
  background: rgba(88, 101, 242, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
}

/* TOGGLE CARD ITEM */
.toggle-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  margin: 0 -12px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.toggle-card-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* DISCORD RANGE SLIDERS */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #4e5058;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  margin: 8px 0;
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  background: #4e5058;
  border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  margin-top: -5px;
  transition: transform 0.12s ease, background 0.12s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.18);
  background: #f2f3f5;
}

input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.25);
  background: var(--brand);
}

input[type="range"]::-moz-range-track {
  width: 100%;
  height: 8px;
  background: #4e5058;
  border-radius: 4px;
  border: none;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.danger-box {
  border: 1px solid var(--red);
  background: rgba(242, 63, 67, 0.08);
  border-radius: 8px;
  padding: 20px;
}

.mic-meter-bar {
  width: 100%;
  height: 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  overflow: hidden;
}

.mic-meter-fill {
  height: 100%;
  background: var(--green);
  transition: width 0.08s ease-out;
  box-shadow: 0 0 8px var(--green);
}

/* Server Channel & Member Managers */
.srv-channels-manager-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.srv-chan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  padding: 10px 14px;
  border-radius: 6px;
}

.srv-chan-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.srv-chan-badge {
  font-size: 11px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-delete-chan {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.btn-delete-chan:hover {
  color: var(--red);
  background: rgba(242, 63, 67, 0.1);
}

.srv-members-manager-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.srv-member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  padding: 10px 14px;
  border-radius: 6px;
}

.srv-member-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.srv-member-role-select {
  background: var(--bg-tertiary);
  border: 1px solid transparent;
  color: var(--text-header);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.srv-member-role-select:focus {
  border-color: var(--brand);
}

/* PING TOOLTIP & INDICATOR */
.voice-conn-info {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.15s ease;
  user-select: none;
}

.voice-conn-info:hover {
  background: rgba(255, 255, 255, 0.06);
}

.voice-conn-info:hover .conn-title {
  text-decoration: underline;
}

.status-indicator-wrap {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.ping-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  background: #111214;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ping-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 12px;
  border-width: 6px;
  border-style: solid;
  border-color: #111214 transparent transparent transparent;
}

.voice-conn-info:hover .ping-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.ping-tooltip-header {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ping-indicator-circle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #23a55a;
  box-shadow: 0 0 6px rgba(35, 165, 90, 0.8);
  display: inline-block;
}

.ping-tooltip-status {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.ping-tooltip-val {
  font-size: 11px;
  font-weight: 700;
  color: #23a55a;
  background: rgba(35, 165, 90, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

.ping-tooltip-footer {
  margin-top: 4px;
  font-size: 11px;
  color: #949ba4;
  font-weight: 500;
}

/* RTC STATUS MODAL */
.rtc-status-modal-box {
  width: 480px;
  max-width: 95vw;
  background: #2b2d31;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  padding: 0 !important;
}

.rtc-modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #1e1f22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rtc-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rtc-pulse-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(35, 165, 90, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rtc-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.rtc-modal-sub {
  font-size: 12px;
  color: #949ba4;
  margin-top: 2px;
  display: block;
}

.btn-close-rtc {
  background: none;
  border: none;
  color: #949ba4;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-close-rtc:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.rtc-modal-content {
  padding: 20px;
}

.rtc-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.rtc-metric-card {
  background: #1e1f22;
  border-radius: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.rtc-card-label {
  font-size: 11px;
  font-weight: 700;
  color: #949ba4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 6px;
}

.rtc-val-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 6px;
}

.rtc-big-val {
  font-size: 34px;
  font-weight: 800;
  color: #23a55a;
  line-height: 1;
}

.rtc-unit {
  font-size: 14px;
  font-weight: 600;
  color: #949ba4;
}

.rtc-quality-badge {
  font-size: 11px;
  font-weight: 700;
  color: #23a55a;
  background: rgba(35, 165, 90, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
}

.rtc-sub-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.rtc-sub-metric:last-child {
  border-bottom: none;
}

.rtc-sub-metric .rtc-card-label {
  margin-bottom: 0;
  font-size: 10.5px;
}

.rtc-mid-val {
  font-size: 12.5px;
  font-weight: 700;
  color: #dbdee1;
}

.rtc-mid-val.text-green {
  color: #23a55a;
}

.rtc-graph-box {
  background: #1e1f22;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.rtc-graph-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rtc-graph-title {
  font-size: 11px;
  font-weight: 700;
  color: #949ba4;
  letter-spacing: 0.5px;
}

.rtc-graph-legend {
  font-size: 11px;
  font-weight: 600;
  color: #23a55a;
}

.rtc-canvas-wrap {
  margin-top: 10px;
  background: #111214;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

#rtc-ping-canvas {
  width: 100%;
  height: 120px;
  display: block;
}

.rtc-info-table {
  background: #1e1f22;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.rtc-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}

.rtc-row-label {
  color: #949ba4;
}

.rtc-row-val {
  color: #dbdee1;
  font-weight: 500;
}

.rtc-code {
  background: #111214;
  color: #5865F2;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11.5px;
}

.rtc-tag-loc {
  font-size: 11px;
  color: #949ba4;
  margin-left: 4px;
}

/* SETTINGS SELECT & SWITCHES */
.settings-select {
  width: 100%;
  background: #1e1f22 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23949ba4'%3E%3Cpath d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  padding: 10px 36px 10px 14px;
  color: var(--text-header);
  font-size: 13.5px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.settings-select:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.settings-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.25);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toggle-text strong {
  color: var(--text-header);
  font-size: 14px;
  display: block;
}

.toggle-text p {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #80848e;
  transition: .2s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--green) !important;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.radio-chip {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1e1f22;
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-normal);
  transition: all 0.15s ease;
}

.radio-chip:hover {
  background: #2b2d31;
  border-color: rgba(255, 255, 255, 0.14);
}

.radio-chip:has(input:checked) {
  background: rgba(88, 101, 242, 0.12);
  border-color: var(--brand);
  color: #ffffff;
}

.radio-chip input {
  accent-color: var(--brand);
}

/* ============================================================
   DISCORD MINI PROFILE POPOVER CARD
   ============================================================ */
.mini-profile-card {
  position: fixed;
  bottom: 64px;
  left: 80px;
  width: 320px;
  background: #232428;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  z-index: 2500;
  animation: popIn 0.16s cubic-bezier(0.18, 0.89, 0.32, 1.25);
  user-select: none;
}

.mini-profile-banner {
  height: 105px;
  background-color: #5865f2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.mini-profile-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
}

.mini-profile-avatar-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 16px;
  margin-top: -38px;
  position: relative;
  z-index: 2;
}

.mini-profile-avatar-wrap {
  position: relative;
  width: 76px;
  height: 76px;
}

.mini-profile-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 5px solid #232428;
  object-fit: cover;
  background: #1e1f22;
  display: block;
}

.mini-profile-status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3.5px solid #232428;
}

.mini-profile-bubble-wrap {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  margin-left: 12px;
  margin-bottom: 6px;
  min-width: 0;
}

.mini-profile-bubble {
  background: #111214;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: #dbdee1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-profile-bubble .bubble-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-profile-body {
  padding: 12px 16px 16px;
  background: #232428;
}

.mini-profile-name-row {
  margin-bottom: 12px;
}

.mini-profile-display-name {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.mini-profile-handle-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.mini-profile-handle {
  font-size: 13px;
  color: #949ba4;
  font-weight: 500;
}

.mini-profile-badge-nova {
  background: rgba(147, 51, 234, 0.18);
  color: #c084fc;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.mini-profile-badge-owner {
  font-size: 13px;
}

.mp-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #949ba4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 5px;
}

.mini-profile-roles-section {
  margin-bottom: 12px;
}

.mini-profile-bio-section {
  margin-bottom: 12px;
}

.mini-profile-bio-text {
  font-size: 12.5px;
  color: #dbdee1;
  line-height: 1.45;
  white-space: pre-line;
  background: #1e1f22;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  max-height: 120px;
  overflow-y: auto;
}

.mini-profile-activity-box {
  background: #1e1f22;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.mp-activity-header {
  font-size: 10.5px;
  font-weight: 700;
  color: #949ba4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: block;
}

.mp-activity-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-game-icon {
  width: 36px;
  height: 36px;
  background: #2b2d31;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5865F2;
  flex-shrink: 0;
}

.mp-game-details strong {
  font-size: 13px;
  color: #fff;
  display: block;
  line-height: 1.2;
}

.mp-game-time {
  font-size: 11.5px;
  color: #23a55a;
  font-weight: 500;
  margin-top: 2px;
  display: block;
}

.mini-profile-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp-action-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: #1e1f22;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 9px 12px;
  color: #dbdee1;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.mp-action-btn:hover {
  background: #35373c;
  color: #fff;
}

.mp-status-dropdown-wrap {
  position: relative;
}

.mp-action-btn.status-trigger {
  justify-content: space-between;
}

.mp-status-dropdown-wrap .chevron-right {
  font-size: 16px;
  color: #949ba4;
}

.mp-status-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #111214;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px;
  z-index: 2600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
}

.mp-status-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  color: #dbdee1;
  cursor: pointer;
  transition: background 0.12s;
}

.mp-status-opt:hover {
  background: #232428;
  color: #fff;
}

/* Status dots */
.status-dot.status-idle {
  background-color: #f0b232;
}

.status-dot.status-dnd {
  background-color: #f23f43;
}

/* CUSTOM BADGE (CLAN TAG / ROLE BADGE) */
.custom-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(147, 51, 234, 0.22);
  color: #c084fc;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1.5px 6.5px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.3px;
  line-height: 1.25;
  border: 1px solid rgba(192, 132, 252, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* MINI PROFILE BANNER EDIT BUTTON */
.mp-banner-edit-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  z-index: 3;
  backdrop-filter: blur(4px);
}

.mini-profile-banner:hover .mp-banner-edit-btn {
  opacity: 1;
}

.mp-banner-edit-btn:hover {
  background: rgba(0, 0, 0, 0.88);
}

/* ==========================================
   APP WALLPAPER & TRANSLUCENT GLASS THEME
   ========================================== */
.app-wallpaper-preview-box {
  position: relative;
  height: 125px;
  border-radius: 8px;
  background-color: #1e1f22;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  transition: background-image 0.25s ease-in-out;
}

.wallpaper-preview-overlay {
  width: 86%;
  height: 78%;
  background: rgba(20, 21, 24, 0.65);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mockup-header-bar {
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mockup-body-row {
  flex: 1;
  display: flex;
}

.mockup-sidebar {
  width: 34px;
  background: rgba(0, 0, 0, 0.22);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.mockup-chat {
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mockup-msg-line {
  height: 6px;
  width: 72%;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 3px;
}

.mockup-msg-line.short {
  width: 44%;
  background: rgba(255, 255, 255, 0.12);
}

.mockup-members {
  width: 28px;
  background: rgba(0, 0, 0, 0.18);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-badge-label {
  position: absolute;
  bottom: 6px;
  right: 10px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.65);
  padding: 2px 7px;
  border-radius: 4px;
}

.wallpaper-presets-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.wp-preset-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  border: 2px solid transparent;
  transition: all 0.18s ease;
}

.wp-preset-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.wp-preset-card.active {
  border-color: var(--brand);
  background: rgba(88, 101, 242, 0.15);
}

.wp-preset-thumb {
  width: 100%;
  height: 48px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wp-preset-thumb.dark-default {
  background: #1e1f22;
}

.wp-preset-card span {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.wp-preset-card.active span {
  color: var(--text-header);
  font-weight: 600;
}

/* LIVE APP WALLPAPER WITH FROSTED GLASS PANELS */
body.has-custom-wallpaper {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  background-color: #1e1f22 !important;
}

body.has-custom-wallpaper .app-layout {
  background: rgba(14, 15, 17, 0.40) !important;
  backdrop-filter: blur(var(--custom-wallpaper-blur, 0px));
  -webkit-backdrop-filter: blur(var(--custom-wallpaper-blur, 0px));
}

body.has-custom-wallpaper .servers-rail {
  background: rgba(20, 21, 24, 0.72) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

body.has-custom-wallpaper .channels-sidebar {
  background: rgba(35, 36, 40, var(--custom-panel-opacity, 0.70)) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

body.has-custom-wallpaper .chat-area {
  background: rgba(40, 42, 47, var(--custom-panel-opacity, 0.65)) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.has-custom-wallpaper .chat-header {
  background: rgba(35, 36, 40, 0.78) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.has-custom-wallpaper .server-header {
  background: rgba(30, 31, 35, 0.80) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.has-custom-wallpaper .members-sidebar {
  background: rgba(35, 36, 40, var(--custom-panel-opacity, 0.70)) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

body.has-custom-wallpaper .user-footer {
  background: rgba(24, 25, 28, 0.85) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.has-custom-wallpaper .voice-connection-panel {
  background: rgba(24, 25, 28, 0.88) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.has-custom-wallpaper .message-input-wrapper {
  background: rgba(45, 47, 53, 0.82) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.has-custom-wallpaper .message-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

body.has-custom-wallpaper .member-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

body.has-custom-wallpaper .channel-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

body.has-custom-wallpaper .channel-item.active {
  background: rgba(255, 255, 255, 0.12);
}
