/* Enterprise Professional UI Design System */

@font-face {
  font-family: 'Minecraft';
  src: url('assets/Minecraft.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'MinecraftSeven';
  src: url('assets/MinecraftSeven.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Global input focus & select helper to guarantee search bars are fully typing-friendly */
input[type="text"],
input[type="password"],
input[type="search"],
.filter-input,
.search-wrap input,
textarea {
  user-select: text !important;
  -webkit-user-select: text !important;
  pointer-events: auto !important;
  cursor: text !important;
}

:root {
  --bg-main: #080b11;
  --bg-sidebar: #0f131a;
  --bg-card: #151a24;
  --border-block: rgba(255, 255, 255, 0.08);
  --accent-gold: #f59e0b;
  --accent-yellow: #fbbf24;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-cyan: #06b6d4;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #4b5563;
  --font-family: 'MinecraftSeven', 'Minecraft', 'Inter', 'Outfit', sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: linear-gradient(-45deg, #05070a, #0b0f19, #080d1a, #05070b);
  background-size: 400% 400%;
  animation: cosmicBackground 18s ease infinite;
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  user-select: none;
}

@keyframes cosmicBackground {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Custom Blocky Scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #000000;
  border-left: 3px solid #3c3c3c;
}

::-webkit-scrollbar-thumb {
  background: #5c5c5c;
  border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* View Containers */
.view-container {
  display: flex;
  flex-direction: row;
  height: 100vh;
  width: 100vw;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
}

.view-container.hidden {
  display: none;
}

/* ──────────────────────────────────────────────────────────
   LOGIN VIEW
   ────────────────────────────────────────────────────────── */

#login-container {
  justify-content: center;
  align-items: center;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-block);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-lg), 0 0 40px rgba(0, 0, 0, 0.5);
  position: relative;
  padding: 40px 30px;
}

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 30px;
}

.login-logo {
  height: 96px;
  width: auto;
  object-fit: contain;
  margin-bottom: 20px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  background: var(--bg-main);
  border: 1px solid var(--border-block);
  border-radius: var(--border-radius-md);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: var(--font-family);
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 48px;
}

.toggle-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
}

/* Modern Button style */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: linear-gradient(135deg, var(--accent-cyan), #0891b2);
  border: none;
  border-radius: var(--border-radius-md);
  color: #ffffff;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 14px;
  padding: 12px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(6, 182, 212, 0.3);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.2);
}

.error-banner {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid var(--accent-red);
  border-radius: var(--border-radius-md);
  color: var(--accent-red);
  padding: 12px 16px;
  font-size: 12px;
  margin-bottom: 24px;
}

.error-banner.hidden {
  display: none;
}

/* ──────────────────────────────────────────────────────────
   DASHBOARD VIEW (SIDEBAR + MAIN CONTENT)
   ────────────────────────────────────────────────────────── */

.sidebar {
  width: 260px;
  flex-shrink: 0;
  flex-grow: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-block);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
  width: 76px;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-block);
  transition: padding 0.3s ease;
}

.sidebar.collapsed .sidebar-header {
  padding: 24px 10px;
}

.sidebar-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed .sidebar-logo {
  height: 32px;
  margin-bottom: 12px;
}

