:root {
  color-scheme: dark;
  --bg-app: #080708;
  --bg-sidebar: #0C0B0D;
  --bg-card: #121013;
  --bg-card-hover: #19161B;
  --bg-input: #0E0D10;
  --bg-subtle: rgba(213, 155, 118, 0.06);
  
  --border-light: rgba(213, 155, 118, 0.12);
  --border-card: rgba(213, 155, 118, 0.18);
  --border-input: rgba(213, 155, 118, 0.24);
  
  /* Taoyame Rose-Gold / Champagne Theme Tokens */
  --blue-primary: #D59B76;
  --blue-hover: #E2AC8D;
  --blue-active: #B77D58;
  --blue-subtle: rgba(213, 155, 118, 0.14);
  --blue-border: rgba(213, 155, 118, 0.32);
  --blue-focus-ring: rgba(213, 155, 118, 0.28);
  
  --text-primary: #FFFFFF;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
  
  --green: #FFFFFF;
  --green-bg: rgba(255, 255, 255, 0.08);
  --green-border: rgba(255, 255, 255, 0.2);
  
  --red: #F43F5E;
  --red-bg: rgba(244, 63, 94, 0.1);
  --red-border: rgba(244, 63, 94, 0.25);
  
  --orange: #FFFFFF;
  --orange-bg: rgba(255, 255, 255, 0.08);
  --orange-border: rgba(255, 255, 255, 0.2);
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;
  
  --transition: all 0.15s ease;
}

/* ==========================================================================
   GLOBAL DARK THEME SCROLLBARS
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  transition: background-color 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

*::-webkit-scrollbar-thumb:active {
  background: var(--blue-primary);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

*::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* ==========================================================================
   BROWSER DEFAULTS ELIMINATION & HARMONIZATION
   ========================================================================== */

/* 1. Sleek Electric Blue Selection */
::selection {
  background: rgba(255, 255, 255, 0.35) !important;
  color: #FFFFFF !important;
  text-shadow: none;
}
::-moz-selection {
  background: rgba(255, 255, 255, 0.35) !important;
  color: #FFFFFF !important;
  text-shadow: none;
}

/* 2. Chrome/Edge/Firefox Autofill Dark Mode Override */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill {
  -webkit-text-fill-color: #F0F2F6 !important;
  -webkit-box-shadow: 0 0 0px 1000px #050505 inset !important;
  box-shadow: 0 0 0px 1000px #050505 inset !important;
  transition: background-color 5000s ease-in-out 0s !important;
  caret-color: var(--blue-primary, #FFFFFF) !important;
  font-family: inherit !important;
}

/* 3. Caret Color for text editing */
input, textarea, [contenteditable="true"] {
  caret-color: var(--blue-primary, #FFFFFF) !important;
}

/* 4. Elegant Focus Outline & Click Reset */
:focus:not(:focus-visible) {
  outline: none !important;
}
:focus-visible {
  outline: none !important;
}
input, textarea, select {
  outline: none !important;
}
input:focus, input:focus-visible,
textarea:focus, textarea:focus-visible,
select:focus, select:focus-visible {
  outline: none !important;
}
button:focus-visible, a:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4) !important;
}

/* Universal Form Placeholder Styling (Replaces browser default washed out look) */
::placeholder {
  color: var(--text-muted, #8E9EB5) !important;
  opacity: 0.7 !important;
  font-family: inherit;
}
::-webkit-input-placeholder {
  color: var(--text-muted, #8E9EB5) !important;
  opacity: 0.7 !important;
  font-family: inherit;
}
::-moz-placeholder {
  color: var(--text-muted, #8E9EB5) !important;
  opacity: 0.7 !important;
  font-family: inherit;
}
:-ms-input-placeholder {
  color: var(--text-muted, #8E9EB5) !important;
  opacity: 0.7 !important;
  font-family: inherit;
}

/* Prevent accidental browser ghost dragging of UI graphics */
img, svg {
  -webkit-user-drag: none;
  user-select: none;
}

/* 5. Clean Search Input & Number Inputs */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* 6. File Selector Button */
input[type="file"]::file-selector-button {
  background: rgba(255, 255, 255, 0.06);
  color: #F0F2F6;
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 12px;
  font-family: inherit;
  transition: all 0.2s ease;
}
input[type="file"]::file-selector-button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
}

/* 7. Remove tap highlight */
* {
  -webkit-tap-highlight-color: transparent;
}

/* 8. Modern Form Controls & Default Browser Element Resets */
button, input, optgroup, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Custom Checkboxes & Radio buttons with Cyber Blue Accent */
input[type="checkbox"], input[type="radio"] {
  accent-color: var(--blue-primary, #FFFFFF) !important;
  cursor: pointer;
}

/* Modern Text Boxes & Standalone Inputs System */
.auth-input,
.app-text-input,
input[type="text"]:not(.auth-input-wrap input):not(.compose-field input):not(.mail-search-box input):not(.contacts-search-wrap input),
input[type="password"]:not(.auth-input-wrap input),
input[type="email"]:not(.auth-input-wrap input),
input[type="tel"]:not(.auth-input-wrap input),
input[type="url"]:not(.auth-input-wrap input),
input[type="search"]:not(.mail-search-box input):not(.contacts-search-wrap input),
input:not([type]):not(.auth-input-wrap input) {
  width: 100%;
  height: 42px;
  background: #121212 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 8px !important;
  color: #F0F2F6 !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  padding: 0 14px;
  box-sizing: border-box !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Modal Input Wrap with leading icon */
.modal-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.modal-input-wrap svg {
  position: absolute;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 16px !important;
  height: 16px !important;
  color: #64748B !important;
  pointer-events: none !important;
  transition: color 0.2s ease !important;
  z-index: 10 !important;
  flex-shrink: 0 !important;
}

.modal-input-wrap:focus-within svg {
  color: #FFFFFF !important;
}

.modal-input-wrap input,
.modal-input-wrap input[type="text"],
.modal-input-wrap input[type="email"],
.modal-input-wrap input[type="tel"],
.modal-input-wrap input[type="password"],
.modal-input-wrap input.auth-input,
.modal-input-wrap .auth-input {
  padding-left: 42px !important;
  padding-right: 14px !important;
}

.auth-input:hover,
.app-text-input:hover,
input[type="text"]:not(.auth-input-wrap input):not(.compose-field input):not(.mail-search-box input):not(.contacts-search-wrap input):hover,
input[type="password"]:not(.auth-input-wrap input):hover,
input[type="email"]:not(.auth-input-wrap input):hover,
input[type="tel"]:not(.auth-input-wrap input):hover {
  border-color: rgba(255, 255, 255, 0.45) !important;
  background: #161616 !important;
}

.auth-input:focus,
.app-text-input:focus,
input[type="text"]:not(.auth-input-wrap input):not(.compose-field input):not(.mail-search-box input):not(.contacts-search-wrap input):focus,
input[type="password"]:not(.auth-input-wrap input):focus,
input[type="email"]:not(.auth-input-wrap input):focus,
input[type="tel"]:not(.auth-input-wrap input):focus {
  border-color: #FFFFFF !important;
  background: #181818 !important;
  border-radius: 8px !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25) !important;
  outline: none !important;
}

/* Styled Select Dropdown (No ugly gray Windows OS border/arrow) */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #050505;
  color: #F0F2F6;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  padding: 8px 36px 8px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238E9EB5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

select:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

select option {
  background-color: #050505;
  color: #F0F2F6;
  padding: 8px 12px;
}

/* Date / Time Picker Icons in Dark Theme */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85) brightness(1.2);
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Details summary triangle removal */
details summary::-webkit-details-marker {
  display: none;
}
details summary {
  list-style: none;
  cursor: pointer;
}

body {
  color-scheme: dark;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-primary);
  overflow: hidden;
  overflow-x: hidden !important;
  height: 100vh;
  width: 100vw;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
}

body.is-maximized .custom-titlebar {
  padding-left: 2px;
  padding-right: 0;
}

/* ==========================================================================
   CUSTOM FRAMELESS TITLEBAR (No default Windows buttons)
   ========================================================================== */
.custom-titlebar {
  display: none !important;
}

.titlebar-drag-region {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 14px;
  min-width: 0;
  overflow: hidden;
  -webkit-app-region: drag;
}

.titlebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  cursor: default;
  user-select: none;
}

.titlebar-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
  animation: voxTitlebarLogoPulse 6s ease-in-out infinite;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.25s ease;
}

