:root {
  --bg-main: #0b0d13;
  --bg-sidebar: #0e111a;
  --bg-panel: #141722;
  --bg-card: #1a1e2d;
  --bg-card-hover: #22273a;
  --bg-input: #10131d;
  --border-subtle: #232738;
  --border-active: #3a415a;
  --text-primary: #f0f3f8;
  --text-secondary: #9aa2b4;
  --text-muted: #676e82;
  --accent-blurple: #5865f2;
  --accent-blurple-hover: #4752c4;
  --accent-green: #23a55a;
  --accent-green-bg: rgba(35, 165, 90, 0.15);
  --accent-yellow: #f0b232;
  --accent-red: #f23f43;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-stack);
  font-size: 14px;
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* Sidebar */
.sidebar {
  width: 250px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
  font-size: 22px;
  background: linear-gradient(135deg, #5865f2, #99aab5);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
}

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

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 16px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  width: 100%;
}

.nav-item:hover {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: rgba(88, 101, 242, 0.15);
  color: #fff;
  font-weight: 600;
}

.nav-icon {
  font-size: 16px;
}

.nav-label {
  flex: 1;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  background-color: var(--border-subtle);
  color: var(--text-secondary);
}

.glow-badge {
  background: linear-gradient(135deg, #5865f2, #7388da);
  color: #fff;
  font-size: 10px;
  box-shadow: 0 0 8px rgba(88, 101, 242, 0.5);
}

.nav-svg {
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.nav-item:hover .nav-svg {
  color: var(--text-primary);
}

.nav-item.active .nav-svg {
  color: #fff;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.user-avatar-initial {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5865f2, #3b45a0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.user-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-tag {
  font-size: 9.5px;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #5865f2;
}

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

.btn-logout:hover {
  background-color: rgba(242, 63, 67, 0.15);
  color: var(--accent-red);
}

.bot-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: var(--bg-panel);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pill-dot.online {
  background-color: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

.pill-dot.offline {
  background-color: var(--accent-red);
}

.backup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.backup-btn:hover {
  background-color: var(--bg-card-hover);
  color: #fff;
  border-color: var(--border-active);
}

/* Main Area */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Topbar */
.topbar {
  height: 56px;
  background-color: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 7px 14px;
  width: 480px;
  transition: border-color 0.15s ease;
}

.search-box:focus-within {
  border-color: var(--accent-blurple);
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.2);
}

.search-icon {
  font-size: 14px;
  opacity: 0.6;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 13.5px;
  width: 100%;
  outline: none;
}

.kbd-hint {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-pill {
  font-size: 12.5px;
  color: var(--text-secondary);
  background-color: var(--bg-card);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
}

.stat-pill strong {
  color: var(--accent-yellow);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.action-btn.primary {
  background-color: var(--accent-blurple);
  color: #fff;
}

.action-btn.primary:hover {
  background-color: var(--accent-blurple-hover);
}

.action-btn.large-btn {
  padding: 10px 20px;
  font-size: 14px;
}

/* Tab Panes */
.tab-pane {
  display: none;
  flex: 1;
  height: calc(100vh - 56px);
  overflow: hidden;
}

.tab-pane.active {
  display: flex;
}

/* 3-Pane Tickets Workspace */
.tickets-workspace {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Left Panel: Tickets List */
.ticket-list-panel {
  width: 330px;
  background-color: var(--bg-panel);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.filter-bar {
  padding: 12px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-chips {
  display: flex;
  gap: 6px;
}

.chip {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--border-active);
  color: #fff;
}

.chip.active {
  background-color: var(--accent-blurple);
  color: #fff;
  border-color: var(--accent-blurple);
}

.ticket-count-summary {
  font-size: 11.5px;
  color: var(--text-muted);
}

.tickets-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ticket-card {
  padding: 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ticket-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-active);
}

.ticket-card.selected {
  border-color: var(--accent-blurple);
  background-color: rgba(88, 101, 242, 0.12);
}

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

.ticket-card-title {
  font-weight: 600;
  font-size: 13.5px;
  color: #fff;
}

.type-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.type-pill.support {
  background-color: rgba(88, 101, 242, 0.2);
  color: #7983f5;
}

.type-pill.purchase {
  background-color: rgba(35, 165, 90, 0.2);
  color: #3ba55d;
}

.type-pill.media {
  background-color: rgba(240, 178, 50, 0.2);
  color: #faa61a;
}

.ticket-card-summary {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ticket-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Middle: Discord Transcript Viewer */
.ticket-transcript-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #313338; /* Genuine Discord dark theme */
  overflow: hidden;
  border-right: 1px solid var(--border-subtle);
}

.transcript-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
}

.placeholder-icon {
  font-size: 48px;
  opacity: 0.5;
}

.transcript-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.transcript-header {
  padding: 14px 20px;
  background-color: #2b2d31;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.ticket-header-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.ticket-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #949ba4;
  margin-top: 2px;
}

.text-link-btn {
  color: #00a8fc;
  font-size: 12px;
  text-decoration: none;
}

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

/* Discord Chat Log Styling */
.discord-chatlog {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.discord-msg {
  display: flex;
  gap: 16px;
  line-height: 1.375;
}

.msg-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #5865f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.msg-body {
  flex: 1;
  min-width: 0;
}

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

.msg-author {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}

.msg-author.homer {
  color: #faa61a;
}

.bot-tag {
  background-color: #5865f2;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
}

.msg-time {
  font-size: 11px;
  color: #949ba4;
}

.msg-text {
  color: #dbdee1;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-embed {
  margin-top: 8px;
  padding: 10px 14px;
  background-color: #2b2d31;
  border-left: 4px solid #5865f2;
  border-radius: 4px;
  max-width: 520px;
}

.embed-title {
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  margin-bottom: 4px;
}

.embed-desc {
  font-size: 12.5px;
  color: #dbdee1;
}

.msg-attachment {
  margin-top: 8px;
  padding: 8px 12px;
  background-color: #2b2d31;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.msg-attachment a {
  color: #00a8fc;
  text-decoration: none;
}

.msg-attachment a:hover {
  text-decoration: underline;
}

/* Right Panel: Homer AI Copilot Dock */
.copilot-dock {
  width: 380px;
  background-color: var(--bg-panel);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.dock-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.dock-title h3 {
  font-size: 14px;
  font-weight: 700;
}

.engine-tag {
  font-size: 11px;
  font-weight: 600;
  background-color: rgba(88, 101, 242, 0.15);
  color: var(--accent-blurple);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(88, 101, 242, 0.3);
}

.dock-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.copilot-controls label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

.segmented-control {
  display: flex;
  background-color: var(--bg-card);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.segment {
  flex: 1;
  background: transparent;
  border: none;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.segment.active {
  background-color: var(--accent-blurple);
  color: #fff;
  font-weight: 600;
}

.copilot-output-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.output-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent-blurple);
  font-size: 11px;
  cursor: pointer;
  font-weight: 600;
}

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

#dock-response-text {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  color: var(--text-primary);
  font-family: var(--font-stack);
  font-size: 13.5px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  min-height: 150px;
}

#dock-response-text:focus {
  border-color: var(--accent-blurple);
}

.btn-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #23a55a, #1f9450);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(35, 165, 90, 0.35);
  transition: all 0.15s ease;
}

.btn-copy:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.copilot-refine {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.copilot-refine label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.refine-input-row {
  display: flex;
  gap: 6px;
}

.refine-input-row input {
  flex: 1;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--text-primary);
  font-size: 12.5px;
  outline: none;
}

.refine-input-row input:focus {
  border-color: var(--accent-blurple);
}

.btn-send-refine {
  background-color: var(--bg-card-hover);
  border: 1px solid var(--border-subtle);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 12px;
  cursor: pointer;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-tag {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-tag:hover {
  background-color: var(--bg-card-hover);
  color: #fff;
  border-color: var(--border-active);
}

.dock-examples-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.examples-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-yellow);
  text-transform: uppercase;
}

.example-item {
  font-size: 12px;
  color: var(--text-secondary);
  background-color: var(--bg-panel);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.4;
}

.example-item:hover {
  color: #fff;
  background-color: rgba(240, 178, 50, 0.1);
}

/* Standalone Copilot Scratchpad Tab */
.standalone-copilot-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.panel-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.panel-header p {
  color: var(--text-secondary);
  font-size: 13.5px;
  margin-top: 4px;
}

.copilot-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-section label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

#standalone-input {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font-stack);
  font-size: 14px;
  outline: none;
}

#standalone-input:focus {
  border-color: var(--accent-blurple);
}

.card-options-row {
  display: flex;
  gap: 14px;
  align-items: flex-end;
}

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

.option-group label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.option-group select,
.option-group input {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.flex-1 {
  flex: 1;
}

.response-preview-box {
  border-top: 1px solid var(--border-subtle);
  padding-top: 18px;
}

#standalone-output {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  color: var(--text-primary);
  font-family: var(--font-stack);
  font-size: 14px;
  line-height: 1.6;
  outline: none;
}

.giant-copy {
  padding: 14px;
  font-size: 14px;
  margin-top: 10px;
}

/* Customers Tab */
.customers-layout {
  display: flex;
  width: 100%;
  height: 100%;
}

.customers-list-panel {
  width: 320px;
  background-color: var(--bg-panel);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.panel-header-search {
  padding: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-header-search input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.customers-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.customer-card {
  padding: 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.customer-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-active);
}

.customer-card.selected {
  border-color: var(--accent-blurple);
  background-color: rgba(88, 101, 242, 0.15);
}

.customer-card-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--accent-blurple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.customer-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.customer-card-info {
  flex: 1;
  min-width: 0;
}

.customer-card-name {
  font-weight: 600;
  color: #fff;
  font-size: 13px;
}

.customer-card-id {
  font-size: 11px;
  color: var(--text-muted);
}

.customer-card-count {
  font-size: 11px;
  background-color: var(--border-subtle);
  padding: 2px 7px;
  border-radius: 12px;
  color: var(--text-secondary);
}

.customer-dossier-panel {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  background-color: var(--bg-main);
}

.dossier-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 800px;
}

.dossier-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dossier-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--accent-blurple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}