.staff-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
  border: 1px solid var(--border-block);
  border-radius: var(--border-radius-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed .staff-profile {
  padding: 8px;
  gap: 0;
  justify-content: center;
}

.avatar {
  width: 36px;
  height: 36px;
  background: var(--accent-gold);
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.staff-info {
  display: flex;
  flex-direction: column;
  transition: opacity 0.2s ease, width 0.2s ease;
  opacity: 1;
  width: auto;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar.collapsed .staff-info {
  opacity: 0;
  width: 0;
  pointer-events: none;
}

.staff-ign {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.staff-role {
  font-size: 10px;
  color: var(--accent-cyan);
  margin-top: 1px;
}

.xp-bar-container {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  padding: 0 16px;
  width: 100%;
  box-sizing: border-box;
  transition: opacity 0.2s ease, height 0.2s ease;
  opacity: 1;
  height: auto;
  overflow: hidden;
}

.sidebar.collapsed .xp-bar-container {
  opacity: 0;
  height: 0;
  margin-top: 0;
  pointer-events: none;
}

.sidebar-nav {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
  transition: padding 0.3s ease;
}

.sidebar.collapsed .sidebar-nav {
  padding: 20px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  border-radius: var(--border-radius-md);
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 13px;
  padding: 10px 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  white-space: nowrap;
}

.sidebar.collapsed .nav-item {
  padding: 10px 0;
  justify-content: center;
  border-left-width: 3px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-left-color: rgba(255, 255, 255, 0.15);
}

.nav-item:hover .nav-icon-img {
  transform: scale(1.08);
}

.nav-item.active {
  background: rgba(6, 182, 212, 0.08);
  color: var(--text-primary);
  font-weight: 600;
  border-left-color: var(--accent-gold);
  box-shadow: inset 1px 0 0 rgba(255,255,255,0.02);
}

.nav-icon-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.nav-text {
  transition: opacity 0.2s ease, transform 0.2s ease;
  opacity: 1;
  transform: translateX(0);
}

.sidebar.collapsed .nav-text {
  opacity: 0;
  width: 0;
  transform: translateX(-10px);
  pointer-events: none;
  display: inline-block;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-block);
  transition: padding 0.3s ease;
}

.sidebar.collapsed .sidebar-footer {
  padding: 20px 8px;
}

.sidebar-bee-container {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  width: 100%;
  transition: opacity 0.2s ease, height 0.2s ease;
  opacity: 1;
  height: auto;
}

.sidebar.collapsed .sidebar-bee-container {
  opacity: 0;
  height: 0;
  margin-bottom: 0;
  pointer-events: none;
}

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-block);
  border-radius: var(--border-radius-md);
  color: var(--accent-red);
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 13px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar.collapsed .btn-logout {
  padding: 10px 0;
  border-color: transparent;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: var(--accent-red);
}

/* Main Content Area */
.main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-main);
  }

  .content-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-block);
    background-color: var(--bg-sidebar);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .content-header h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'MinecraftSeven', 'Minecraft', sans-serif;
  }

  /* Hexagon Hamburger Button */
  .hamburger-btn {
    position: relative;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: visible;
    flex-shrink: 0;
    outline: none;
  }

  .hamburger-hexagon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.2s ease, fill 0.2s ease;
  }

  .hamburger-btn:hover .hamburger-hexagon {
    transform: rotate(30deg);
    stroke: var(--accent-gold);
    fill: rgba(245, 158, 11, 0.04);
  }

  .hamburger-btn.active .hamburger-hexagon {
    transform: rotate(90deg);
    stroke: var(--accent-cyan);
    fill: rgba(6, 182, 212, 0.04);
  }

  .hamburger-lines {
    position: relative;
    width: 16px;
    height: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
  }

  .hamburger-lines .line {
    width: 100%;
    height: 1.5px;
    background-color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: 1px 1px;
  }

  .hamburger-btn:hover .line {
    background-color: var(--text-primary);
  }

  .hamburger-btn.active .line {
    background-color: var(--text-primary);
  }

  .hamburger-btn.active .line:nth-child(1) {
    transform: rotate(45deg);
  }

  .hamburger-btn.active .line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
  }

  .hamburger-btn.active .line:nth-child(3) {
    transform: rotate(-45deg);
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
  }

  .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    animation: statusPulseGreen 2.2s infinite ease-in-out;
  }

  .tab-pane {
    padding: 30px;
    flex-grow: 1;
    overflow-y: auto;
    background-color: var(--bg-main);
    animation: tabFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
  }

  @keyframes tabFadeIn {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* State Handlers Styling */
  .loading-view,
  .empty-view,
  .error-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 250px;
    text-align: center;
  }

  .spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 15px;
  }

  .empty-icon {
    font-size: 32px;
    margin-bottom: 12px;
  }

  .loading-text,
  .empty-title,
  .error-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
  }

  .empty-subtitle,
  .error-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.4;
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  /* ──────────────────────────────────────────────────────────
   VIEW COMPONENT STYLING
   ────────────────────────────────────────────────────────── */

  /* 1. Announcements View */
  .announcement-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  .announcement-card {
    background: var(--bg-card);
    border: 1px solid var(--border-block);
    border-radius: var(--border-radius-md);
    padding: 20px;
    box-shadow: var(--box-shadow-md);
    transition: var(--transition);
  }

  .announcement-card:hover {
    border-color: var(--border-block-active);
    box-shadow: var(--box-shadow-lg);
  }

  .announcement-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
  }

  .announcement-category {
    color: var(--accent-cyan);
    font-weight: 600;
  }

  .announcement-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--accent-gold);
  }

  .announcement-body {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
  }

  /* 2. Monitor View */
  .monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
  }

  .test-card {
    background: var(--bg-card);
    border: 1px solid var(--border-block);
    border-radius: var(--border-radius-md);
    padding: 16px;
    box-shadow: var(--box-shadow-md);
    transition: var(--transition);
  }

  .test-card:hover {
    border-color: var(--border-block-active);
  }

  .test-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
  }

  .test-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border: 1px solid var(--border-block);
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.05);
  }

  .test-badge.high {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
  }

  .test-badge.open {
    color: var(--accent-green);
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
  }

  .test-gamemode {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-gold);
  }

  .test-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 8px;
  }

  .leaderboard-container {
      background: var(--bg-card);
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-lg);
      box-shadow: var(--box-shadow-md);
      overflow: hidden;
    }

    .leaderboard-title {
      padding: 20px 24px;
      border-bottom: 1px solid var(--border-block);
      font-size: 14px;
      font-weight: 600;
      color: var(--accent-gold);
      font-family: 'MinecraftSeven', 'Minecraft', sans-serif;
    }

    .leaderboard-table {
      width: 100%;
      border-collapse: collapse;
      text-align: left;
    }

    .leaderboard-table th {
      padding: 14px 24px;
      font-size: 11px;
      font-weight: 600;
      color: var(--text-secondary);
      border-bottom: 1px solid var(--border-block);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .leaderboard-table td {
      padding: 14px 24px;
      font-size: 13px;
      border-bottom: 1px solid var(--border-block);
      color: var(--text-primary);
    }

    .leaderboard-table tr:last-child td {
      border-bottom: none;
    }

    .leaderboard-table tr:hover td {
      background: rgba(255, 255, 255, 0.01);
    }

    .rank-badge {
      display: inline-flex;
      width: 22px;
      height: 22px;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 11px;
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-sm);
      background: rgba(255, 255, 255, 0.05);
    }

    .rank-badge.rank-1 {
      background: var(--accent-gold);
      color: #000000;
      border-color: var(--accent-gold);
    }

    .rank-badge.rank-2 {
      background: #9ca3af;
      color: #000000;
      border-color: #9ca3af;
    }

    .rank-badge.rank-3 {
      background: #b45309;
      color: #ffffff;
      border-color: #b45309;
    }

    /* 4. Queue Management */
    .queues-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 15px;
    }

    .queue-card {
      background: var(--bg-card);
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-md);
      padding: 20px;
      box-shadow: var(--box-shadow-md);
      transition: var(--transition);
    }

    .queue-card:hover {
      border-color: var(--border-block-active);
    }

    .queue-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
    }

    .queue-name {
      font-size: 14px;
      font-weight: 600;
      color: var(--accent-gold);
    }

    .queue-status-badge {
      font-size: 10px;
      font-weight: 600;
      padding: 2px 8px;
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-sm);
      background: var(--accent-green);
      color: #000000;
    }

    .queue-status-badge.closed {
      background: var(--accent-red);
      color: #ffffff;
      border-color: var(--accent-red);
    }

    .queue-progress-bar {
      height: 6px;
      background: rgba(255, 255, 255, 0.05);
      border-radius: 3px;
      margin-top: 12px;
      overflow: hidden;
    }

    .queue-progress-fill {
      height: 100%;
      background: var(--accent-gold);
      border-radius: 3px;
      width: 0%;
    }

    /* 5. High-Tier Tracking */
    .hightier-table-container {
      background: var(--bg-card);
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-lg);
      box-shadow: var(--box-shadow-md);
      overflow: hidden;
    }

    .hightier-status-text {
      font-weight: 600;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .hightier-status-text.queued {
      color: var(--accent-cyan);
    }

    .hightier-status-text.matched {
      color: var(--accent-gold);
    }

    .hightier-status-text.testing {
      color: #8b5cf6;
    }

    .hightier-status-text.completed {
      color: var(--accent-green);
    }

    /* -------------------------------------------
   FILTER BAR
   ------------------------------------------- */
    .filter-bar {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 18px;
      flex-wrap: wrap;
    }

    .search-wrap {
      position: relative;
      flex: 1;
      min-width: 180px;
    }

    .search-icon {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 13px;
      pointer-events: none;
      color: var(--text-muted);
    }

    .filter-input {
      width: 100%;
      padding: 8px 12px 8px 36px;
      background: var(--bg-card);
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-md);
      color: var(--text-primary);
      font-family: inherit;
      font-size: 13px;
      outline: none;
      box-sizing: border-box;
      transition: var(--transition);
    }

    .filter-input:focus {
      border-color: var(--accent-cyan);
      box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
    }

    .filter-input::placeholder {
      color: var(--text-muted);
    }

    .filter-select {
      padding: 8px 12px;
      background: var(--bg-card);
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-md);
      color: var(--text-primary);
      font-family: inherit;
      font-size: 13px;
      outline: none;
      cursor: pointer;
      box-sizing: border-box;
      transition: var(--transition);
    }

    .filter-select:focus {
      border-color: var(--accent-cyan);
      box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
    }

    /* Custom Premium Select Dropdown */
    .custom-select {
      position: relative;
      display: inline-block;
      width: 220px;
      user-select: none;
      font-size: 13px;
      font-family: inherit;
      z-index: 95;
    }

    .custom-select-trigger {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 14px;
      background: var(--bg-card);
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-md);
      color: var(--text-primary);
      cursor: pointer;
      transition: var(--transition);
      height: 38px;
    }

    .custom-select-trigger:hover {
      border-color: rgba(255, 255, 255, 0.15);
      background: rgba(255, 255, 255, 0.02);
    }

    .custom-select-trigger.open {
      border-color: var(--accent-gold);
      box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
    }

    .custom-select-trigger .selected-text {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
    }

    .custom-select-arrow {
      width: 0;
      height: 0;
      border-left: 4.5px solid transparent;
      border-right: 4.5px solid transparent;
      border-top: 4.5px solid var(--text-secondary);
      margin-left: 8px;
      transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      flex-shrink: 0;
    }

    .custom-select-trigger.open .custom-select-arrow {
      transform: rotate(180deg);
      border-top-color: var(--accent-gold);
    }

    .custom-options-menu {
      position: absolute;
      top: calc(100% + 6px);
      left: 0;
      right: 0;
      background: var(--bg-sidebar);
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-md);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
      z-index: 100;
      max-height: 240px;
      overflow-y: auto;
      animation: select-fade-in 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes select-fade-in {
      from { opacity: 0; transform: translateY(-6px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .custom-options-menu.hidden {
      display: none;
    }

    .custom-option {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 14px;
      cursor: pointer;
      color: var(--text-secondary);
      transition: all 0.15s ease;
    }

    .custom-option:hover {
      background: rgba(255, 255, 255, 0.04);
      color: var(--text-primary);
    }

    .custom-option.active {
      background: rgba(245, 158, 11, 0.08);
      color: var(--accent-gold);
      font-weight: 600;
      border-left: 3px solid var(--accent-gold);
      padding-left: 11px;
    }

    .custom-option img {
      width: 16px;
      height: 16px;
      image-rendering: pixelated;
      object-fit: contain;
    }

    .custom-select-trigger img {
      width: 16px;
      height: 16px;
      image-rendering: pixelated;
      object-fit: contain;
    }

    /* Fallback and chart select styling */
    select,
    .chart-type-select {
      background: var(--bg-sidebar) !important;
      border: 1px solid var(--border-block) !important;
      border-radius: var(--border-radius-sm) !important;
      color: var(--text-primary) !important;
      font-family: var(--font-family) !important;
      font-size: 11px;
      padding: 5px 10px;
      outline: none;
      cursor: pointer;
      transition: var(--transition);
      appearance: none;
      -webkit-appearance: none;
      background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
      background-repeat: no-repeat !important;
      background-position: right 8px center !important;
      background-size: 12px !important;
      padding-right: 26px !important;
    }

    select:hover,
    .chart-type-select:hover {
      border-color: rgba(255, 255, 255, 0.15) !important;
      background-color: rgba(255, 255, 255, 0.02) !important;
    }

    select:focus,
    .chart-type-select:focus {
      border-color: var(--accent-gold) !important;
      box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.1) !important;
    }

    .result-count {
      font-size: 12px;
      font-weight: 500;
      color: var(--text-secondary);
      white-space: nowrap;
    }

    .test-results-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 12px;
    }

    .test-result-card {
      background: rgba(21, 26, 36, 0.45);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid rgba(255, 255, 255, 0.05);
      border-radius: var(--border-radius-md);
      padding: 16px;
      box-shadow: var(--box-shadow-md);
      transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .test-result-card:hover {
      transform: translateY(-2px);
      border-color: rgba(255, 255, 255, 0.15);
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    }

    .trc-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }

    .gm-badge {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      padding: 3px 8px;
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-sm);
      background: rgba(255, 255, 255, 0.05);
    }

    .trc-date {
      font-size: 10px;
      color: var(--text-muted);
    }

    .trc-players {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .trc-player {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      flex: 1;
      text-align: center;
    }

    .trc-player-skin {
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-sm);
      object-fit: cover;
      display: block;
    }

    .trc-skin-fb {
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--accent-gold);
      background: var(--bg-main);
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-sm);
      font-weight: 700;
    }

    .trc-player-label {
      font-size: 9px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-muted);
    }

    .trc-player-ign {
      font-size: 11px;
      font-weight: 700;
      max-width: 90px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .trc-center {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 5px;
      min-width: 60px;
    }

    .trc-vs {
      font-size: 16px;
      font-weight: 700;
      color: var(--accent-gold);
    }

    .trc-tier-row {
      display: flex;
      align-items: center;
      gap: 2px;
      font-size: 11px;
      font-weight: 700;
    }

    .trc-tier-old {
      color: var(--accent-red);
    }

    .trc-tier-arrow {
      color: var(--text-muted);
    }

    .trc-tier-new {
      color: var(--accent-green);
    }

    .trc-tier-none {
      font-size: 9px;
      color: var(--text-muted);
      font-weight: 400;
    }

    .trc-region {
      font-size: 9px;
      color: var(--text-muted);
    }

    .trc-score {
      font-size: 10px;
      font-weight: 700;
      color: var(--accent-gold);
      background: rgba(245, 158, 11, 0.08);
      padding: 2px 6px;
      border: 1px solid rgba(245, 158, 11, 0.15);
      border-radius: 4px;
    }

    .trc-notes {
      margin-top: 10px;
      padding-top: 8px;
      border-top: 1px solid var(--border-block);
      font-size: 10px;
      color: var(--text-muted);
      font-style: italic;
    }

    /* -------------------------------------------
   ENHANCED TESTER LEADERBOARD
   ------------------------------------------- */
    .tester-row {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 20px;
      cursor: pointer;
      border-bottom: 1px solid var(--border-block);
      transition: var(--transition);
    }

    .tester-row:hover {
      background: rgba(255, 255, 255, 0.02);
    }

    .tester-row:last-child {
      border-bottom: none;
    }

    .tester-rank-col {
      flex-shrink: 0;
      width: 28px;
    }

    .tester-skin-col {
      flex-shrink: 0;
    }

    .tester-skin-sm {
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-sm);
      object-fit: cover;
      display: block;
    }

    .tester-ign-col {
      flex: 2;
      font-size: 13px;
      font-weight: 600;
    }

    .tester-count-col {
      flex: 1;
      text-align: center;
      font-size: 13px;
      font-weight: 700;
      color: var(--accent-gold);
    }

    .tester-rating-col {
      flex: 1;
      text-align: center;
      font-size: 12px;
      color: var(--text-secondary);
    }

    .tester-date-col {
      flex: 1;
      text-align: center;
      font-size: 11px;
      color: var(--text-muted);
    }

    .view-profile-btn {
      font-size: 10px;
      padding: 4px 10px;
      background: transparent;
      border: 1px solid var(--accent-gold);
      border-radius: var(--border-radius-sm);
      color: var(--accent-gold);
      cursor: pointer;
      transition: var(--transition);
      font-family: inherit;
      font-weight: 600;
      white-space: nowrap;
    }

    .view-profile-btn:hover {
      background: var(--accent-gold);
      color: #000000;
    }

    /* -------------------------------------------
   TESTER PROFILE MODAL
   ------------------------------------------- */
    .tester-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(8px);
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .tester-modal-box {
      background: var(--bg-card);
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-lg);
      box-shadow: var(--box-shadow-lg), 0 10px 40px rgba(0, 0, 0, 0.4);
      width: 580px;
      max-width: 92vw;
      max-height: 80vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    /* Premium Profile Modal Side-by-Side Tiers */
    .premium-profile-modal {
      width: 860px !important;
      max-width: 95vw !important;
      max-height: 90vh !important;
      display: flex;
      flex-direction: column;
      position: relative;
    }

    .modal-close-btn-wrap {
      position: absolute;
      top: 20px;
      right: 20px;
      z-index: 10;
    }

    .profile-modal-grid {
      display: flex;
      flex-direction: row;
      flex: 1;
      height: 100%;
      overflow: hidden;
      gap: 20px;
    }

    .profile-left-panel {
      flex: 1.1;
      display: flex;
      flex-direction: column;
      padding-right: 10px;
      overflow-y: auto;
      max-height: 560px;
    }

    .profile-right-panel {
      flex: 1.3;
      overflow-y: auto;
      max-height: 560px;
      border-left: 1px solid var(--border-block);
      padding-left: 20px;
      padding-bottom: 20px;
    }

    .profile-left-panel::-webkit-scrollbar,
    .profile-right-panel::-webkit-scrollbar {
      width: 4px;
    }
    .profile-left-panel::-webkit-scrollbar-thumb,
    .profile-right-panel::-webkit-scrollbar-thumb {
      background: var(--border-block);
      border-radius: 2px;
    }

    .tester-modal-header {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 20px 24px;
      border-bottom: 1px solid var(--border-block);
      background: var(--bg-sidebar);
    }

    .modal-big-skin {
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-sm);
      object-fit: cover;
      display: block;
      flex-shrink: 0;
    }

    .modal-tester-name {
      font-size: 18px;
      font-weight: 700;
      color: var(--accent-gold);
    }

    .modal-tester-sub {
      font-size: 11px;
      color: var(--text-secondary);
      margin-top: 2px;
    }

    .modal-close {
      margin-left: auto;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--border-block);
      border-radius: 50%;
      color: var(--text-secondary);
      font-size: 14px;
      width: 32px;
      height: 32px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: var(--transition);
      flex-shrink: 0;
    }

    .modal-close:hover {
      border-color: var(--accent-red);
      color: var(--accent-red);
      background: rgba(239, 68, 68, 0.08);
    }

    .tester-modal-stats {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1px;
      background: var(--border-block);
      border-bottom: 1px solid var(--border-block);
    }

    .modal-stat-cell {
      padding: 16px 12px;
      text-align: center;
      background: var(--bg-sidebar);
    }

    .modal-stat-num {
      font-size: 20px;
      font-weight: 700;
      color: var(--accent-gold);
    }

    .modal-stat-lbl {
      font-size: 10px;
      color: var(--text-secondary);
      margin-top: 2px;
    }

    .tester-modal-body {
      overflow-y: auto;
      flex: 1;
      padding: 20px 24px;
    }

    .modal-section-title {
      font-size: 11px;
      font-weight: 600;
      color: var(--text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 12px;
    }

    .modal-test-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 0;
      border-bottom: 1px solid var(--border-block);
      font-size: 13px;
    }

    .modal-test-row:last-child {
      border-bottom: none;
    }

    .modal-mini-skin {
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-sm);
      object-fit: cover;
      display: block;
      flex-shrink: 0;
    }

    .modal-test-ign {
      flex: 1;
      font-weight: 600;
    }

    .modal-test-gm {
      font-size: 10px;
      padding: 2px 8px;
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-sm);
      background: rgba(255, 255, 255, 0.03);
      white-space: nowrap;
    }

    .modal-test-tier {
      font-size: 11px;
      color: var(--accent-green);
      font-weight: 700;
      min-width: 70px;
      text-align: center;
    }

    .modal-test-date {
      font-size: 11px;
      color: var(--text-secondary);
      min-width: 60px;
      text-align: right;
    }

    /* -------------------------------------------
   RICH MEDIA & ICONS LAYOUT
------------------------------------------- */
    .xp-bar-container {
      display: flex;
      justify-content: center;
      margin-top: 10px;
      padding: 0 16px;
      width: 100%;
      box-sizing: border-box;
    }

    .xp-bar-gif {
      width: 100%;
      max-width: 180px;
      height: 8px;
      image-rendering: pixelated;
      object-fit: fill;
      border: 1px solid #111;
    }

    .sidebar-bee-container {
      display: flex;
      justify-content: center;
      margin-bottom: 12px;
      width: 100%;
    }

    .sidebar-bee {
      width: 32px;
      height: 32px;
      image-rendering: pixelated;
      object-fit: contain;
    }

    .gm-icon-sm {
      width: 14px;
      height: 14px;
      vertical-align: middle;
      object-fit: contain;
      margin-right: 4px;
      display: inline-block;
      image-rendering: pixelated;
    }

    .region-flag-sm {
      width: 14px;
      height: 9px;
      vertical-align: middle;
      object-fit: cover;
      margin-right: 4px;
      border: 1px solid #000;
      display: inline-block;
    }

    .combat-badge-sm {
      width: 14px;
      height: 14px;
      vertical-align: middle;
      object-fit: contain;
      margin-right: 4px;
      display: inline-block;
    }

    .combat-badge-md {
      width: 20px;
      height: 20px;
      vertical-align: middle;
      object-fit: contain;
      display: inline-block;
    }

    /* Ensure flex alignment for elements containing icons */
    .trc-player-ign,
    .tester-ign-col,
    .modal-tester-name,
    .modal-test-row>div {
      display: flex !important;
      align-items: center;
      gap: 4px;
    }

    .trc-region,
    .test-info-val {
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      gap: 4px;
    }

    .modal-test-gm {
      display: inline-flex !important;
      align-items: center;
      gap: 4px;
    }

    /* Queue Action Buttons */
    .open-btn {
      border-color: var(--accent-green) !important;
      color: var(--accent-green) !important;
    }

    .open-btn:hover {
      background: var(--accent-green) !important;
      color: #000 !important;
    }

    .close-btn {
      border-color: var(--accent-red) !important;
      color: var(--accent-red) !important;
    }

    .close-btn:hover {
      background: var(--accent-red) !important;
      color: #fff !important;
    }

    /* User Profile Cards */
    .upc-skin {
      image-rendering: pixelated;
      border: 3px solid #000;
      object-fit: cover;
      display: block;
    }

    .user-discord-link:hover {
      text-decoration: underline !important;
    }

    /* Clickable Rows & Lazy loading overlays */
    .clickable-row {
      cursor: pointer;
      transition: background-color 0.1s steps(4);
    }

    .clickable-row:hover td {
      background: rgba(255, 255, 255, 0.05) !important;
    }

    .skin-loading-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.85);
      z-index: 2000;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .skin-loading-box {
      background: var(--bg-card);
      border: 3px solid #000;
      box-shadow: inset -3px -3px 0 #1e1e24, inset 3px 3px 0 #4e4e5a;
      padding: 30px;
      width: 320px;
      max-width: 90vw;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
    }

    .skin-loading-text {
      font-size: 14px;
      color: var(--text-primary);
      text-align: center;
      text-shadow: 1px 1px 0 #000;
    }

    .skin-loading-progress-bar {
      width: 100%;
      height: 12px;
      background: #000;
      border: 2px solid var(--border-block);
      position: relative;
      overflow: hidden;
    }

    .skin-loading-progress-fill {
      height: 100%;
      background: var(--accent-gold);
      width: 0%;
      transition: width 0.1s steps(4);
    }

    /* ──────────────────────────────────────────────────────────
   ANNOUNCEMENTS MANAGEMENT STYLING
   ────────────────────────────────────────────────────────── */
    .ann-toolbar {
      display: flex;
      gap: 12px;
      align-items: center;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }

    .ann-stats-row {
      display: flex;
      gap: 12px;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }

    .ann-stat-box {
      background: var(--bg-card);
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-md);
      padding: 16px 12px;
      flex: 1;
      min-width: 120px;
      text-align: center;
      transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
      box-shadow: var(--box-shadow-sm);
    }

    .ann-stat-box:hover {
      transform: translateY(-2px);
      border-color: rgba(255, 255, 255, 0.12);
    }

    .ann-stat-box.posts {
      border-bottom: 3px solid var(--accent-cyan);
    }
    .ann-stat-box.posts:hover {
      box-shadow: 0 4px 20px rgba(6, 182, 212, 0.15);
    }

    .ann-stat-box.live {
      border-bottom: 3px solid var(--accent-green);
    }
    .ann-stat-box.live .ann-stat-num {
      color: var(--accent-green);
    }
    .ann-stat-box.live:hover {
      box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
    }

    .ann-stat-box.drafts {
      border-bottom: 3px solid var(--accent-gold);
    }
    .ann-stat-box.drafts .ann-stat-num {
      color: var(--accent-gold);
    }
    .ann-stat-box.drafts:hover {
      box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
    }

    .ann-stat-box.archived {
      border-bottom: 3px solid var(--accent-red);
    }
    .ann-stat-box.archived .ann-stat-num {
      color: var(--accent-red);
    }
    .ann-stat-box.archived:hover {
      box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15);
    }

    .ann-stat-box.views {
      border-bottom: 3px solid var(--accent-cyan);
    }
    .ann-stat-box.views .ann-stat-num {
      color: var(--accent-cyan);
    }
    .ann-stat-box.views:hover {
      box-shadow: 0 4px 20px rgba(6, 182, 212, 0.15);
    }

    .ann-stat-box.top-post {
      border: 1px solid rgba(139, 92, 246, 0.2);
      border-bottom: 3px solid #8b5cf6;
      flex: 2;
      min-width: 200px;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    .ann-stat-box.top-post .ann-stat-num {
      color: #8b5cf6;
      font-size: 13px;
    }
    .ann-stat-box.top-post .ann-stat-lbl.title {
      color: var(--text-primary);
      margin-top: 4px;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .ann-stat-box.top-post:hover {
      box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
    }

    .ann-stat-num {
      font-size: 22px;
      font-weight: 700;
      color: var(--text-primary);
      margin-bottom: 4px;
    }

    .ann-stat-lbl {
      font-size: 10px;
      color: var(--text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .ann-cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
      gap: 20px;
      margin-top: 20px;
    }

    .ann-mgmt-card {
      background: var(--bg-card);
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-lg);
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      box-shadow: var(--box-shadow-md);
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .ann-mgmt-card:hover {
      border-color: rgba(255, 255, 255, 0.12);
      box-shadow: var(--box-shadow-lg);
    }

    .ann-mgmt-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 11px;
    }

    .ann-mgmt-left {
      display: flex;
      gap: 6px;
      align-items: center;
    }

    .ann-status-pill {
      font-size: 9px;
      font-weight: bold;
      padding: 2px 6px;
      border: 1px solid;
    }

    .ann-category-tag {
      font-size: 9px;
      background: #000;
      color: var(--accent-cyan);
      padding: 2px 6px;
      border: 1px solid var(--border-block);
    }

    .ann-mgmt-meta {
      color: var(--text-muted);
      display: flex;
      gap: 8px;
    }

    .ann-mgmt-title {
      font-size: 16px;
      color: var(--accent-gold);
      text-shadow: 1px 1px 0 #000;
      font-weight: bold;
    }

    .ann-mgmt-preview {
      font-size: 12px;
      color: var(--text-primary);
      line-height: 1.4;
      flex: 1;
    }

    .ann-mgmt-author {
      font-size: 10px;
      color: var(--text-secondary);
      font-style: italic;
    }

    .ann-mgmt-actions {
      display: flex;
      gap: 8px;
      margin-top: 12px;
      border-top: 1px solid var(--border-block);
      padding-top: 12px;
    }

    .ann-action-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--border-block);
      border-radius: var(--border-radius-sm);
      padding: 7px 12px;
      font-size: 11px;
      font-weight: 600;
      font-family: var(--font-family);
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      flex: 1;
      height: 32px;
    }

    .ann-action-btn:hover {
      transform: translateY(-1.5px);
    }

    .ann-action-btn .btn-icon {
      transition: transform 0.2s ease;
    }

    .ann-action-btn:hover .btn-icon {
      transform: scale(1.15);
    }

    .ann-action-btn.edit {
      color: var(--accent-gold);
      border-color: rgba(245, 158, 11, 0.15);
    }
    .ann-action-btn.edit:hover {
      background: rgba(245, 158, 11, 0.08);
      border-color: var(--accent-gold);
      box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
    }

    .ann-action-btn.archive {
      color: var(--accent-cyan);
      border-color: rgba(6, 182, 212, 0.15);
    }
    .ann-action-btn.archive:hover {
      background: rgba(6, 182, 212, 0.08);
      border-color: var(--accent-cyan);
      box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
    }

    .ann-action-btn.republish {
      color: var(--accent-green);
      border-color: rgba(16, 185, 129, 0.15);
    }
    .ann-action-btn.republish:hover {
      background: rgba(16, 185, 129, 0.08);
      border-color: var(--accent-green);
      box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
    }

    .ann-action-btn.delete {
      color: var(--accent-red);
      border-color: rgba(239, 68, 68, 0.15);
    }
    .ann-action-btn.delete:hover {
      background: rgba(239, 68, 68, 0.08);
      border-color: var(--accent-red);
      box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
    }

    /* New Announcement Button */
    .ann-new-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      background: linear-gradient(135deg, var(--accent-green), #059669);
      color: #000000;
      border: none;
      border-radius: var(--border-radius-md);
      padding: 8px 16px;
      font-size: 13px;
      font-weight: 600;
      font-family: var(--font-family);
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      height: 38px;
      box-shadow: 
        inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.4),
        inset -1.5px -1.5px 0 rgba(0, 0, 0, 0.35),
        0 4px 12px rgba(16, 185, 129, 0.2);
    }

    .ann-new-btn:hover {
      transform: translateY(-1.5px);
      box-shadow: 
        inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.5),
        inset -1.5px -1.5px 0 rgba(0, 0, 0, 0.4),
        0 6px 18px rgba(16, 185, 129, 0.35);
      filter: brightness(1.08);
    }

    .ann-new-btn:active {
      transform: translateY(0.5px);
      box-shadow: 
        inset -1.5px -1.5px 0 rgba(255, 255, 255, 0.4),
        inset 1.5px 1.5px 0 rgba(0, 0, 0, 0.4),
        0 2px 6px rgba(16, 185, 129, 0.2);
    }

    .ann-new-btn .btn-icon {
      transition: transform 0.2s ease;
    }

    .ann-new-btn:hover .btn-icon {
      transform: rotate(90deg);
    }

    /* Status dot inside dropdown options */
    .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: inline-block;
      flex-shrink: 0;
    }
    .status-dot.live {
      background: var(--accent-green);
      box-shadow: 0 0 6px var(--accent-green);
      animation: statusPulseGreen 2.2s infinite ease-in-out;
    }
    .status-dot.draft {
      background: var(--accent-gold);
      box-shadow: 0 0 6px var(--accent-gold);
      animation: statusPulseGold 2.2s infinite ease-in-out;
    }
    .status-dot.archived {
      background: var(--accent-red);
      box-shadow: 0 0 6px var(--accent-red);
      animation: statusPulseRed 2.2s infinite ease-in-out;
    }

    @keyframes statusPulseGreen {
      0%, 100% { opacity: 0.6; box-shadow: 0 0 3px var(--accent-green); }
      50% { opacity: 1; box-shadow: 0 0 8px var(--accent-green); }
    }
    @keyframes statusPulseGold {
      0%, 100% { opacity: 0.6; box-shadow: 0 0 3px var(--accent-gold); }
      50% { opacity: 1; box-shadow: 0 0 8px var(--accent-gold); }
    }
    @keyframes statusPulseRed {
      0%, 100% { opacity: 0.6; box-shadow: 0 0 3px var(--accent-red); }
      50% { opacity: 1; box-shadow: 0 0 8px var(--accent-red); }
    }

    .ann-textarea {
      width: 100%;
      background: #000;
      border: 3px solid var(--border-block);
      color: var(--text-primary);
      padding: 10px;
      font-size: 12px;
      resize: vertical;
    }

    .ann-textarea:focus {
      outline: none;
      border-color: #fff;
    }

    .ann-form-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .ann-form-label {
      font-size: 11px;
      color: var(--text-secondary);
    }

    /* Ensure inputs, selects, and textareas are interactive and selectable in Electron */
    input,
    textarea,
    select,
    [contenteditable] {
      user-select: text !important;
      -webkit-user-select: text !important;
    }

    /* Visual Rich Editor Styles */
    .ann-editor-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 4px;
      padding: 8px;
      background: var(--bg-sidebar);
      border: 3px solid var(--border-block);
      border-bottom: none;
      box-sizing: border-box;
    }

    .ann-editor-btn {
      background: transparent;
      border: 1px solid transparent;
      color: var(--text-secondary);
      font-family: var(--font-family);
      font-weight: bold;
      font-size: 11px;
      padding: 6px 10px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 4px;
      transition: all 0.1s steps(4);
    }

    .ann-editor-btn:hover {
      background: var(--bg-card);
      border-color: var(--border-block);
      color: var(--accent-gold);
    }

    .ann-editor-separator {
      width: 1px;
      height: 16px;
      background: var(--border-block);
      margin: 0 4px;
    }

    .ann-editor-content {
      width: 100%;
      min-height: 400px;
      background: #000;
      border: 3px solid var(--border-block);
      color: var(--text-primary);
      padding: 14px;
      font-size: 12px;
      line-height: 1.6;
      outline: none;
      box-sizing: border-box;
      font-family: inherit;
      overflow-y: auto;
    }

    .ann-editor-content:focus {
      border-color: #fff;
    }

    .ann-editor-content p {
      margin: 0 0 1em 0;
    }

    .ann-editor-content h1,
    .ann-editor-content h2,
    .ann-editor-content h3 {
      color: var(--accent-gold);
      margin: 0.8em 0 0.4em 0;
      font-weight: bold;
    }

    .ann-editor-content h1 {
      font-size: 1.6em;
    }

    .ann-editor-content h2 {
      font-size: 1.4em;
    }

    .ann-editor-content h3 {
      font-size: 1.2em;
    }

    .ann-editor-content ul,
    .ann-editor-content ol {
      margin: 0 0 1em 0;
      padding-left: 20px;
    }

    .ann-editor-content blockquote {
      border-left: 4px solid var(--accent-gold);
      background: rgba(255, 177, 0, 0.05);
      margin: 0 0 1em 0;
      padding: 8px 14px;
      font-style: italic;
      color: var(--text-secondary);
    }

    .ann-editor-content img {
      max-width: 100%;
      height: auto;
      border: 2px solid var(--border-block);
      margin: 8px 0;
    }

    .ann-editor-content a {
      color: var(--accent-cyan);
      text-decoration: underline;
    }

    /* ════════════════════════════════════════════
   MINECRAFT-THEMED TUTORIAL OVERLAY
   ════════════════════════════════════════════ */

    #tutorial-overlay {
      position: fixed;
      inset: 0;
      z-index: 9999;
      pointer-events: none;
      display: none;
      image-rendering: pixelated;
    }

    #tutorial-overlay.active {
      display: block;
    }

    /* Dark scrim — Minecraft night-sky darkness */
    #tutorial-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.82);
    }

    /* Spotlight — Minecraft golden outline (like selected hotbar slot) */
    #tutorial-spotlight {
      position: absolute;
      border-radius: 0;
      /* blocky, no rounding */
      box-shadow:
        0 0 0 4000px rgba(0, 0, 0, 0.82),
        /* dark scrim with hole */
        0 0 0 4px #ffaa00,
        /* gold primary border */
        0 0 0 6px #7a4f00,
        /* dark amber outer */
        0 0 20px 8px rgba(255, 170, 0, 0.5);
      /* gold glow */
      transition: all 0.2s steps(6);
      /* pixel-stepped movement */
      pointer-events: none;
      display: none;
    }

    /* ── Character: bottom-left, tall ── */
    #tutorial-character {
      position: absolute;
      bottom: 0;
      left: 16px;
      width: 220px;
      pointer-events: none;
      z-index: 10001;
      image-rendering: auto;
      animation: tutCharSlideUp 0.3s steps(8) both;
    }

    @keyframes tutCharSlideUp {
      from {
        transform: translateY(80px);
        opacity: 0;
      }

      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    #tutorial-character img {
      width: 100%;
      filter:
        drop-shadow(0 0 0 2px #000) drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.6));
    }

    /* ── Speech Bubble: RIGHT of character — Minecraft inventory tooltip style ── */
    #tutorial-bubble {
      position: absolute;
      /* Character: left:16px, width:220px → right edge at 236px. Add 18px gap. */
      bottom: 180px;
      left: 254px;
      width: 370px;

      /* Minecraft tooltip: dark background, colored border layers */
      background: #100010;
      border: 3px solid #ffaa00;

      /* Inner raised bevel — like MC inventory panels */
      outline: none;
      box-shadow:
        inset 1px 1px 0 #ffcc55,
        /* top-left bright gold bevel */
        inset -1px -1px 0 #7a4f00,
        /* bottom-right dark gold bevel */
        0 0 0 1px #000,
        /* outer black edge */
        6px 6px 0 rgba(0, 0, 0, 0.7);
      /* hard pixel drop-shadow */

      border-radius: 0;
      padding: 16px 18px 14px;
      pointer-events: all;
      z-index: 10002;
      font-family: 'Minecraft', monospace;
      image-rendering: pixelated;
      animation: mcBubbleIn 0.2s steps(6) both;
    }

    @keyframes mcBubbleIn {
      from {
        transform: scale(0.85) translateX(-8px);
        opacity: 0;
      }

      to {
        transform: scale(1) translateX(0);
        opacity: 1;
      }
    }

    /* Speech tail pointing LEFT toward the character */
    #tutorial-bubble::before {
      content: '';
      position: absolute;
      top: 24px;
      left: -14px;
      width: 0;
      height: 0;
      border-top: 10px solid transparent;
      border-bottom: 10px solid transparent;
      border-right: 14px solid #ffaa00;
    }

    #tutorial-bubble::after {
      content: '';
      position: absolute;
      top: 27px;
      left: -9px;
      width: 0;
      height: 0;
      border-top: 7px solid transparent;
      border-bottom: 7px solid transparent;
      border-right: 10px solid #100010;
    }

    /* Step counter — Minecraft yellow label */
    #tutorial-step-label {
      font-family: 'Minecraft', monospace;
      font-size: 8px;
      color: #ffff55;
      /* Minecraft yellow */
      letter-spacing: 1px;
      text-transform: uppercase;
      margin-bottom: 6px;
      text-shadow: 1px 1px 0 #3a3a00;
    }

    /* Title — white Minecraft text with shadow */
    #tutorial-title {
      font-family: 'Minecraft', monospace;
      font-size: 12px;
      color: #ffffff;
      margin-bottom: 10px;
      line-height: 1.4;
      text-shadow: 2px 2px 0 #3f3f3f;
      letter-spacing: 0.5px;
    }

    /* Body text — light grey Minecraft style */
    #tutorial-text {
      font-family: 'Minecraft', monospace;
      font-size: 9px;
      color: #cccccc;
      line-height: 1.8;
      margin-bottom: 14px;
      text-shadow: 1px 1px 0 #222222;
    }

    /* Progress dots — Minecraft pixel blocks */
    #tutorial-dots {
      display: flex;
      gap: 4px;
      margin-bottom: 12px;
      flex-wrap: wrap;
    }

    .tut-dot {
      width: 8px;
      height: 8px;
      border-radius: 0;
      /* blocky squares */
      background: #3a3a3a;
      border: 1px solid #555;
      image-rendering: pixelated;
      transition: background 0.1s steps(2), transform 0.1s steps(2);
      flex-shrink: 0;
    }

    .tut-dot.active {
      background: #ffaa00;
      border-color: #ffff55;
      transform: scale(1.3);
      box-shadow: 0 0 6px #ffaa00;
    }

    .tut-dot.done {
      background: #55ff55;
      /* Minecraft green */
      border-color: #22aa22;
    }

    /* Button row */
    #tutorial-actions {
      display: flex;
      gap: 6px;
      align-items: center;
    }

    /* ── Minecraft Button Base ──
   Lighter top/left edge, darker bottom/right edge = raised bevel */
    .tut-btn {
      font-family: 'Minecraft', monospace;
      font-size: 8px;
      letter-spacing: 0.5px;
      border: none;
      border-radius: 0;
      padding: 7px 12px;
      cursor: pointer;
      image-rendering: pixelated;
      text-transform: uppercase;
      white-space: nowrap;
      transition: all 0.1s steps(2);

      /* Raised bevel */
      box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.3),
        inset -1px -1px 0 rgba(0, 0, 0, 0.5),
        2px 2px 0 rgba(0, 0, 0, 0.8);
    }

    .tut-btn:active {
      /* Sunken on click — classic MC button press */
      box-shadow:
        inset -1px -1px 0 rgba(255, 255, 255, 0.1),
        inset 1px 1px 0 rgba(0, 0, 0, 0.5),
        0 0 0 rgba(0, 0, 0, 0);
      transform: translate(2px, 2px);
    }

    /* Skip — stone grey */
    .tut-btn-skip {
      background: #4a4a4a;
      color: #aaaaaa;
      border-top: 2px solid #666;
      border-left: 2px solid #666;
      border-bottom: 2px solid #222;
      border-right: 2px solid #222;
    }

    .tut-btn-skip:hover {
      background: #5a2020;
      color: #ff5555;
      border-top-color: #aa2222;
      border-left-color: #aa2222;
    }

    /* Back — cobblestone grey */
    .tut-btn-prev {
      background: #373737;
      color: #cccccc;
      border-top: 2px solid #555;
      border-left: 2px solid #555;
      border-bottom: 2px solid #111;
      border-right: 2px solid #111;
    }

    .tut-btn-prev:hover {
      background: #444;
      color: #fff;
    }

    /* Next — Minecraft gold button */
    .tut-btn-next {
      background: #7a5000;
      color: #ffff55;
      border-top: 2px solid #ffcc33;
      border-left: 2px solid #ffcc33;
      border-bottom: 2px solid #3a2500;
      border-right: 2px solid #3a2500;
      flex: 1;
      text-align: center;
    }

    .tut-btn-next:hover {
      background: #9a6600;
      color: #ffffff;
      border-top-color: #ffd966;
      border-left-color: #ffd966;
    }

    /* ── Arrow — pixelated Minecraft-style pointer ── */
    #tutorial-arrow {
      position: absolute;
      width: 40px;
      height: 40px;
      pointer-events: none;
      z-index: 10003;
      display: none;
      image-rendering: pixelated;
    }

    /* Direction-specific pixel bounce animations */
    #tutorial-arrow.arr-right {
      animation: mcArrRight 0.8s steps(4) infinite;
    }

    #tutorial-arrow.arr-left {
      animation: mcArrLeft 0.8s steps(4) infinite;
    }

    #tutorial-arrow.arr-up {
      animation: mcArrUp 0.8s steps(4) infinite;
    }

    #tutorial-arrow.arr-down {
      animation: mcArrDown 0.8s steps(4) infinite;
    }

    @keyframes mcArrRight {

      0%,
      100% {
        transform: translateX(0) rotate(90deg);
      }

      50% {
        transform: translateX(8px) rotate(90deg);
      }
    }

    @keyframes mcArrLeft {

      0%,
      100% {
        transform: translateX(0) rotate(-90deg);
      }

      50% {
        transform: translateX(-8px) rotate(-90deg);
      }
    }

    @keyframes mcArrUp {

      0%,
      100% {
        transform: translateY(0) rotate(0deg);
      }

      50% {
        transform: translateY(-8px) rotate(0deg);
      }
    }

    @keyframes mcArrDown {

      0%,
      100% {
        transform: translateY(0) rotate(180deg);
      }

      50% {
        transform: translateY(8px) rotate(180deg);
      }
    }

    #tutorial-arrow svg {
      width: 100%;
      height: 100%;
      filter:
        drop-shadow(0 0 0 2px #000) drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.8)) drop-shadow(0 0 8px rgba(255, 170, 0, 0.9));
    }

    /* Finish burst */
    @keyframes tutFinish {
      0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
      }

      100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2.5);
      }
    }

    #tutorial-finish-burst {
      position: absolute;
      top: 50%;
      left: 50%;
      font-size: 72px;
      pointer-events: none;
      display: none;
      z-index: 10004;
      image-rendering: pixelated;
    }

    /* ════════════════════════════════════════════
   TUTORIAL BUTTON — Prominent Gold
   ════════════════════════════════════════════ */

    #btn-tutorial {
      display: flex;
      align-items: center;
      gap: 6px;
      font-family: 'Minecraft', monospace;
      font-size: 9px;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      padding: 8px 14px;
      cursor: pointer;
      border-radius: 0;
      image-rendering: pixelated;

      /* Minecraft gold button */
      background: #7a5000;
      color: #ffff55;
      border-top: 2px solid #ffcc33;
      border-left: 2px solid #ffcc33;
      border-bottom: 2px solid #3a2500;
      border-right: 2px solid #3a2500;

      /* Raised bevel */
      box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.25),
        inset -1px -1px 0 rgba(0, 0, 0, 0.5),
        2px 2px 0 rgba(0, 0, 0, 0.8),
        0 0 10px rgba(255, 170, 0, 0.4);

      transition: all 0.1s steps(2);
      white-space: nowrap;

      /* Subtle gold pulse so it's never missed */
      animation: tutBtnPulse 2.5s ease-in-out infinite;
    }

    @keyframes tutBtnPulse {

      0%,
      100% {
        box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.25), inset -1px -1px 0 rgba(0, 0, 0, 0.5), 2px 2px 0 rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 170, 0, 0.35);
      }

      50% {
        box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.25), inset -1px -1px 0 rgba(0, 0, 0, 0.5), 2px 2px 0 rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 170, 0, 0.75);
      }
    }

    #btn-tutorial:hover {
      background: #a06800;
      color: #ffffff;
      border-top-color: #ffd966;
      border-left-color: #ffd966;
      box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.3),
        inset -1px -1px 0 rgba(0, 0, 0, 0.5),
        2px 2px 0 rgba(0, 0, 0, 0.8),
        0 0 28px rgba(255, 200, 0, 0.9);
      animation: none;
    }

    #btn-tutorial:active {
      transform: translate(2px, 2px);
      box-shadow:
        inset -1px -1px 0 rgba(255, 255, 255, 0.1),
        inset 1px 1px 0 rgba(0, 0, 0, 0.5);
      animation: none;
    }

    /* ════════════════════════════════════════════
   TUTORIAL WELCOME POPUP — Minecraft Themed
   ════════════════════════════════════════════ */

    #tutorial-welcome-overlay {
      /* display toggled by JS — use flex when shown */
      image-rendering: pixelated;
    }

    #tutorial-welcome-box {
      position: relative;
      display: flex;
      align-items: flex-end;
      gap: 0;
      max-width: 680px;
      width: 90vw;
      animation: twBoxIn 0.25s steps(6) both;
    }

    @keyframes twBoxIn {
      from {
        transform: scale(0.8) translateY(30px);
        opacity: 0;
      }

      to {
        transform: scale(1) translateY(0);
        opacity: 1;
      }
    }

    /* Pulsing gold glow behind the whole box */
    #tw-glow {
      position: absolute;
      inset: -20px;
      border-radius: 0;
      background: radial-gradient(ellipse at 30% 80%, rgba(255, 170, 0, 0.25) 0%, transparent 65%);
      pointer-events: none;
      animation: twGlowPulse 2s ease-in-out infinite;
      z-index: 0;
    }

    @keyframes twGlowPulse {

      0%,
      100% {
        opacity: 0.7;
      }

      50% {
        opacity: 1.0;
      }
    }

    /* Character image */
    #tw-character {
      position: relative;
      z-index: 1;
      width: 210px;
      flex-shrink: 0;
      image-rendering: auto;
      filter:
        drop-shadow(0 0 0 2px #000) drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.6)) drop-shadow(0 0 20px rgba(255, 170, 0, 0.4));
      /* Slight idle bob */
      animation: twCharBob 3s ease-in-out infinite;
      align-self: flex-end;
    }

    @keyframes twCharBob {

      0%,
      100% {
        transform: translateY(0);
      }

      50% {
        transform: translateY(-8px);
      }
    }

    /* Content panel — Minecraft tooltip/inventory style */
    #tw-content {
      position: relative;
      z-index: 2;
      flex: 1;
      background: #0c000c;
      border: 3px solid #ffaa00;
      box-shadow:
        inset 1px 1px 0 #ffcc55,
        inset -1px -1px 0 #7a4f00,
        0 0 0 1px #000,
        8px 8px 0 rgba(0, 0, 0, 0.8);
      padding: 22px 24px 20px;
      font-family: 'Minecraft', monospace;
      image-rendering: pixelated;
    }

    /* Speech tail pointing LEFT toward character */
    #tw-content::before {
      content: '';
      position: absolute;
      bottom: 52px;
      left: -16px;
      width: 0;
      height: 0;
      border-top: 12px solid transparent;
      border-bottom: 12px solid transparent;
      border-right: 16px solid #ffaa00;
    }

    #tw-content::after {
      content: '';
      position: absolute;
      bottom: 55px;
      left: -11px;
      width: 0;
      height: 0;
      border-top: 9px solid transparent;
      border-bottom: 9px solid transparent;
      border-right: 12px solid #0c000c;
    }

    #tw-label {
      font-size: 8px;
      color: #ffff55;
      letter-spacing: 2px;
      margin-bottom: 8px;
      text-shadow: 1px 1px 0 #3a3a00;
    }

    #tw-title {
      font-size: 16px;
      color: #ffffff;
      margin-bottom: 12px;
      line-height: 1.3;
      text-shadow: 2px 2px 0 #3f3f3f;
    }

    #tw-text {
      font-size: 9px;
      color: #cccccc;
      line-height: 2;
      margin-bottom: 20px;
      text-shadow: 1px 1px 0 #222;
    }

    #tw-actions {
      display: flex;
      gap: 10px;
    }

    /* Shared welcome button base */
    #tw-yes,
    #tw-no {
      font-family: 'Minecraft', monospace;
      font-size: 9px;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      padding: 9px 18px;
      cursor: pointer;
      border-radius: 0;
      image-rendering: pixelated;
      transition: all 0.1s steps(2);
      box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.3),
        inset -1px -1px 0 rgba(0, 0, 0, 0.5),
        3px 3px 0 rgba(0, 0, 0, 0.8);
    }

    #tw-yes:active,
    #tw-no:active {
      transform: translate(3px, 3px);
      box-shadow: inset -1px -1px 0 rgba(255, 255, 255, 0.1), inset 1px 1px 0 rgba(0, 0, 0, 0.5);
    }

    /* Yes — Minecraft green */
    #tw-yes {
      background: #1a5c1a;
      color: #55ff55;
      border-top: 2px solid #55ff55;
      border-left: 2px solid #55ff55;
      border-bottom: 2px solid #0a2a0a;
      border-right: 2px solid #0a2a0a;
      flex: 1;
    }

    #tw-yes:hover {
      background: #228822;
      color: #ffffff;
    }

    /* No — Stone grey */
    #tw-no {
      background: #3a3a3a;
      color: #aaaaaa;
      border-top: 2px solid #666;
      border-left: 2px solid #666;
      border-bottom: 2px solid #111;
      border-right: 2px solid #111;
    }

    #tw-no:hover {
      background: #4a2020;
      color: #ff5555;
      border-top-color: #aa2222;
      border-left-color: #aa2222;
    }

    /* ── Auto Update Toast Notification ── */
    #update-toast {
      position: fixed;
      bottom: 24px;
      right: 24px;
      width: 340px;
      background: rgba(16, 20, 30, 0.95);
      border: 2px solid #ffaa00;
      box-shadow:
        0 0 20px rgba(255, 170, 0, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.5);
      padding: 16px;
      z-index: 10000;
      display: flex;
      flex-direction: column;
      gap: 12px;
      transition: all 0.3s ease;
      font-family: 'Inter', sans-serif;
      color: #e2e8f0;
    }

    .update-header {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .update-title {
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      font-size: 14px;
      color: #ffaa00;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .update-desc {
      font-size: 12px;
      line-height: 1.5;
      color: #94a3b8;
    }

    .update-progress-container {
      width: 100%;
      height: 6px;
      background: #1e293b;
      border-radius: 3px;
      overflow: hidden;
      display: none;
    }

    .update-progress-bar {
      width: 0%;
      height: 100%;
      background: #ffaa00;
      transition: width 0.1s linear;
    }

    .update-actions {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
    }

    .btn-update {
      padding: 6px 12px;
      font-size: 11px;
      font-weight: 600;
      border: none;
      cursor: pointer;
      transition: all 0.2s ease;
      font-family: 'Inter', sans-serif;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .btn-update-primary {
      background: #ffaa00;
      color: #020812;
    }

    .btn-update-primary:hover {
      background: #ffc244;
      box-shadow: 0 0 10px rgba(255, 170, 0, 0.4);
    }

    .btn-update-secondary {
      background: transparent;
      color: #94a3b8;
      border: 1px solid #334155;
    }

    .btn-update-secondary:hover {
      color: #f1f5f9;
      border-color: #475569;
    }

    /* Settings tab status styles */
    .settings-status-card {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 16px;
      border: 1px solid var(--border-block);
      background: rgba(0, 0, 0, 0.15);
      border-radius: 4px;
    }

    .settings-status-card.success {
      border-color: rgba(16, 185, 129, 0.4);
      background: rgba(16, 185, 129, 0.05);
    }

    .settings-status-card.error {
      border-color: rgba(239, 68, 68, 0.4);
      background: rgba(239, 68, 68, 0.05);
    }

    .settings-status-card.info {
      border-color: rgba(59, 130, 246, 0.4);
      background: rgba(59, 130, 246, 0.05);
    }

    .status-title {
      font-weight: bold;
      font-size: 13px;
      color: var(--text-primary);
      margin-bottom: 2px;
    }

    .status-desc {
      font-size: 11px;
      color: var(--text-muted);
    }

    /* ══════════════════════════════════════════════════════════
   FEATURE: ROLE-BASED VISIBILITY
   ══════════════════════════════════════════════════════════ */

    .role-locked {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 10px;
      color: var(--text-muted);
      background: rgba(0, 0, 0, 0.25);
      border: 1px dashed rgba(255, 255, 255, 0.1);
      padding: 5px 10px;
      cursor: not-allowed;
      user-select: none;
      opacity: 0.7;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      width: 100%;
      justify-content: center;
    }

    .role-locked:hover {
      border-color: var(--accent-red);
      color: var(--accent-red);
    }

    /* ══════════════════════════════════════════════════════════
   FEATURE: IN-APP NOTIFICATION SYSTEM
   ══════════════════════════════════════════════════════════ */

    /* Bell button in header */
    .notif-bell-btn {
      position: relative;
      background: transparent;
      border: 2px solid var(--border-block);
      color: var(--text-secondary);
      font-size: 16px;
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: var(--transition);
      flex-shrink: 0;
    }

    .notif-bell-btn:hover {
      border-color: var(--accent-gold);
      color: var(--accent-gold);
    }

    .notif-badge {
      position: absolute;
      top: -5px;
      right: -5px;
      background: var(--accent-red);
      color: #fff;
      font-size: 9px;
      font-weight: bold;
      min-width: 16px;
      height: 16px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 3px;
      border: 2px solid var(--bg-main);
      animation: notif-pulse 2s ease-in-out infinite;
    }

    @keyframes notif-pulse {

      0%,
      100% {
        transform: scale(1);
      }

      50% {
        transform: scale(1.15);
      }
    }

    /* Toast notification */
    .notif-toast {
      position: fixed;
      bottom: 24px;
      right: 24px;
      width: 320px;
      background: var(--bg-sidebar);
      border: 2px solid var(--border-block);
      border-left: 4px solid var(--accent-gold);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
      padding: 14px 16px;
      z-index: 9999;
      display: flex;
      gap: 12px;
      align-items: flex-start;
      animation: toast-slide-in 0.25s ease-out;
    }

    @keyframes toast-slide-in {
      from {
        transform: translateX(100%);
        opacity: 0;
      }

      to {
        transform: translateX(0);
        opacity: 1;
      }
    }

    .notif-toast.toast-exit {
      animation: toast-slide-out 0.2s ease-in forwards;
    }

    @keyframes toast-slide-out {
      from {
        transform: translateX(0);
        opacity: 1;
      }

      to {
        transform: translateX(110%);
        opacity: 0;
      }
    }

    .notif-toast-icon {
      font-size: 20px;
      flex-shrink: 0;
      line-height: 1;
    }

    .notif-toast-body {
      flex: 1;
      min-width: 0;
    }

    .notif-toast-title {
      font-size: 11px;
      font-weight: bold;
      color: var(--accent-gold);
      margin-bottom: 3px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .notif-toast-msg {
      font-size: 11px;
      color: var(--text-secondary);
      line-height: 1.4;
      word-break: break-word;
    }

    .notif-toast-close {
      background: transparent;
      border: none;
      color: var(--text-muted);
      font-size: 14px;
      cursor: pointer;
      padding: 0;
      line-height: 1;
      flex-shrink: 0;
      transition: color 0.15s;
    }

    .notif-toast-close:hover {
      color: var(--accent-red);
    }

    /* Notification history panel */
    #notif-panel {
      position: fixed;
      top: 0;
      right: 0;
      width: 340px;
      height: 100vh;
      background: var(--bg-sidebar);
      border-left: 3px solid var(--border-block);
      z-index: 8000;
      display: flex;
      flex-direction: column;
      transform: translateX(100%);
      transition: transform 0.2s ease;
      box-shadow: -8px 0 24px rgba(0, 0, 0, 0.4);
    }

    #notif-panel.open {
      transform: translateX(0);
    }

    .notif-panel-header {
      padding: 16px 20px;
      border-bottom: 3px solid var(--border-block);
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-shrink: 0;
    }

    .notif-panel-title {
      font-size: 13px;
      font-weight: bold;
      color: var(--accent-gold);
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .notif-panel-close {
      background: transparent;
      border: none;
      color: var(--text-muted);
      font-size: 18px;
      cursor: pointer;
      padding: 0;
      transition: color 0.15s;
    }

    .notif-panel-close:hover {
      color: var(--accent-red);
    }

    .notif-panel-body {
      flex: 1;
      overflow-y: auto;
      padding: 8px 0;
    }

    .notif-panel-empty {
      padding: 40px 20px;
      text-align: center;
      color: var(--text-muted);
      font-size: 12px;
    }

    .notif-panel-item {
      padding: 12px 20px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.04);
      display: flex;
      gap: 10px;
      align-items: flex-start;
      cursor: default;
      transition: background 0.15s;
    }

    .notif-panel-item:hover {
      background: rgba(255, 255, 255, 0.03);
    }

    .notif-panel-item.unread {
      background: rgba(255, 170, 0, 0.04);
      border-left: 3px solid var(--accent-gold);
      padding-left: 17px;
    }

    .notif-panel-item-icon {
      font-size: 16px;
      flex-shrink: 0;
      margin-top: 1px;
    }

    .notif-panel-item-body {
      flex: 1;
      min-width: 0;
    }

    .notif-panel-item-title {
      font-size: 11px;
      font-weight: bold;
      color: var(--text-primary);
      margin-bottom: 2px;
    }

    .notif-panel-item-msg {
      font-size: 10px;
      color: var(--text-secondary);
      line-height: 1.4;
    }

    .notif-panel-item-time {
      font-size: 9px;
      color: var(--text-muted);
      flex-shrink: 0;
      margin-top: 2px;
    }

    .notif-panel-footer {
      padding: 12px 20px;
      border-top: 2px solid var(--border-block);
      flex-shrink: 0;
    }

    .notif-clear-btn {
      background: transparent;
      border: 1px solid var(--border-block);
      color: var(--text-muted);
      font-size: 10px;
      padding: 6px 12px;
      cursor: pointer;
      width: 100%;
      text-align: center;
      font-family: var(--font-family);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      transition: var(--transition);
    }

    .notif-clear-btn:hover {
      border-color: var(--accent-red);
      color: var(--accent-red);
    }

    /* ══════════════════════════════════════════════════════════
   FEATURE: GLOBAL QUICK SEARCH  (Ctrl+K)
   ══════════════════════════════════════════════════════════ */

    #quick-search-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.75);
      z-index: 10000;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      padding-top: 80px;
      backdrop-filter: blur(4px);
      animation: qs-fade-in 0.15s ease;
    }

    #quick-search-overlay.hidden {
      display: none;
    }

    @keyframes qs-fade-in {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    .qs-box {
      width: 580px;
      max-width: calc(100vw - 48px);
      background: var(--bg-sidebar);
      border: 3px solid var(--border-block);
      border-top: 3px solid var(--accent-gold);
      box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
      display: flex;
      flex-direction: column;
      max-height: 70vh;
      animation: qs-slide-down 0.18s ease-out;
    }

    @keyframes qs-slide-down {
      from {
        transform: translateY(-16px);
        opacity: 0;
      }

      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    .qs-input-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 14px 18px;
      border-bottom: 2px solid var(--border-block);
      flex-shrink: 0;
    }

    .qs-search-icon {
      font-size: 16px;
      color: var(--text-muted);
      flex-shrink: 0;
    }

    #qs-input {
      flex: 1;
      background: transparent;
      border: none;
      outline: none;
      font-family: var(--font-family);
      font-size: 14px;
      color: var(--text-primary);
      caret-color: var(--accent-gold);
    }

    #qs-input::placeholder {
      color: var(--text-muted);
    }

    .qs-shortcut-chip {
      font-size: 9px;
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid var(--border-block);
      padding: 2px 6px;
      letter-spacing: 0.5px;
      flex-shrink: 0;
    }

    .qs-results {
      flex: 1;
      overflow-y: auto;
      padding: 6px 0;
      min-height: 80px;
    }

    .qs-empty {
      padding: 24px;
      text-align: center;
      color: var(--text-muted);
      font-size: 12px;
    }

    .qs-section-label {
      padding: 8px 18px 4px;
      font-size: 9px;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--text-muted);
      border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .qs-result-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 18px;
      cursor: pointer;
      transition: background 0.1s;
      border-left: 3px solid transparent;
    }

    .qs-result-item:hover,
    .qs-result-item.selected {
      background: rgba(255, 170, 0, 0.06);
      border-left-color: var(--accent-gold);
    }

    .qs-result-skin {
      width: 32px;
      height: 32px;
      flex-shrink: 0;
      background: #141416;
      border: 2px solid var(--border-block);
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      font-weight: bold;
    }

    .qs-result-skin img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      image-rendering: pixelated;
    }

    .qs-result-info {
      flex: 1;
      min-width: 0;
    }

    .qs-result-name {
      font-size: 12px;
      font-weight: bold;
      color: var(--text-primary);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .qs-result-name mark {
      background: transparent;
      color: var(--accent-gold);
    }

    .qs-result-meta {
      font-size: 10px;
      color: var(--text-muted);
      margin-top: 1px;
    }

    .qs-result-badge {
      font-size: 9px;
      font-weight: bold;
      padding: 2px 7px;
      border: 1px solid;
      flex-shrink: 0;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .qs-footer {
      padding: 8px 18px;
      border-top: 2px solid var(--border-block);
      display: flex;
      gap: 16px;
      font-size: 9px;
      color: var(--text-muted);
      flex-shrink: 0;
    }

    .qs-footer-key {
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid var(--border-block);
      padding: 1px 5px;
      font-size: 9px;
      margin-right: 3px;
    }

    /* Ctrl+K hint in header */
    .qs-header-hint {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 10px;
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border-block);
      padding: 4px 10px;
      cursor: pointer;
      transition: var(--transition);
      flex-shrink: 0;
    }

    .qs-header-hint:hover {
      border-color: var(--accent-gold);
      color: var(--accent-gold);
    }

    /* ══════════════════════════════════════════════════════════
   FEATURE: ANALYTICS CHARTS
   ══════════════════════════════════════════════════════════ */

    .charts-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      margin-top: 12px;
    }

    @media (max-width: 900px) {
      .charts-grid {
        grid-template-columns: 1fr;
      }
    }

    .chart-card {
      background: var(--bg-card);
      border: 2px solid var(--border-block);
      box-shadow: inset -2px -2px 0 #1e1e24, inset 2px 2px 0 #4e4e5a;
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .chart-card-title {
      font-size: 11px;
      font-weight: bold;
      color: var(--accent-gold);
      text-transform: uppercase;
      letter-spacing: 1px;
      border-bottom: 2px solid var(--border-block);
      padding-bottom: 8px;
      font-family: 'MinecraftSeven', 'Minecraft', sans-serif;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .chart-card-canvas-wrap {
      position: relative;
      height: 240px;
    }

    .chart-card-canvas-wrap canvas {
      max-height: 240px;
    }

    .chart-loading {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 200px;
      color: var(--text-muted);
      font-size: 11px;
      gap: 8px;
    }

    /* ══════════════════════════════════════════════════════════
       SPLASH SCREEN STYLING WITH GSAP SPIRAL CANVAS
       ══════════════════════════════════════════════════════════ */
    #splash-container {
      position: fixed;
      inset: 0;
      width: 100vw;
      height: 100vh;
      background: #000;
      z-index: 99999;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    }

    #splash-container.exit {
      transform: translateY(-100%);
    }

    #splash-canvas {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
    }

    .splash-content {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 36px;
      z-index: 10;
      width: 100%;
      pointer-events: none;
    }

    .splash-logo {
      height: 160px;
      width: auto;
      object-fit: contain;
      animation: splashLogoSpawn 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
      image-rendering: auto;
      filter: drop-shadow(0 0 16px rgba(239, 68, 68, 0.2));
    }

    @keyframes splashLogoSpawn {
      from {
        opacity: 0;
        transform: scale(0.85);
      }
      to {
        opacity: 1;
        transform: scale(1);
      }
    }

    .btn-enter {
      color: #ffffff;
      background: rgba(255, 255, 255, 0.04);
      border: 2px solid rgba(255, 255, 255, 0.12);
      border-radius: var(--border-radius-md);
      padding: 12px 36px;
      font-size: 14px;
      font-weight: 600;
      font-family: 'MinecraftSeven', 'Minecraft', var(--font-family);
      letter-spacing: 0.25em;
      cursor: pointer;
      pointer-events: auto;
      opacity: 0;
      transform: translateY(15px);
      transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 
        inset 1px 1px 0 rgba(255, 255, 255, 0.15),
        inset -1px -1px 0 rgba(0, 0, 0, 0.2),
        0 4px 15px rgba(0, 0, 0, 0.4);
    }

    .btn-enter.visible {
      opacity: 1;
      transform: translateY(0);
      animation: btnEnterPulse 2.5s infinite ease-in-out 1.5s;
    }

    .btn-enter:hover {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.35);
      letter-spacing: 0.3em;
      box-shadow: 
        inset 1px 1px 0 rgba(255, 255, 255, 0.25),
        inset -1px -1px 0 rgba(0, 0, 0, 0.25),
        0 8px 24px rgba(255, 255, 255, 0.15);
      transform: scale(1.02);
    }

    .btn-enter:active {
      transform: scale(0.98);
      box-shadow: 
        inset -1px -1px 0 rgba(255, 255, 255, 0.2),
        inset 1px 1px 0 rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.3);
    }

    @keyframes btnEnterPulse {
      0%, 100% {
        border-color: rgba(255, 255, 255, 0.12);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
      }
      50% {
        border-color: rgba(255, 255, 255, 0.35);
        box-shadow: 0 4px 20px rgba(255, 255, 255, 0.08);
      }
    }