.titlebar-brand:hover .titlebar-logo {
  transform: scale(1.15) rotate(-3deg);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.95));
}

.titlebar-app-name {
  font-weight: 800;
  letter-spacing: 0.8px;
  flex-shrink: 0;
  color: #FFFFFF;
  background-color: #FFFFFF;
  background-image: linear-gradient(
    115deg,
    transparent 0%,
    transparent 42%,
    #0066FF 46%,
    #FFFFFF 49%,
    #FFFFFF 50%,
    #FFFFFF 51%,
    #0066FF 54%,
    transparent 58%,
    transparent 100%
  );
  background-repeat: no-repeat;
  background-size: 350% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: voxTitleBeamSweep 6s cubic-bezier(0.25, 1, 0.4, 1) infinite;
  display: inline-block;
  transition: filter 0.25s ease;
}

.titlebar-brand:hover .titlebar-app-name {
  filter: drop-shadow(0 0 9px rgba(255, 255, 255, 0.9));
}

@keyframes voxTitleBeamSweep {
  0% {
    background-position: 250% 0;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.15));
  }
  22% {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 18px rgba(255, 255, 255, 0.45));
  }
  45% {
    background-position: -150% 0;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.15));
  }
  45.001% {
    background-position: 250% 0;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.15));
  }
  100% {
    background-position: 250% 0;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.15));
  }
}

@keyframes voxTitlebarLogoPulse {
  0% {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.45));
    transform: translateY(0);
  }
  22% {
    filter: drop-shadow(0 0 11px rgba(255, 255, 255, 0.95));
    transform: translateY(-0.5px);
  }
  45%, 100% {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.45));
    transform: translateY(0);
  }
}

.titlebar-separator {
  color: var(--text-muted);
  font-size: 11px;
  flex-shrink: 0;
}

.titlebar-view-name {
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  transition: color 0.2s ease;
}

/* Minimalist Window Controls */
.window-controls {
  display: flex;
  height: 100%;
  -webkit-app-region: no-drag;
}

.win-btn {
  width: 44px;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.win-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.win-btn.close:hover {
  background-color: #E03131;
  color: #FFFFFF;
}

/* ==========================================================================
   APPLICATION LAYOUT
   ========================================================================== */
.app-layout {
  flex: 1;
  display: flex;
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  overflow: hidden;
  overflow-x: hidden !important;
}

/* Sidebar */
.sidebar {
  width: 256px;
  min-width: 256px;
  max-width: 256px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 16px;
  box-sizing: border-box;
}

.sidebar-brand-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(10, 10, 10, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.25);
}

.sidebar-brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7));
}

.sidebar-brand-info {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-title {
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 1.5px;
  line-height: 1.2;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.sidebar-brand-version {
  font-size: 9px;
  color: var(--blue-primary);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.nav-menu::-webkit-scrollbar {
  width: 4px;
}

.nav-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

/* Navigation Section Labels */
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  padding: 10px 10px 4px;
  text-transform: uppercase;
  user-select: none;
}

.nav-section-label:first-child {
  padding-top: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8.5px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease, box-shadow 0.18s ease;
  outline: none;
}

.nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.18s ease, filter 0.2s ease;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  transform: translateX(3px);
}

.nav-item:hover .nav-icon {
  transform: scale(1.1);
  color: #FFFFFF;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-weight: 600;
  box-shadow: 0 1px 8px rgba(255, 255, 255, 0.12);
}

.nav-item.active .nav-icon {
  color: #FFFFFF;
  stroke: #FFFFFF;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

/* Nav Collapsible Group (Discord) */
.nav-group {
  display: flex;
  flex-direction: column;
}

.nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8.5px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  box-sizing: border-box;
}

.nav-group-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-group-title {
  letter-spacing: 0.2px;
}

.nav-group-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.discord-icon {
  color: #5865F2; /* Discord Blurple */
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.25s ease;
}

.nav-group-count {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  transition: var(--transition);
}

.nav-group-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.2s ease;
}

.nav-group:hover .nav-group-header {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  transform: translateX(2px);
}

.nav-group:hover .discord-icon {
  transform: rotate(-6deg) scale(1.12);
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.nav-group:hover .nav-group-chevron {
  color: var(--text-primary);
}

.nav-group.has-active .nav-group-header {
  color: #FFFFFF;
}

.nav-group.has-active .nav-group-count {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.nav-group.open .nav-group-chevron {
  transform: rotate(180deg);
}

/* Nav Sub Items (Tree Children) */
.nav-group-children {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 14px;
  padding-left: 10px;
  border-left: 1.5px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.22s ease,
              margin 0.25s ease;
  pointer-events: none;
}

.nav-group.open .nav-group-children {
  max-height: 220px;
  opacity: 1;
  margin-top: 3px;
  margin-bottom: 4px;
  pointer-events: auto;
}

.nav-group.has-active .nav-group-children {
  border-left-color: rgba(255, 255, 255, 0.45);
}

.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease, box-shadow 0.18s ease;
  outline: none;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
}

.nav-sub-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-sub-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: inherit;
  opacity: 0.75;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-sub-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  transform: translateX(3px);
}

.nav-sub-item:hover .nav-sub-icon {
  opacity: 1;
  transform: scale(1.15);
  color: #FFFFFF;
}

.nav-sub-item.active {
  background-color: var(--blue-subtle);
  color: var(--blue-primary);
  border-color: var(--blue-border);
  font-weight: 600;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.14);
}

.nav-sub-item.active .nav-sub-icon {
  opacity: 1;
  color: var(--blue-primary);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
}