.dossier-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dossier-names h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.dossier-id {
  font-size: 12px;
  color: var(--text-muted);
}

.timeline-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.dossier-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dossier-ticket-item {
  padding: 12px 14px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.dossier-ticket-item:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-active);
}

/* Bot Center Tab */
.bot-control-dashboard {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.bot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

.stat-value-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
}

.status-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--accent-red);
}

.status-circle.online {
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.stat-desc {
  font-size: 11.5px;
  color: var(--text-muted);
}

.invite-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background-color: var(--accent-blurple);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 4px;
  width: fit-content;
}

.invite-action-btn:hover {
  background-color: var(--accent-blurple-hover);
}

.sync-action-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sync-action-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.sync-action-card p {
  font-size: 13px;
  color: var(--text-secondary);
}

.sync-form-row {
  display: flex;
  gap: 10px;
}

.sync-form-row input,
.sync-form-row select {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.sync-form-row input {
  flex: 1;
}

.sync-progress-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-card);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--accent-yellow);
}

/* Settings Tab */
.settings-container {
  max-width: 750px;
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.settings-form {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.help-text {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

.help-text a {
  color: var(--accent-blurple);
  text-decoration: none;
}

.form-group input,
.form-group select {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-size: 13.5px;
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent-blurple);
}

.form-row {
  display: flex;
  gap: 14px;
}

.form-actions {
  margin-top: 10px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, #23a55a, #1b8548);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  transition: all 0.2s ease;
}

.hidden {
  display: none !important;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(240, 178, 50, 0.3);
  border-top-color: var(--accent-yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Discord Markdown Enhancements */
.discord-code-block {
  background-color: #1e1f22;
  border: 1px solid #141517;
  border-radius: 6px;
  padding: 10px 14px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  color: #dbdee1;
  overflow-x: auto;
  margin: 6px 0;
  white-space: pre;
}

.discord-inline-code {
  background-color: #2b2d31;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px;
  color: #dbdee1;
}

.discord-spoiler {
  background-color: #2b2d31;
  color: transparent;
  padding: 1px 6px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.discord-spoiler.revealed {
  background-color: rgba(255, 255, 255, 0.1);
  color: #dbdee1;
  user-select: text;
}

.discord-quote {
  border-left: 4px solid #4e5058;
  padding-left: 10px;
  margin: 4px 0;
  color: #949ba4;
}

.discord-mention {
  background-color: rgba(88, 101, 242, 0.3);
  color: #c9cdfb;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 500;
}

.discord-link {
  color: #00a8fc;
  text-decoration: none;
}

.discord-link:hover {
  text-decoration: underline;
}

/* Copy Button Success State Animation */
.copied-success {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.6) !important;
  transform: scale(1.02);
}

/* Custom Slim Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: #2b2d38;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3b4052;
}

/* --- LOGIN & AUTHENTICATION SCREEN --- */
.login-body {
  background: radial-gradient(circle at top, #161a29 0%, #090a0f 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100vw;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 440px;
}

.login-card {
  background-color: #111420;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}

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

.brand-mark-svg {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5865f2, #3b45a0);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.4);
}

.login-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.login-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.auth-tabs {
  display: flex;
  background-color: #0b0d14;
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-tab.active {
  background-color: var(--bg-card);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.login-alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  margin-bottom: 18px;
  font-weight: 500;
}

.login-alert.error {
  background-color: rgba(242, 63, 67, 0.15);
  border: 1px solid rgba(242, 63, 67, 0.3);
  color: #ff7b7e;
}

.login-alert.success {
  background-color: rgba(35, 165, 90, 0.15);
  border: 1px solid rgba(35, 165, 90, 0.3);
  color: #3ba55d;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setup-notice {
  display: flex;
  gap: 12px;
  padding: 12px;
  background-color: rgba(88, 101, 242, 0.1);
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: var(--radius-sm);
  color: #c9cdfb;
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 6px;
}

.setup-notice svg {
  flex-shrink: 0;
  color: #5865f2;
}

.setup-notice strong {
  display: block;
  color: #fff;
  font-size: 12.5px;
  margin-bottom: 2px;
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-icon-wrap input {
  width: 100%;
  padding-left: 38px !important;
}

.btn-auth-primary {
  margin-top: 8px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #5865f2, #4752c4);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.35);
}

.btn-auth-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #4752c4, #3b45a0);
  transform: translateY(-1px);
}

.btn-auth-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

/* --- DISCORD SEARCH POPOVER (MATCHING SCREENSHOT 3) --- */
.search-box {
  position: relative;
}

.search-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 440px;
  max-width: 90vw;
  background-color: #11131a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow: hidden;
  animation: popoverFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.popover-chip-homer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.4);
  color: #a5b4fc;
  padding: 4px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.popover-chip-homer:hover {
  background: rgba(88, 101, 242, 0.3);
  border-color: #5865f2;
  color: #fff;
  transform: translateY(-1px);
}

.popover-filters-list {
  padding: 6px;
}

.popover-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.popover-filter-row:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

.filter-row-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  color: var(--text-secondary);
}

.popover-filter-row:hover .filter-row-icon {
  color: #fff;
  background: rgba(88, 101, 242, 0.2);
}

.filter-row-info {
  flex: 1;
}

.filter-row-title {
  font-size: 13px;
  font-weight: 500;
  color: #e5e7eb;
}

.filter-row-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: monospace;
}

/* Live Search Results inside Popover */
.search-live-results {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  max-height: 380px;
  display: flex;
  flex-direction: column;
}

.live-results-header {
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
}

.live-results-scroll {
  overflow-y: auto;
  max-height: 340px;
}

.live-result-item {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.live-result-item:hover {
  background-color: rgba(88, 101, 242, 0.1);
}

.live-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.live-result-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
}

.badge-homer {
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #5865f2;
  color: #fff;
  font-weight: 700;
}

.live-result-channel {
  font-size: 11px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.live-result-snippet {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.live-result-snippet mark {
  background: rgba(234, 179, 8, 0.3);
  color: #fef08a;
  border-radius: 2px;
  padding: 0 2px;
}

/* --- MODALS (BOT SETUP & LIGHTBOX) --- */
.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: 2000;
}

.modal-card {
  background: #12141c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  width: 540px;
  max-width: 94vw;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  animation: modalScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.modal-title-row h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

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

.modal-body {
  padding: 20px;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.setup-steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.setup-step {
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #5865f2;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}

.setup-step strong {
  display: block;
  color: #fff;
  margin-bottom: 2px;
}

.text-link {
  color: #5865f2;
  text-decoration: underline;
}

.modal-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0 14px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.modal-divider::before,
.modal-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-divider span {
  padding: 0 10px;
}

.client-id-row {
  display: flex;
  gap: 10px;
}

.client-id-row input {
  flex: 1;
  background: #090a0f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.client-id-row input:focus {
  border-color: #5865f2;
}

/* Lightbox Modal */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

#lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

.lightbox-close {
  position: absolute;
  top: -36px;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* In-Chat Image Attachment Thumbnails (Discord-Style) */
.chatlog-attachment-preview {
  margin-top: 8px;
  display: inline-block;
  max-width: 380px;
}

.chatlog-attachment-img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: block;
}

.chatlog-attachment-img:hover {
  transform: scale(1.015);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.highlighted-pulse {
  animation: pulseHighlight 2s ease-out;
}

@keyframes pulseHighlight {
  0% { background-color: rgba(88, 101, 242, 0.4); }
  100% { background-color: transparent; }
}

/* --- DISCORD ROLES & COLORS (MATCHING REFERENCE UI) --- */
.owner-color, .owner-purple {
  color: #c084fc !important;
  font-weight: 700 !important;
}

.admin-color, .admin-gold {
  color: #facc15 !important;
  font-weight: 700 !important;
}

.bot-name {
  color: #ffffff !important;
  font-weight: 700 !important;
}

.app-color {
  color: #c084fc !important;
}

.discord-bot-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background-color: #5865f2;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1.5px 5px;
  border-radius: 4px;
  vertical-align: middle;
}

.discord-app-badge {
  display: inline-flex;
  align-items: center;
  background-color: rgba(88, 101, 242, 0.28);
  color: #c4b5fd;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1.5px 5px;
  border-radius: 4px;
  vertical-align: middle;
}

.discord-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 4px;
  vertical-align: middle;
}

.discord-role-badge.admin-badge {
  background-color: rgba(250, 204, 21, 0.15);
  color: #fde047;
  border: 1px solid rgba(250, 204, 21, 0.35);
}

.discord-role-badge.owner-badge {
  background-color: rgba(192, 132, 252, 0.15);
  color: #d8b4fe;
  border: 1px solid rgba(192, 132, 252, 0.35);
}

/* Status dots */
.status-indicator-dot, .status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2.5px solid #090a0f;
}

.status-indicator-dot.online, .status-dot.online {
  background-color: #22c55e;
}

.status-indicator-dot.dnd, .status-dot.dnd {
  background-color: #f43f5e;
}

/* Brand Avatar Halo */
.brand-avatar-halo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 35%, #8b5cf6 70%, #ec4899 100%);
  box-shadow: 0 0 14px rgba(79, 172, 254, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* User Profile Badge (Footer) */
.user-avatar-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
}

.user-avatar-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(250, 204, 21, 0.4);
}

.admin-tag {
  color: #facc15 !important;
  font-weight: 800 !important;
}

/* --- THE STRAFEOS ACTIVE CAPSULE STYLE (AS SEEN IN REFERENCE SCREENSHOT) --- */
.active-strafeos-capsule {
  position: relative;
  background: linear-gradient(90deg, rgba(88, 101, 242, 0.2) 0%, rgba(139, 92, 246, 0.08) 100%) !important;
  border: 1px solid rgba(129, 140, 248, 0.32) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 18px rgba(88, 101, 242, 0.18) !important;
  overflow: hidden;
}

.active-strafeos-capsule::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
}

/* Selected Ticket Card matching the StrafeOS Capsule */
.ticket-card.selected {
  position: relative;
  background: linear-gradient(90deg, rgba(88, 101, 242, 0.22) 0%, rgba(139, 92, 246, 0.08) 100%) !important;
  border: 1px solid rgba(129, 140, 248, 0.35) !important;
  border-radius: 8px !important;
  box-shadow: 0 6px 22px rgba(88, 101, 242, 0.2) !important;
  transform: translateX(3px);
}

.ticket-card.selected::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(180deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
}

/* Discord Server Roster Widget */
.discord-roster-card {
  margin-top: 24px;
  background: #0d0f17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.roster-header-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 14px;
}

.roster-header-title h3 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.roster-server-tag {
  font-size: 11px;
  color: #a5b4fc;
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.3);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

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

.roster-category-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 8px;
  padding-left: 6px;
}

.roster-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background-color 0.12s ease;
}

.roster-member-row:hover:not(.active-strafeos-capsule) {
  background-color: rgba(255, 255, 255, 0.04);
}

.roster-avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
}

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

.roster-avatar-wrap.cyber-halo {
  padding: 2px;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 35%, #8b5cf6 70%, #ec4899 100%);
  box-shadow: 0 0 12px rgba(79, 172, 254, 0.5);
}

.roster-avatar-wrap.cyber-halo img {
  border-radius: 50%;
}

.roster-member-info {
  flex: 1;
  min-width: 0;
}

.roster-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.roster-member-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #f3f4f6;
}

.roster-member-status {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Copilot Dock Header */
.dock-avatar-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dock-avatar-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(250, 204, 21, 0.5);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.25);
}

.dock-title-text {
  display: flex;
  flex-direction: column;
}

.dock-title-text h3 {
  font-size: 14px;
  margin: 0;
}

.dock-subtext {
  font-size: 10px;
  color: #a5b4fc;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* In-Chat Avatars */
.homer-avatar img {
  border: 1.5px solid rgba(250, 204, 21, 0.5);
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.2);
}

.strafe-avatar img {
  border: 1.5px solid rgba(192, 132, 252, 0.5);
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.2);
}