.sidebar-footer {
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

.system-monitor {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 6px;
}

.monitor-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.monitor-label {
  color: var(--text-muted);
}

.monitor-val {
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.text-blue {
  color: var(--blue-primary) !important;
}

/* ==========================================================================
   MAIN CONTENT VIEW
   ========================================================================== */
.main-content {
  flex: 1 1 auto;
  min-width: 0;
  width: 0;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden !important;
  padding: 22px 28px 36px;
  box-sizing: border-box;
}

.main-content::-webkit-scrollbar {
  width: 6px;
}

.main-content::-webkit-scrollbar-thumb {
  background: #2A2A2A;
  border-radius: var(--radius-pill);
}

.main-content::-webkit-scrollbar-thumb:hover {
  background: var(--blue-primary);
}

.view-panel {
  display: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden !important;
  box-sizing: border-box;
}

.view-panel.active {
  display: block;
  animation: viewFadeSlideIn 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes viewFadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.view-header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}

.view-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.dash-hero-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.75));
  animation: heroLogoFloat 4.8s ease-in-out infinite;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.3s ease;
}

.dash-hero-logo:hover {
  transform: translateY(-3px) scale(1.06);
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, 1));
}

@keyframes heroLogoFloat {
  0%, 100% {
    transform: translateY(0);
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.7));
  }
  50% {
    transform: translateY(-3px);
    filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.95));
  }
}

.view-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.view-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.view-header-actions {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.22s ease,
              border-color 0.22s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.35);
}

.card-head {
  margin-bottom: 10px;
}

.card-head h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
  word-break: break-word;
}

.card-body-text code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--blue-primary);
  padding: 2px 5px;
  border-radius: 4px;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 14px;
  margin-bottom: 20px;
  max-width: 100%;
}

.stat-card {
  padding: 16px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  position: relative;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.22s ease,
              border-color 0.22s ease;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-2.5px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 22px rgba(255, 255, 255, 0.35), 0 0 16px rgba(255, 255, 255, 0.08);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-number {
  font-size: 19px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 0.2s ease, color 0.2s ease;
}

.stat-card:hover .stat-number {
  transform: scale(1.02);
}

.stat-sub {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  max-width: 100%;
}

/* ==========================================================================
   BUTTONS & INPUTS
   ========================================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: linear-gradient(135deg, #B77D58 0%, #D59B76 50%, #F1BE91 100%);
  border: 1px solid rgba(241, 190, 145, 0.45);
  border-radius: var(--radius-sm);
  color: #120A06;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(183, 125, 88, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #C38964 0%, #E2AC8D 50%, #F8DEC9 100%);
  border-color: rgba(248, 222, 201, 0.65);
  color: #0E0704;
  transform: translateY(-1.5px);
  box-shadow: 0 5px 20px rgba(213, 155, 118, 0.45);
}

.btn-primary:active {
  background: linear-gradient(135deg, #A86D48 0%, #CD9570 50%, #ECB98C 100%);
  color: #0E0704;
  transform: translateY(0.5px);
  box-shadow: 0 2px 6px rgba(183, 125, 88, 0.2);
}

.mobile-compose-btn {
  background: linear-gradient(135deg, #B77D58 0%, #D59B76 50%, #F1BE91 100%) !important;
  border: 1px solid rgba(241, 190, 145, 0.45) !important;
  color: #120A06 !important;
  box-shadow: 0 2px 12px rgba(213, 155, 118, 0.4) !important;
}

.mobile-compose-btn svg {
  stroke: #120A06 !important;
  color: #120A06 !important;
}

.btn-subtle {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-subtle:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(255, 255, 255, 0.25);
}

.btn-subtle:active {
  transform: translateY(0.5px);
}

.btn-danger {
  padding: 8px 16px;
  background-color: var(--red-bg);
  border: 1px solid var(--red-border);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-danger:hover {
  background-color: rgba(244, 63, 94, 0.2);
  transform: translateY(-1px);
}

.btn-danger:active {
  transform: translateY(0.5px);
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  outline: none;
}

.btn-link:hover {
  color: var(--text-secondary);
}

/* Forms */
.input-action-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.field-wrap {
  flex: 1 1 240px;
  min-width: 180px;
  display: flex;
  align-items: center;
  background-color: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  transition: border-color 0.2s ease, box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}

.field-wrap:focus-within {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 2px var(--blue-focus-ring), 0 0 14px rgba(255, 255, 255, 0.16);
  background-color: rgba(10, 10, 10, 0.95);
}

.field-prefix {
  color: var(--blue-primary);
  font-weight: 600;
  font-size: 14px;
  margin-right: 6px;
}

.field-wrap input {
  flex: 1;
  height: 38px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  font-family: inherit;
}

.input-field, .select-field, .textarea-field {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}

.input-field:focus, .select-field:focus, .textarea-field:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 2px var(--blue-focus-ring), 0 0 14px rgba(255, 255, 255, 0.16);
  background-color: rgba(10, 10, 10, 0.95);
}

.textarea-field {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  resize: vertical;
}

/* Spinner */
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.hidden {
  display: none !important;
}

/* ==========================================================================
   RESULT & DATA TABLES
   ========================================================================== */
.result-panel {
  background-color: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 24px;
}

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

.status-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.status-pill.available {
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  color: var(--green);
}

.status-pill.taken {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red);
}

.status-pill.warning {
  background: var(--orange-bg);
  border: 1px solid var(--orange-border);
  color: var(--orange);
}

.meta-tags {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

.meta-tag strong {
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

.code-preview {
  margin-top: 8px;
}

.code-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

pre, code, pre code {
  white-space: pre-wrap !important;
  word-break: break-all !important;
  overflow-wrap: anywhere !important;
  overflow-x: hidden !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

pre code {
  display: block;
  background-color: #0A0A0A;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--blue-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  user-select: text;
  max-height: 220px;
  overflow-y: auto;
}

/* History Table */
.history-block {
  margin-top: 10px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.history-head h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.data-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  border-bottom: 1px solid var(--border-light);
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  word-break: break-word;
}

.data-table tr:hover td {
  background-color: var(--bg-subtle);
}

.empty-msg td {
  text-align: center;
  color: var(--text-muted);
  padding: 24px;
}

/* REST Grid */
.rest-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.rest-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

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

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

.method-group { width: 110px; }
.url-group { flex: 1; min-width: 200px; }
.action-group { justify-content: flex-end; }

.response-panel {
  background-color: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 6px;
  width: 100%;
  box-sizing: border-box;
}

.resp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.resp-code {
  font-weight: 700;
  font-size: 13px;
  color: var(--green);
}

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

/* ==========================================================================
   TERMINAL / CONSOLE
   ========================================================================== */
.terminal-card {
  height: calc(100vh - 220px);
  min-height: 380px;
  max-height: calc(100vh - 180px);
  background-color: #0A0A0A;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  overflow-y: auto;
  overflow-x: hidden !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  user-select: text;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.term-line {
  display: flex;
  gap: 8px;
  line-height: 1.5;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.term-time { color: var(--text-muted); flex-shrink: 0; }
.term-tag { font-weight: 600; padding: 0 4px; border-radius: 3px; font-size: 11px; flex-shrink: 0; }
.term-tag.info { color: var(--blue-primary); background: var(--blue-subtle); }
.term-tag.ok { color: var(--green); background: var(--green-bg); }
.term-tag.warn { color: var(--orange); background: var(--orange-bg); }
.term-tag.fail { color: var(--red); background: var(--red-bg); }
.term-msg { color: var(--text-secondary); word-break: break-all; overflow-wrap: anywhere; }

/* Settings List */
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.setting-row strong {
  font-size: 13px;
  color: var(--text-primary);
}

.setting-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.about-section {
  margin-top: 20px;
}

.about-section h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.info-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.info-row span { color: var(--text-muted); }
.info-row strong { color: var(--text-primary); font-family: 'JetBrains Mono', monospace; }

/* ==========================================================================
   NETWORK & PROXY TOOLBAR & CONTROL CENTER
   ========================================================================== */
.network-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  max-width: 100%;
  box-sizing: border-box;
}

.net-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
}

.net-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  flex-wrap: wrap;
  max-width: 100%;
}

.net-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

.net-status-dot.active {
  background-color: var(--green);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
  animation: netDotPulseGreen 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.net-status-dot.warning {
  background-color: var(--orange);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
  animation: netDotPulseOrange 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes netDotPulseGreen {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0);
  }
}

@keyframes netDotPulseOrange {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0);
  }
}

.net-status-label {
  color: var(--text-secondary);
}

.net-status-ip {
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  word-break: break-all;
}

.btn-icon-refresh,
.btn-icon-ip-toggle {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-icon-refresh:hover,
.btn-icon-ip-toggle:hover {
  color: var(--blue-primary);
  background-color: var(--blue-subtle);
}

.proxy-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}

.proxy-badge.active {
  color: var(--blue-primary);
  background: var(--blue-subtle);
  border-color: var(--blue-border);
}

.proxy-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-subtle-sm {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-subtle-sm:hover {
  color: var(--text-primary);
  border-color: var(--blue-border);
  background-color: var(--blue-subtle);
}

.proxy-active-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.proxy-current-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.proxy-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.proxy-address {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-primary);
  word-break: break-all;
  overflow-wrap: anywhere;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proxy-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.proxy-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0 4px;
}

.btn-mini {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.btn-mini:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.btn-mini.text-blue {
  color: var(--blue-primary);
}

.btn-mini.text-blue:hover {
  background-color: var(--blue-subtle);
  border-color: var(--blue-border);
}

.btn-mini.text-red {
  color: var(--red);
}

.btn-mini.text-red:hover {
  background-color: var(--red-bg);
  border-color: var(--red-border);
}

.proxy-options-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  width: 100%;
  flex-wrap: wrap;
}

.proxy-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.proxy-checkbox-label input[type="checkbox"] {
  accent-color: var(--blue-primary);
  cursor: pointer;
}

.proxy-checkbox-label strong {
  color: var(--orange);
}

/* ==========================================================================
   RATE LIMIT ALERT CARD (HTTP 429)
   ========================================================================== */
.rate-limit-card {
  margin-top: 14px;
  background: rgba(245, 158, 11, 0.04);
  border: 1px solid var(--orange-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeIn 0.2s ease;
}

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

.rl-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.rl-endpoint {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.rl-body-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
}

.rl-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rl-full-width {
  grid-column: 1 / -1;
}

.rl-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 600;
}

.rl-value-huge {
  font-size: 22px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.2;
}

.rl-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.rl-progress-track {
  margin-top: 6px;
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.rl-progress-bar {
  height: 100%;
  background-color: var(--blue-primary);
  border-radius: 2px;
  transition: width 1s linear;
}

.rl-ip-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.rl-ip-display svg {
  color: var(--blue-primary);
  flex-shrink: 0;
}

.rl-ip-display strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text-primary);
}

.rl-sub-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.rl-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.rl-tip svg {
  color: var(--blue-primary);
  flex-shrink: 0;
}

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

/* ==========================================================================
   TOKEN INSPECTOR VIEW
   ========================================================================== */
.token-input-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.token-field-wrap {
  flex: 1 1 280px;
  min-width: 220px;
  position: relative;
  display: flex;
  align-items: center;
}

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

.token-field-wrap input {
  width: 100%;
  padding: 12px 42px 12px 38px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.token-field-wrap input:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 2px var(--blue-glow);
}

.btn-icon-token-eye {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  transition: color var(--transition-fast);
}

.btn-icon-token-eye:hover {
  color: var(--text-primary);
}

.token-options-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: -6px;
  margin-bottom: 16px;
  padding: 0 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.token-option-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.token-option-checkbox input[type="checkbox"] {
  accent-color: var(--blue-primary);
  cursor: pointer;
}

.btn-paste-token {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-paste-token:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-input);
}

.token-alert-banner {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
  animation: fadeIn 0.2s ease;
}

.token-alert-banner ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.token-alert-banner li {
  margin-bottom: 4px;
}

.token-alert-banner.warning {
  background-color: rgba(255, 149, 0, 0.1);
  border: 1px solid rgba(255, 149, 0, 0.3);
  color: var(--orange);
}

.token-alert-banner.error {
  background-color: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.3);
  color: var(--red);
}

/* Profile Result Container */
.token-profile-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.3s ease;
}

.profile-hero-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(10, 10, 10, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
}

.profile-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar-img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--blue-primary);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.5);
  background-color: #000000;
}

.profile-bot-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background-color: var(--blue-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.4);
}

.profile-main-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.profile-names-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-display-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.profile-username {
  font-size: 14px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.profile-badges-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.badge-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
}

.badge-chip.badge-blue {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--blue-primary);
}

.badge-chip.badge-purple {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
}

.badge-chip.badge-orange {
  background: rgba(255, 149, 0, 0.15);
  border: 1px solid rgba(255, 149, 0, 0.35);
  color: var(--orange);
}

.badge-chip.badge-green {
  background: rgba(48, 209, 88, 0.15);
  border: 1px solid rgba(48, 209, 88, 0.35);
  color: var(--green);
}

.badge-chip.badge-cyan {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #22D3EE;
}

.profile-id-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 0;
}

.profile-id-tag code {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
  font-size: 12px;
}

.btn-mini-copy {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-mini-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.profile-latency-tag {
  color: var(--text-muted);
}

.profile-latency-tag strong {
  color: var(--text-secondary);
}

/* Details Grid */
.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 14px;
}

.detail-tile {
  padding: 14px 16px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

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

.tile-val {
  font-size: 16px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
}

.tile-val.text-purple {
  color: #FFFFFF;
}

.tile-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

.tile-val-pill-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}

.sec-pill {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
}

.sec-pill.ok {
  color: var(--green);
}

.sec-pill.warn {
  color: var(--orange);
}

.sec-pill.muted {
  color: var(--text-muted);
}

/* Subscriptions card */
.nitro-subs-card {
  padding: 16px;
}

.nitro-subs-card .card-head h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.subs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.sub-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 2px 0 0 0;
}

/* JSON Collapsible */
.token-json-section {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
}

.token-json-header {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
  transition: color var(--transition-fast);
}

.token-json-header:hover {
  color: var(--text-primary);
}

.token-json-header svg {
  transition: transform var(--transition-fast);
}

.token-json-content {
  padding: 12px 14px;
  background: #0A0A0A;
  border-top: 1px solid var(--border-subtle);
}

.token-json-content pre {
  margin: 0;
  max-height: 250px;
  overflow-y: auto;
}

.token-json-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-all;
}

.tile-val.text-blue { color: var(--blue-primary); }
.tile-val.text-green { color: var(--green); }
.tile-val.text-cyan { color: #22D3EE; }
.tile-val.text-orange { color: var(--orange); }

/* Standing Shield & Status */
.standing-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.standing-shield-icon {
  font-size: 16px;
  line-height: 1;
}

/* CDN Badge Items with real SVG Icons */
.badge-cdn-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all var(--transition);
}

.badge-cdn-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.15);
}

.badge-cdn-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
}

.badge-rarity-tag {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--blue-primary);
  font-weight: 700;
  margin-left: 2px;
}

/* Sessions Card */
.sessions-card {
  padding: 16px;
  margin-top: 4px;
}

.sessions-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sessions-head-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.sessions-head-title h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.sessions-count-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--blue-primary);
}

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.session-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.session-item-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.session-left-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.session-device-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.session-main-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.session-device-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.session-location {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.session-right-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-time-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.session-active-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--green);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   POMELO MODE TOOLBAR & CLAIM PANEL
   ========================================================================== */
.pomelo-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.pomelo-switch-label {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 500;
}

.pomelo-sparkle {
  color: #FBBF24;
  font-size: 14px;
}

.pomelo-token-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.pomelo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}

.pomelo-dot.active {
  background: var(--green);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

/* Claim action panel */
.claim-action-panel {
  margin-top: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fadeIn 0.2s ease-out;
}

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

.claim-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.claim-text {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

.btn-claim {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--green);
  color: #FFFFFF;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-claim:hover {
  background: #E4E4E7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.35);
}

/* Modal Claim Username */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card {
  width: 90%;
  max-width: 440px;
  background: #0D0D0D !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9) !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScale 0.18s ease-out;
}

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

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

.modal-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

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

.btn-close-modal:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.claim-alert-box {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.4;
}

.claim-alert-box.error {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red);
}

.claim-alert-box.success {
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  color: var(--green);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.2);
  border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   USER LOOKUP (DISCORD PROFILE INSPECTOR)
   ========================================================================== */

.header-token-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
}

.pomelo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
}

.pomelo-dot.active {
  background: #23a55a;
  box-shadow: 0 0 8px rgba(35, 165, 90, 0.6);
}

.lookup-search-card {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}


.lookup-search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.lookup-input-wrap {
  position: relative;
  flex: 1 1 280px;
  min-width: 220px;
  display: flex;
  align-items: center;
}

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

.lookup-input-wrap input {
  width: 100%;
  height: 40px;
  padding-left: 40px;
  padding-right: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: border-color var(--transition), background var(--transition);
}

.lookup-input-wrap input:focus {
  border-color: var(--blue-primary);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.lookup-quick-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.lookup-quick-presets .preset-title {
  color: var(--text-muted);
  font-weight: 500;
  margin-right: 4px;
}

.quick-id-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  color: var(--text-secondary);
  padding: 3px 10px;
  font-size: 11px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quick-id-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
}

.lookup-alert-box {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.5;
  animation: fadeIn 0.2s ease;
}

.lookup-alert-box.error {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red);
}

.lookup-alert-box.info {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #8EA1FF;
}

.lookup-result-wrapper {
  margin-bottom: 20px;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.discord-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.5);
  position: relative;
}

.profile-card-banner {
  height: 140px;
  width: 100%;
  background: linear-gradient(135deg, #121212, #1E1E1E);
  background-size: cover;
  background-position: center;
  position: relative;
}

.profile-card-banner .banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(10, 10, 10, 0.85) 100%);
}

.profile-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 24px;
  margin-top: -46px;
  position: relative;
  z-index: 3;
}

.avatar-container {
  position: relative;
  width: 86px;
  height: 86px;
}

.profile-avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 4px solid var(--bg-card);
  object-fit: cover;
  background: #141414;
  display: block;
}

.profile-avatar-decoration {
  position: absolute;
  top: -13px;
  left: -13px;
  width: 112px;
  height: 112px;
  pointer-events: none;
  z-index: 4;
}

.profile-status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid var(--bg-card);
  background: #23a55a;
  z-index: 5;
}

.profile-badges-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #141414 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8) !important;
  min-height: 36px;
}

.profile-badge-item {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.profile-badge-item:hover {
  transform: scale(1.2);
}

.profile-badge-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.profile-identity-section {
  padding: 14px 24px 8px 24px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-display-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.profile-clan-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.clan-badge-img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.profile-handle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-muted);
}

.profile-username {
  font-family: var(--font-sans);
  color: var(--text-secondary);
}

.profile-pronouns-badge {
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

.profile-id-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.8;
}

.profile-body-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
  padding: 14px 24px 24px 24px;
}

.profile-subcard {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}

.profile-subcard .subcard-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}

.profile-bio-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 160px;
  overflow-y: auto;
}

.profile-meta-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.profile-meta-row .meta-label {
  color: var(--text-muted);
}

.profile-meta-row .meta-val {
  font-weight: 500;
  color: var(--text-primary);
}

.connected-accounts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.connected-account-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 12px;
}

.connected-account-chip .conn-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.connected-account-chip .conn-meta {
  display: flex;
  flex-direction: column;
}

.connected-account-chip .conn-type {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.connected-account-chip .conn-name {
  color: var(--text-primary);
  font-weight: 500;
}

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

.collectible-nameplate-preview {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   TOKEN INSPECTOR: SUBTABS & MESSAGING EXPLORER
   ========================================================================== */

.token-subtabs-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.token-subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  flex-shrink: 0;
}

.token-subtab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.4);
}

.token-subtab-btn.active {
  color: #FFFFFF;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
  border-color: var(--blue-primary);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.25);
}

.subtab-counter-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--blue-primary);
  color: #FFFFFF;
  min-width: 18px;
  text-align: center;
}

.subtab-panel {
  display: block;
}

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

/* --- MESSAGING CONTAINER --- */
.messaging-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.messaging-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.msg-source-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.msg-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.msg-source-pill:hover {
  color: var(--text-primary);
  border-color: var(--blue-border);
  background: rgba(255, 255, 255, 0.08);
}

.msg-source-pill.active {
  background: var(--blue-subtle);
  border-color: var(--blue-primary);
  color: var(--blue-primary);
  font-weight: 600;
}

.msg-pill-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

.msg-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- TWO-COLUMN MESSAGING LAYOUT --- */
.messaging-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 14px;
  height: calc(100vh - 215px);
  min-height: 460px;
  max-height: calc(100vh - 180px);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* --- LEFT COLUMN: CONVERSATIONS LIST --- */
.conversations-column {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-light);
  background: var(--bg-sidebar);
  overflow: hidden;
  min-width: 0;
}

.conv-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
}

.conv-search-wrap svg {
  position: absolute;
  left: 22px;
  color: var(--text-muted);
  pointer-events: none;
}

.conv-search-wrap input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
  transition: var(--transition);
}

.conv-search-wrap input:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 2px var(--blue-focus-ring);
}

.conv-category-select-wrap {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.2);
}

.conv-category-select-wrap label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.select-field-sm {
  width: 100%;
  padding: 6px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
}

.conversations-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.conv-loading-hint {
  padding: 30px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

/* Individual Conversation Item */
.conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.12s ease;
  border: 1px solid transparent;
  position: relative;
}

.conv-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.conv-item.active {
  background: var(--blue-subtle);
  border-color: var(--blue-border);
}

.conv-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
}

.conv-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #1E1E1E;
}

.conv-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-sidebar);
  background: var(--green);
}

.conv-status-dot.offline {
  background: var(--text-muted);
}

.conv-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.conv-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

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

.conv-item.active .conv-name {
  color: var(--blue-hover);
}

.conv-time {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.conv-snippet-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.conv-snippet {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--blue-primary);
  flex-shrink: 0;
}

/* --- RIGHT COLUMN: CHAT STREAM --- */
.chat-column {
  display: flex;
  flex-direction: column;
  background: #0C0C0C;
  overflow: hidden;
  position: relative;
  min-width: 0;
}

/* Chat Header */
.chat-header {
  min-height: 56px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  z-index: 5;
}

.chat-header-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 180px;
}

.chat-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}

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

.chat-header-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-header-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--blue-border);
  color: var(--blue-primary);
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.chat-header-subline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  min-width: 0;
  flex-wrap: wrap;
}

.chat-msg-count-tag {
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.chat-search-wrap input {
  padding: 6px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 11px;
  outline: none;
  width: 115px;
  transition: width 0.2s ease, border-color 0.2s ease;
}

.chat-search-wrap input:focus {
  width: 160px;
  border-color: var(--blue-primary);
}

/* Chat Empty State */
.chat-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.chat-empty-icon {
  font-size: 42px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
}

.chat-empty-state h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.chat-empty-state p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.5;
}

/* Messages Scroller & Flow */
.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
  scroll-behavior: smooth;
}

/* Pagination load older button */
.pagination-trigger-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.btn-load-older {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-load-older:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--blue-border);
  color: var(--blue-primary);
}

.spinner-sm {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--blue-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.messages-flow {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Individual Discord Message Row */
.discord-msg-row {
  display: flex;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: background-color 0.12s ease;
  position: relative;
}

.discord-msg-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.msg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #181818;
}

.msg-body-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.msg-author-name {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
}

.msg-author-name.me-author {
  color: var(--blue-hover);
}

.msg-bot-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--blue-primary);
  color: #FFFFFF;
  text-transform: uppercase;
}

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

/* Reply quotation bar */
.msg-reply-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
  padding-left: 14px;
  position: relative;
}

.msg-reply-bar::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 8px;
  height: 6px;
  border-left: 2px solid #3c4558;
  border-top: 2px solid #3c4558;
  border-top-left-radius: 4px;
}

.msg-reply-author {
  font-weight: 600;
  color: var(--text-secondary);
}

.msg-reply-snippet {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

/* Message Content Text */
.msg-text-content {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-primary);
  word-break: break-word;
  user-select: text;
}

.msg-text-content a {
  color: var(--blue-hover);
  text-decoration: none;
}

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

.msg-mention {
  background: rgba(255, 255, 255, 0.15);
  color: #58A6FF;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 500;
}

.msg-inline-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 2px 5px;
  background: #141414;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  color: #E2E8F0;
}

.msg-code-block {
  margin-top: 6px;
  background: #0A0A0A;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  overflow-x: auto;
}

.msg-code-block pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #FFFFFF;
  margin: 0;
}

/* Attachments */
.msg-attachments-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.msg-attachment-img-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-card);
  background: #0A0A0A;
  max-width: 380px;
  max-height: 280px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.msg-attachment-img-card:hover {
  border-color: var(--blue-primary);
  transform: scale(1.01);
}

.msg-attachment-img-card img {
  display: block;
  max-width: 100%;
  max-height: 280px;
  object-fit: cover;
}

.msg-attachment-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  gap: 6px;
}

.msg-attachment-img-card:hover .msg-attachment-overlay {
  opacity: 1;
}

.msg-attachment-file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  max-width: 320px;
}

.msg-attachment-file-card a {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-hover);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* Floating Actions on Message Hover */
.msg-hover-actions {
  position: absolute;
  top: -8px;
  right: 12px;
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.5);
  overflow: hidden;
  z-index: 4;
}

.discord-msg-row:hover .msg-hover-actions {
  display: flex;
}

.btn-msg-action {
  padding: 4px 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.1s ease, color 0.1s ease;
}

.btn-msg-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* --- CHAT INPUT & COMPOSER --- */
.chat-input-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 16px 12px 16px;
  background: #0C0C0C;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
  z-index: 4;
}

.chat-reply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--blue-primary);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 11px;
  color: var(--text-secondary);
}

.chat-reply-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.chat-reply-info svg {
  color: var(--blue-primary);
  flex-shrink: 0;
}

.chat-reply-preview {
  color: var(--text-muted);
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.btn-reply-cancel {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 3px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-reply-cancel:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
}

.chat-input-box {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  padding: 6px 8px 6px 12px;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.chat-input-box:focus-within {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

#chat-msg-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  resize: none;
  min-height: 22px;
  max-height: 120px;
  padding: 4px 0;
}

#chat-msg-input::placeholder {
  color: var(--text-muted);
}

.chat-input-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-chat-send {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--blue-primary);
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-chat-send:hover:not(:disabled) {
  background: var(--blue-hover);
  transform: scale(1.04);
}

.btn-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
  font-size: 10px;
  color: var(--text-muted);
}

.chat-typing-status {
  color: var(--blue-hover);
  font-style: italic;
  min-height: 14px;
}

/* --- FRIENDS & RELATIONSHIPS MANAGER --- */
.friends-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.friends-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
}

.friends-filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.friend-filter-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.friend-filter-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--blue-border);
}

.friend-filter-pill.active {
  background: var(--blue-subtle);
  border-color: var(--blue-primary);
  color: var(--blue-primary);
  font-weight: 600;
}

.friend-pill-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
}

.friends-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.friends-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.friends-search-wrap svg {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.friends-search-wrap input {
  padding: 6px 12px 6px 30px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 11px;
  width: 130px;
  outline: none;
  transition: width 0.2s, border-color 0.2s;
}

.friends-search-wrap input:focus {
  width: 175px;
  border-color: var(--blue-primary);
}

/* Add Friend Box */
.add-friend-box {
  background: #0C0C0C;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.4);
  animation: fadeIn 0.2s ease-out;
}

.add-friend-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.add-friend-title {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 3px;
}

.add-friend-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.add-friend-desc code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 5px;
  border-radius: 3px;
  color: var(--blue-hover);
}

.btn-close-box {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-close-box:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

.add-friend-inputs-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.add-friend-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 200px;
  min-width: 170px;
}

.add-friend-input-wrap input {
  width: 100%;
  padding: 8px 12px 8px 28px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s ease;
}

.add-friend-input-wrap input:focus {
  border-color: var(--blue-primary);
}

.add-friend-note-input {
  flex: 1 1 200px;
  min-width: 170px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s ease;
}

.add-friend-note-input:focus {
  border-color: var(--blue-primary);
}

.add-friend-feedback {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.add-friend-feedback.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: var(--green);
}

.add-friend-feedback.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--red);
}

/* Friends List & Grid */
.friends-list-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  min-height: 400px;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 12px;
}

.friend-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #0C0C0C;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  min-width: 0;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.friend-card:hover {
  border-color: var(--blue-border);
  background: #141414;
  transform: translateY(-1px);
}

.friend-info-col {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.friend-avatar-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.friend-avatar-wrap img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #1A1A1A;
  border: 1px solid var(--border-light);
}

.friend-name-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 2px;
  overflow: hidden;
}

.friend-global-name {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.friend-handle {
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.friend-type-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  display: inline-block;
  width: fit-content;
  text-transform: uppercase;
  margin-top: 2px;
}

.friend-type-tag.friend {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.friend-type-tag.incoming {
  background: rgba(245, 158, 11, 0.15);
  color: var(--orange);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.friend-type-tag.outgoing {
  background: rgba(255, 255, 255, 0.15);
  color: var(--blue-primary);
  border: 1px solid var(--blue-border);
}

.friend-type-tag.blocked {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.friend-actions-col {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-friend-action {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-friend-action:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--blue-border);
  color: #FFFFFF;
  transform: scale(1.08);
}

.btn-friend-action.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--red);
  color: #FF6B6B;
}

.btn-friend-action.success:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--green);
  color: #51CF66;
}

/* LIGHTBOX MODAL */
.lightbox-dialog {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: rgba(10, 10, 10, 0.96);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
}

.lightbox-dialog .lightbox-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #FFFFFF;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background-color 0.15s ease;
}

.lightbox-dialog .lightbox-close-btn:hover {
  background: #E03131;
}

.lightbox-img-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-height: 78vh;
}

.lightbox-img-wrapper img {
  max-width: 86vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

.lightbox-filename {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   SAFETY HUB & ACCOUNT STANDING (CENTRE DE SÉCURITÉ DISCORD)
   ========================================================================== */

.safety-hub-card {
  margin-top: 18px;
  border: 1px solid var(--border-card);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.safety-hub-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
}

.safety-head-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.safety-head-title svg {
  color: var(--blue-primary);
  flex-shrink: 0;
}

.safety-head-title h4 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin: 0;
}

.safety-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.safety-status-badge {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.safety-status-badge.badge-good {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.15);
}

.safety-status-badge.badge-warning {
  background: rgba(234, 179, 8, 0.14);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.35);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.15);
}

.safety-status-badge.badge-danger {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.4);
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.2);
}

.safety-status-badge.badge-critical {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.25);
}

@keyframes cardPulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.8);
  }
  50% {
    box-shadow: 0 0 24px 4px rgba(255, 255, 255, 0.4);
    border-color: var(--blue-primary);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    border-color: var(--border-card);
  }
}

.card-highlight-pulse {
  animation: cardPulseGlow 2.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.safety-hub-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Standing Status Banner */
.safety-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
  position: relative;
  overflow: hidden;
}

.safety-banner.status-good {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(10, 10, 10, 0.95) 100%);
  border-color: rgba(34, 197, 94, 0.28);
}

.safety-banner.status-warning {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.08) 0%, rgba(10, 10, 10, 0.95) 100%);
  border-color: rgba(234, 179, 8, 0.3);
}

.safety-banner.status-danger {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12) 0%, rgba(20, 12, 10, 0.9) 100%);
  border-color: rgba(249, 115, 22, 0.35);
}

.safety-banner.status-critical {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14) 0%, rgba(20, 8, 8, 0.9) 100%);
  border-color: rgba(239, 68, 68, 0.4);
}

.safety-banner-icon-col {
  flex-shrink: 0;
}

.safety-shield-large {
  font-size: 38px;
  display: inline-block;
  filter: drop-shadow(0 4px 10px rgba(255, 255, 255, 0.4));
}

.safety-banner-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.safety-banner-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.safety-banner-title {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.safety-banner-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.safety-level-pill {
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--text-secondary);
}

.safety-level-pill strong {
  color: #FFFFFF;
}

.safety-pill-appeal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
}

.safety-pill-appeal.eligible {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.safety-pill-appeal.not-eligible {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.safety-pill-dsa {
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.15);
  color: #818cf8;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
}

.safety-banner-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

/* Metrics Grid */
.safety-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.safety-metric-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.safety-m-val {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
}

.safety-m-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Clean / Empty State */
.safety-clean-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 20px;
  background: rgba(34, 197, 94, 0.03);
  border: 1px dashed rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-lg);
  gap: 12px;
}

.safety-clean-shield-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4ade80;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.safety-clean-state h4 {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.safety-clean-state p {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.5;
  margin: 0;
}

/* Violations Section */
.safety-violations-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.safety-section-title-wrap h5 {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.3px;
  margin: 0 0 3px 0;
}

.safety-violations-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.safety-violations-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.safety-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.safety-item-card:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.15);
}

.safety-item-card.guild-violation {
  border-left: 3px solid #f97316;
}

.safety-item-card.account-violation {
  border-left: 3px solid #ef4444;
}

.safety-item-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.safety-item-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.safety-guild-avatar-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.safety-guild-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #141414 !important;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.safety-account-strike-icon {
  font-size: 20px;
}

.safety-item-titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.safety-item-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.safety-guild-name {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
}

.safety-tag-source {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.safety-tag-source.guild {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.safety-tag-source.account {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.safety-tag-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.badge-cat-fraud {
  background: rgba(249, 115, 22, 0.14);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.badge-cat-spam {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-cat-harass {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-cat-hate {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-cat-critical {
  background: rgba(225, 29, 72, 0.16);
  color: #fb7185;
  border: 1px solid rgba(225, 29, 72, 0.35);
}

.badge-cat-default {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.safety-item-submeta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.safety-id-tag code {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.3);
  padding: 1px 5px;
  border-radius: 3px;
}

.safety-dot-sep {
  opacity: 0.5;
}

.safety-explainer-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
}

.safety-explainer-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--blue-border);
  color: var(--blue-primary);
}

.safety-item-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.safety-restrictions-box {
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.safety-restrictions-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #f87171;
  letter-spacing: 0.2px;
}

.safety-restrictions-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.safety-action-badge {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.025);
  padding: 6px 10px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.safety-action-bullet {
  font-size: 13px;
  line-height: 1;
}

.safety-action-text {
  line-height: 1.4;
}

.safety-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
}

.safety-exp-info {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.safety-exp-info strong {
  color: #FFFFFF;
}

.safety-appeal-eligible-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 11.5px;
}

.safety-appeal-closed-tag {
  color: var(--text-muted);
  font-size: 11.5px;
}

.safety-appeal-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-appeal-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.25) 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-pill);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15);
}

.btn-appeal-action:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.4) 100%);
  border-color: var(--blue-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.3);
}

.safety-appeal-pending-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
  animation: pendingPulse 2.5s infinite ease-in-out;
}

@keyframes pendingPulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; border-color: rgba(245, 158, 11, 0.6); }
}

.safety-appeal-approved-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
}

/* APPEAL MODAL STYLING */
.appeal-modal-card {
  width: 560px;
  max-width: 92vw;
}

.appeal-target-info {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.appeal-target-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.appeal-info-lbl {
  color: var(--text-muted);
  min-width: 120px;
}

.appeal-target-name {
  color: #FFFFFF;
  font-size: 13px;
}

.appeal-id-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.appeal-textarea-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.btn-subtle-mini {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 2px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-subtle-mini:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--blue-border);
  color: var(--blue-primary);
}

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

.appeal-quick-templates {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.quick-tmpl-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 2px;
}

.btn-pill-tmpl {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pill-tmpl:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #FFFFFF;
}

.btn-pill-tmpl.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--blue-primary);
  color: #FFFFFF;
  font-weight: 600;
}

.appeal-notice-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-top: 14px;
}

.appeal-notice-box svg {
  color: var(--blue-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.appeal-notice-box p {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 960px) {
  .safety-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   RESPONSIVE LAYOUT & WINDOW SIZING BREAKPOINTS (Anti-collision system)
   ========================================================================== */

/* Compact Window Mode: <= 1180px */
@media (max-width: 1180px) {
  .main-content {
    padding: 18px 22px 32px;
  }
  .messaging-layout {
    grid-template-columns: 260px 1fr;
    gap: 10px;
  }
  .profile-body-grid {
    grid-template-columns: 1fr;
    padding: 14px 18px 20px 18px;
  }
}

/* Narrow Window Mode: <= 1040px */
@media (max-width: 1040px) {
  .sidebar {
    width: 205px;
    min-width: 205px;
    max-width: 205px;
    padding: 14px 10px;
  }
  .sidebar-brand-title {
    font-size: 12px;
    letter-spacing: 1px;
  }
  .nav-item {
    font-size: 12.5px;
    padding: 8px 10px;
    gap: 8px;
  }
  .main-content {
    padding: 16px 16px 28px;
  }
  .messaging-layout {
    grid-template-columns: 235px 1fr;
    gap: 8px;
  }
  .chat-header {
    padding: 6px 12px;
  }
  .chat-header-actions .btn-subtle-sm span {
    display: none;
  }
  .chat-search-wrap input {
    width: 95px;
  }
  .chat-search-wrap input:focus {
    width: 140px;
  }
  .token-subtab-btn {
    padding: 7px 12px;
    font-size: 12px;
  }
  .friends-search-wrap input {
    width: 110px;
  }
  .friends-search-wrap input:focus {
    width: 155px;
  }
}

/* Ultra-Compact Window Mode: <= 960px (Near MIN_WIDTH 900px) */
@media (max-width: 960px) {
  .messaging-layout {
    grid-template-columns: 215px 1fr;
  }
  .conv-name {
    max-width: 110px;
  }
  .conv-snippet {
    max-width: 110px;
  }
  .chat-header-name {
    max-width: 130px;
  }
  .btn-load-older span {
    font-size: 11px;
  }
  .friends-top-actions .btn-primary-sm span {
    font-size: 11px;
  }
}

/* Reduced Window Height: <= 740px (Near MIN_HEIGHT 600px) */
@media (max-height: 740px) {
  .main-content {
    padding-top: 14px;
    padding-bottom: 20px;
  }
  .view-header {
    margin-bottom: 14px;
  }
  .messaging-layout {
    height: calc(100vh - 175px);
    min-height: 380px;
  }
  .friends-list-wrapper {
    max-height: calc(100vh - 200px);
    min-height: 340px;
  }
  .terminal-card {
    height: calc(100vh - 180px);
    min-height: 320px;
  }
}

/* Fullscreen / High-Resolution Displays: >= 1600px */
@media (min-width: 1600px) {
  .main-content {
    padding: 26px 36px 48px;
  }
  .messaging-layout {
    grid-template-columns: 320px 1fr;
    height: calc(100vh - 210px);
    max-height: calc(100vh - 170px);
  }
  .friends-list-wrapper {
    max-height: calc(100vh - 220px);
  }
  .terminal-card {
    height: calc(100vh - 210px);
  }
}

/* Maximized Window Mode Adjustments */
body.is-maximized .app-layout {
  height: calc(100vh - 40px);
}

/* ==========================================================================
   DISCORD WEB BROWSER SUBTAB
   ========================================================================== */
.discord-browser-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.discord-browser-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25);
  flex-wrap: wrap;
}

.browser-nav-btn-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.browser-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.browser-tool-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--blue-border);
  transform: translateY(-1px);
}

.browser-tool-btn:active {
  transform: scale(0.96);
}

.browser-address-bar {
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.browser-address-bar:focus-within {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.browser-lock-icon {
  display: flex;
  align-items: center;
  color: #34C759;
}

.browser-url-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono, monospace);
  font-size: 12px;
}

.browser-go-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.browser-go-btn:hover {
  color: var(--blue-primary);
}

.browser-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.browser-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
}

#subtab-panel-browser {
  overflow: hidden;
}

.discord-browser-mount {
  position: relative;
  width: 100%;
  height: calc(100vh - 215px);
  min-height: 420px;
  background: #000000;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.4);
}

.discord-browser-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: radial-gradient(circle at center, #141414 0%, #000000 100%);
  color: var(--text-secondary);
  pointer-events: none;
}

.discord-browser-placeholder.hidden {
  display: none !important;
}

.browser-loading-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--blue-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.placeholder-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

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

/* ==========================================================================
   VOX LAUNCH SPLASH SCREEN & TRANSITION (MINIMALIST)
   ========================================================================== */
.app-splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background-color: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  cursor: default;
  -webkit-app-region: drag;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-splash-screen.splash-fade-out {
  opacity: 0 !important;
  transform: scale(1.04) !important;
  filter: blur(8px) !important;
  pointer-events: none !important;
}

/* Ambient Lighting behind Logo */
.splash-ambient-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.06) 50%, transparent 70%);
  filter: blur(55px);
  pointer-events: none;
  animation: splashGlowBreathe 3s infinite alternate ease-in-out;
}

/* Centered Logo & Title */
.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  pointer-events: none;
}

.splash-logo-container {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-logo-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.75));
  animation: splashLogoEnter 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards,
             splashLogoHover 3s ease-in-out 0.75s infinite alternate;
}

.splash-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 14px;
  margin-right: -14px;
  background: linear-gradient(135deg, #FFFFFF 0%, #E4E4E7 45%, #FFFFFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
  animation: splashTitleEnter 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.15s backwards;
}

/* Animations */
@keyframes splashLogoEnter {
  0% {
    opacity: 0;
    transform: scale(0.65) translateY(10px);
    filter: blur(10px) drop-shadow(0 0 40px rgba(255, 255, 255, 0.8));
  }
  70% {
    transform: scale(1.04) translateY(-2px);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes splashLogoHover {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-6px);
  }
}

@keyframes splashTitleEnter {
  0% {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes splashGlowBreathe {
  0% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.7;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1;
  }
}

/* ==========================================================================
   GLOBAL LOGO IMAGE GUARDS (Strict dimension constraints)
   ========================================================================== */
.mobile-top-logo-img {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  pointer-events: none !important;
  display: inline-block !important;
  filter: drop-shadow(0 2px 6px rgba(255, 255, 255, 0.25));
}

.sidebar-spine-logo-img {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.25));
}

/* ==========================================================================
   STRICT ADMIN ACCESS CONTROL (HIDDEN UNLESS EXPLICITLY AUTHORIZED)
   ========================================================================== */
#nav-item-admin,
#sidebar-admin-link {
  display: none !important;
}

#nav-item-admin.is-admin-authorized {
  display: flex !important;
}

#sidebar-admin-link.is-admin-authorized {
  display: inline-flex !important;
}



