/* VPD FiveM Portal - Modern Dark Clean UI */

:root {
  --bg-main: #0a0a0a;
  --bg-surface: #111111;
  --bg-card: #171717;
  --bg-card-hover: #1d1d1d;
  --bg-input: #0f0f0f;

  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-focus: #4f7dff;

  --primary: #4f7dff;
  --primary-hover: #2f6bff;
  --primary-dim: rgba(79,125,255, 0.12);

  --accent-gold: #ffd200;
  --accent-gold-dim: rgba(255,210,0, 0.12);
  --accent-emerald: #6aa77a;
  --accent-emerald-dim: rgba(106,167,122, 0.12);
  --accent-red: #ff3b30;
  --accent-red-dim: rgba(255,59,48, 0.12);

  --discord: #5865f2;
  --discord-hover: #4752c4;

  --text-main: #f7f7f5;
  --text-muted: #9a9a94;
  --text-dim: #75756f;

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

.quick-switcher-bar, .navbar-refined, .site-container, .footer-clean {
  position: relative;
  z-index: 2;
}

/* Quick Role Switcher Bar */
/* Top Bar fivempd Discord Pill */
.fivempd-discord-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(88, 101, 242, 0.12);
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: 9999px;
  padding: 3px 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.fivempd-discord-pill:hover {
  background: rgba(88, 101, 242, 0.25);
  border-color: rgba(88, 101, 242, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.25);
}
.fivempd-pill-badge {
  background: #5865F2;
  color: #fff;
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Voice Patrol Live Widget in Navbar */
.voice-widget-wrapper {
  position: relative;
}
.voice-widget-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #c4c4be;
}
.voice-widget-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.voice-widget-icon {
  font-size: 0.88rem;
  color: #9a9a94;
  transition: color 0.2s ease;
}
.voice-widget-icon.active {
  color: #6aa77a;
}
.voice-avatar-stack {
  display: flex;
  align-items: center;
  margin-left: 2px;
}
.voice-stack-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #111111;
  margin-left: -8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}
.voice-stack-img:first-child {
  margin-left: 0;
}
.voice-stack-img:hover {
  transform: scale(1.2);
  z-index: 20 !important;
}
.voice-stack-more {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3a3a37;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #111111;
  margin-left: -8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.voice-count-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #6aa77a;
}
.voice-chevron {
  font-size: 0.65rem;
  color: #75756f;
  transition: transform 0.2s ease;
}
.voice-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 330px;
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
  z-index: 1000;
}
.voice-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 6px;
}
.voice-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.voice-member-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.quick-switcher-bar {
  background: #090909;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 1.5rem;
}

.quick-switcher-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-switcher-label {
  color: var(--text-dim);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.quick-switcher-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.qs-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}

.qs-pill:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.qs-pill.active {
  border-color: currentColor;
}

.qs-pill.chief { color: #ffd200; }
.qs-pill.chief.active { background: rgba(255,210,0, 0.18); }

.qs-pill.admin { color: #ff3b30; }
.qs-pill.admin.active { background: rgba(255,59,48, 0.18); }

.qs-pill.supervisor { color: #4f7dff; }
.qs-pill.supervisor.active { background: rgba(79,125,255, 0.18); }

.qs-pill.officer { color: #6aa77a; }
.qs-pill.officer.active { background: rgba(106,167,122, 0.18); }

.qs-pill.citizen { color: #c4c4be; }
.qs-pill.citizen.active { background: rgba(255, 255, 255, 0.12); }

.qs-pill.guest { color: #9a9a94; }
.qs-pill.guest.active { background: rgba(255, 255, 255, 0.08); }

/* Base Container */
.site-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  min-height: calc(100vh - 140px);
  position: relative;
  z-index: 10;
}

/* Modern Navbar */
.navbar-refined {
  background: rgba(18,18,18, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.5rem 1.25rem;
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.brand-crest {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.brand-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 500;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-link-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-link-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link-item.active {
  color: #fff;
  background: rgba(79,125,255, 0.15);
  color: #8fb0ff;
  font-weight: 600;
}

.user-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn-ui {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  font-family: var(--font-main);
  white-space: nowrap;
}

.btn-ui.primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(79,125,255, 0.45);
}

.btn-ui.primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 24px rgba(79,125,255, 0.75);
  transform: translateY(-1px);
}

.btn-ui.outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-ui.outline:hover {
  color: #fff;
  border-color: rgba(79,125,255, 0.4);
  box-shadow: 0 0 15px rgba(79,125,255, 0.2);
  background: rgba(79,125,255, 0.05);
}

.btn-ui.gold {
  background: var(--accent-gold);
  color: #0a0a0a;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(255,210,0, 0.4);
}

.btn-ui.gold:hover {
  background: #d9b300;
  color: #fff;
  box-shadow: 0 0 24px rgba(255,210,0, 0.7);
  transform: translateY(-1px);
}

.btn-ui.danger {
  background: var(--accent-red-dim);
  border: 1px solid rgba(255,59,48, 0.3);
  color: #ff9d96;
}

.btn-ui.danger:hover {
  background: var(--accent-red);
  color: #fff;
  box-shadow: 0 0 20px rgba(255,59,48, 0.5);
}

.btn-ui.discord-btn {
  background: var(--discord);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(88, 101, 242, 0.45);
}

.btn-ui.discord-btn:hover {
  background: var(--discord-hover);
  box-shadow: 0 0 24px rgba(88, 101, 242, 0.75);
  transform: translateY(-1px);
}

/* Modern Clean Hero Banner */
.portal-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.portal-hero-text h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.portal-hero-text p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.portal-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Stats Row */
.grid-stats-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

.stat-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Surface Card */
.surface-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

/* Section Header */
.section-header-clean {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-title-clean {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.section-subtitle-clean {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Patrol Section & Cards */
.patrol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.patrol-member-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.patrol-member-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.patrol-member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.patrol-online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-emerald);
  border: 2px solid var(--bg-surface);
}

.patrol-member-info {
  overflow: hidden;
}

.patrol-member-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.patrol-member-status {
  font-size: 0.72rem;
  color: var(--accent-emerald);
  font-weight: 500;
}

.patrol-empty-state {
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.beacon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  display: inline-block;
  box-shadow: 0 0 10px var(--accent-emerald), 0 0 16px var(--accent-emerald);
  animation: beacon-pulse 2s infinite ease-in-out;
}

@keyframes beacon-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 8px var(--accent-emerald);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
    box-shadow: 0 0 18px var(--accent-emerald);
  }
}

/* Roster Cards */
.roster-grid-clean {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.officer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.officer-card:hover {
  border-color: rgba(79,125,255, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(79,125,255, 0.15);
  transform: translateY(-2px);
}

.surface-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.surface-card:hover {
  border-color: rgba(79,125,255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 14px rgba(79,125,255, 0.08);
}
  background: var(--bg-card-hover);
}

.officer-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
}

.officer-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
}

.officer-rank {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.division-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Badges */
.badge-role {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.badge-role.chief {
  background: rgba(218, 214, 0, 0.15);
  color: #dad600;
  border: 1px solid rgba(218, 214, 0, 0.4);
}

.badge-role.rank-chief {
  background: rgba(218, 214, 0, 0.15);
  color: #dad600;
  border: 1px solid rgba(218, 214, 0, 0.45);
}

.badge-role.rank-commander {
  background: rgba(28, 70, 168, 0.18);
  color: #6f96ff;
  border: 1px solid rgba(28, 70, 168, 0.55);
}

.badge-role.rank-captain {
  background: rgba(161, 19, 0, 0.18);
  color: #ff3b30;
  border: 1px solid rgba(161, 19, 0, 0.5);
}

.badge-role.rank-deputy-captain {
  background: rgba(26, 188, 156, 0.16);
  color: #1abc9c;
  border: 1px solid rgba(26, 188, 156, 0.45);
}

.badge-role.rank-lieutenant {
  background: rgba(99, 177, 255, 0.16);
  color: #63b1ff;
  border: 1px solid rgba(99, 177, 255, 0.45);
}

.badge-role.rank-sergeant {
  background: rgba(127, 188, 248, 0.16);
  color: #7fbcf8;
  border: 1px solid rgba(127, 188, 248, 0.45);
}

.badge-role.rank-officer {
  background: rgba(7, 157, 207, 0.16);
  color: #079dcf;
  border: 1px solid rgba(7, 157, 207, 0.45);
}

.badge-role.rank-solo-cadet {
  background: rgba(11, 202, 68, 0.16);
  color: #0bca44;
  border: 1px solid rgba(11, 202, 68, 0.45);
}

.badge-role.rank-cadet {
  background: rgba(125, 240, 137, 0.16);
  color: #7df089;
  border: 1px solid rgba(125, 240, 137, 0.45);
}

.badge-role.supervisor {
  background: var(--primary-dim);
  color: var(--primary);
  border: 1px solid rgba(79,125,255, 0.25);
}

.badge-role.officer {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.9rem;
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: var(--border-focus);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table-tactical {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.table-tactical th {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.table-tactical td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: #fff;
  vertical-align: middle;
}

.table-tactical tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Flash Messages */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.alert-success {
  background: var(--accent-emerald-dim);
  border: 1px solid rgba(106,167,122, 0.3);
  color: #a9d2b2;
}

.alert-danger {
  background: var(--accent-red-dim);
  border: 1px solid rgba(255,59,48, 0.3);
  color: #ff9d96;
}

.alert-info {
  background: var(--primary-dim);
  border: 1px solid rgba(79,125,255, 0.3);
  color: #bcd0ff;
}

/* Clean Footer */
.footer-clean {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Legacy & Utility Compatibility Classes */
.card-glass {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.gold-accent {
  border-left: 3px solid var(--accent-gold);
}

.cyan-accent {
  border-left: 3px solid var(--primary);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  font-family: var(--font-main);
  white-space: nowrap;
}

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

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

.btn-gold {
  background: var(--accent-gold);
  color: #0a0a0a;
  font-weight: 700;
}

.btn-gold:hover {
  background: #d9b300;
  color: #fff;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-glass:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  background: var(--accent-red-dim);
  border: 1px solid rgba(255,59,48, 0.3);
  color: #ff9d96;
}

.btn-danger:hover {
  background: var(--accent-red);
  color: #fff;
}

/* Compact Tactical Code Dashboard */
.compact-code-scroll/* Sleek Ultra-Modern Dark Scrollbars (Global & All Containers) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

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

::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 10px rgba(79,125,255, 0.3);
}

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

/* Custom Tactical Scrollbar Class for Cards & Panels */
.tactical-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.tactical-scrollbar::-webkit-scrollbar {
  width: 5px;
}
.tactical-scrollbar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 9999px;
}
.tactical-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
}
.tactical-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

.table-compact tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.table-compact tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.table-compact td {
  padding: 5px 6px;
  vertical-align: middle;
}

.c-code {
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
  width: 68px;
  font-size: 0.78rem;
}

.c-code.gold { color: #ffd200; }
.c-code.gold-bright { color: #ffd91f; text-shadow: 0 0 8px rgba(255,210,0, 0.5); }
.c-code.emerald { color: #6aa77a; }
.c-code.blue { color: #82b3b8; }
.c-code.red { color: #ff6b61; }
.c-code.dim { color: var(--text-dim); }

.c-code.red-alert {
  color: #ff6b61;
  text-shadow: 0 0 10px rgba(255,59,48, 0.7);
  font-weight: 800;
}

.c-code.red-banned {
  color: #ff3b30;
  background: rgba(255,59,48, 0.15);
  padding: 1px 4px;
  border-radius: 3px;
}

.c-desc {
  color: #c4c4be;
  line-height: 1.35;
}

.c-desc.bold { font-weight: 600; color: #fff; }
.c-desc.red { color: #ff9d96; }

@media (max-width: 1024px) {
  .codes-four-col-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .codes-four-col-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  .portal-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   AMBIENT GLOWING PARTICLES CANVAS (INTERACTIVE MOUSE-TRACKING)
   ========================================================================== */
.ambient-particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.85;
}

/* ==========================================================================
   MODERN GRAND HERO & INTEGRATED FIVEMPD LAYOUT
   ========================================================================== */
.portal-hero-grand {
  position: relative;
  background: radial-gradient(circle at 20% 0%, rgba(56,79,107, 0.2) 0%, rgba(20,20,20, 0.45) 60%, rgba(10,10,10, 0.85) 100%), var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.portal-hero-inner-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.portal-hero-left {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex: 1;
  min-width: 320px;
}

.portal-hero-emblem {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,210,0, 0.45);
  box-shadow: 0 0 25px rgba(255,210,0, 0.25), 0 10px 25px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portal-hero-emblem:hover {
  transform: scale(1.06);
  box-shadow: 0 0 35px rgba(255,210,0, 0.45), 0 12px 30px rgba(0, 0, 0, 0.8);
}

.portal-hero-textual {
  flex: 1;
}

.portal-hero-badge-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  background: rgba(20,20,20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 12px;
  border-radius: 9999px;
  backdrop-filter: blur(8px);
}

.badge-dept-mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-gold);
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-sep {
  color: #575752;
}

.badge-station-active {
  background: rgba(106,167,122, 0.18);
  color: #8cc49a;
  border: 1px solid rgba(106,167,122, 0.4);
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.portal-hero-heading {
  font-size: 2.35rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 4px 0 8px;
}

.portal-hero-lead {
  font-size: 0.92rem;
  color: #9a9a94;
  line-height: 1.55;
  max-width: 600px;
}

.portal-hero-cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* Integrated FivemPD Discord Box */
.portal-hero-discord-box {
  background: rgba(88, 101, 242, 0.08);
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  min-width: 240px;
  flex-shrink: 0;
  box-shadow: 0 10px 25px -10px rgba(88, 101, 242, 0.25);
  transition: all 0.25s ease;
}

.portal-hero-discord-box:hover {
  border-color: rgba(88, 101, 242, 0.65);
  box-shadow: 0 12px 30px -8px rgba(88, 101, 242, 0.45);
  transform: translateY(-2px);
}

.discord-box-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.discord-box-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #5865F2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 0 14px rgba(88, 101, 242, 0.5);
}

/* Glowing Emerald CTA Button */
.hero-emerald-cta-wrap {
  position: relative;
  display: inline-flex;
}

.btn-emerald-glowing {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: linear-gradient(135deg, #528a61 0%, #6aa77a 50%, #416e4d 100%);
  color: #ffffff !important;
  padding: 11px 26px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 25px rgba(106,167,122, 0.55), 0 8px 20px -4px rgba(106,167,122, 0.4);
  transition: all 0.25s ease;
  overflow: visible;
  cursor: pointer;
}

.btn-emerald-glowing:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(106,167,122, 0.8), 0 12px 25px -4px rgba(106,167,122, 0.5);
}

.emerald-pulsar {
  position: absolute;
  inset: -5px;
  border-radius: 16px;
  border: 2px solid rgba(106,167,122, 0.55);
  opacity: 0.8;
  animation: emeraldPulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
}

@keyframes emeraldPulse {
  0% { transform: scale(0.96); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 0.2; }
  100% { transform: scale(0.96); opacity: 0.9; }
}

.emerald-btn-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.emerald-btn-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
}

.emerald-btn-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #c5e2cb;
}

/* Police active personnel hero banner card */
.police-active-hero-card {
  background: rgba(106,167,122, 0.08);
  border: 1px solid rgba(106,167,122, 0.3);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  backdrop-filter: blur(8px);
}

/* ==========================================================================
   GLOBAL AVATAR LIGHTBOX / ZOOM MODAL
   ========================================================================== */
.clickable-zoom-avatar, .voice-stack-img, .officer-card img, .shift-row img, .avatar-container img {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.clickable-zoom-avatar:hover, .voice-stack-img:hover, .officer-card img:hover, .shift-row img:hover {
  transform: scale(1.12);
  box-shadow: 0 0 16px rgba(79,125,255, 0.6);
  z-index: 50 !important;
}

.avatar-zoom-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,9,10, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999999;
  align-items: center;
  justify-content: center;
  animation: zoomFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1.5rem;
}

.avatar-zoom-box {
  position: relative;
  background: #131313;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 40px rgba(79,125,255, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 440px;
  width: 100%;
  text-align: center;
  animation: zoomBoxPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.avatar-zoom-image {
  width: 280px;
  height: 280px;
  max-width: 75vw;
  max-height: 75vw;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #4f7dff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  margin-bottom: 1rem;
}

.avatar-zoom-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.avatar-zoom-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.avatar-zoom-rank {
  font-size: 0.82rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.avatar-zoom-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.avatar-zoom-close:hover {
  background: rgba(255,59,48, 0.3);
  border-color: #ff3b30;
  color: #ff3b30;
  transform: rotate(90deg);
}

@keyframes zoomFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomBoxPop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}



/* ==========================================================================
   FivemPD Handbook & Documentation Hub (Bilgi Kitapçığı)
   ========================================================================== */
.handbook-header-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(12px);
}

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

.cat-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 9999px;
  border: 1px solid;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.handbook-container {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 1.5rem;
  align-items: start;
  min-height: 720px;
  margin-bottom: 3rem;
}

@media (max-width: 992px) {
  .handbook-container {
    grid-template-columns: 1fr;
  }
}

.handbook-sidebar {
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 6rem);
  display: flex;
  flex-direction: column;
  background: rgba(20,20,20, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.handbook-search-box {
  position: relative;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.handbook-search-icon {
  position: absolute;
  left: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #75756f;
  font-size: 0.85rem;
  pointer-events: none;
}

.handbook-search-input {
  width: 100%;
  padding-left: 2.3rem !important;
  padding-right: 2rem !important;
  height: 38px;
  font-size: 0.82rem;
  background: rgba(8,9,10, 0.6) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: #fff !important;
  transition: border-color 0.2s ease;
}

.handbook-search-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(79,125,255, 0.25) !important;
}

.handbook-search-clear {
  position: absolute;
  right: 1.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9a9a94;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}

.handbook-search-clear:hover {
  color: #fff;
}

.handbook-topics-nav {
  overflow-y: auto;
  padding: 0.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.handbook-category-group {
  margin-bottom: 0.35rem;
}

.handbook-category-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9a9a94;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.handbook-category-title:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #efefea;
}

.handbook-articles-sublist {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 3px 0 6px 4px;
}

.handbook-article-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  font-size: 0.82rem;
  color: #c4c4be;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s ease;
  border-left: 2px solid transparent;
}

.handbook-article-link:hover {
  background: rgba(79,125,255, 0.1);
  color: #bcd0ff;
  transform: translateX(2px);
}

.handbook-article-link.active {
  background: rgba(79,125,255, 0.18);
  color: #ffffff;
  font-weight: 600;
  border-left: 2px solid #4f7dff;
}

.handbook-article-link.active .handbook-link-arrow {
  color: #4f7dff;
  transform: translateX(2px);
}

.handbook-link-arrow {
  font-size: 0.68rem;
  color: #75756f;
  transition: transform 0.15s ease, color 0.15s ease;
}

.handbook-link-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Reader Pane */
.handbook-reader-pane {
  background: rgba(20,20,20, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 2.25rem 2.5rem;
  min-height: 720px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.handbook-article-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.handbook-article-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 1rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.handbook-article-body {
  font-size: 0.93rem;
  line-height: 1.75;
  color: #c4c4be;
}

.handbook-article-body p {
  margin-bottom: 1.15rem;
  color: #c4c4be;
}

.handbook-article-body h1,
.handbook-article-body h2,
.handbook-article-body h3,
.handbook-article-body h4 {
  color: #ffffff;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.handbook-article-body h2 {
  font-size: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.4rem;
  color: #bcd0ff;
}

.handbook-article-body h3 {
  font-size: 1.08rem;
  color: #82b3b8;
}

.handbook-article-body h4 {
  font-size: 0.95rem;
  color: #efefea;
}

.handbook-article-body ul,
.handbook-article-body ol {
  margin: 0 0 1.25rem 1.4rem;
  padding: 0;
  color: #c4c4be;
}

.handbook-article-body li {
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

.handbook-article-body strong {
  color: #ffffff;
  font-weight: 600;
}

.handbook-article-body em {
  color: #e2e2dd;
  font-style: italic;
}

.handbook-article-body code {
  font-family: var(--font-mono);
  background: rgba(8,9,10, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.83rem;
  color: #82b3b8;
}

.handbook-article-body pre {
  background: rgba(8,9,10, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.handbook-article-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: #efefea;
  font-size: 0.85rem;
}

.handbook-article-body blockquote {
  border-left: 3px solid #4f7dff;
  background: rgba(79,125,255, 0.08);
  padding: 0.75rem 1.25rem;
  margin: 1.15rem 0;
  border-radius: 0 8px 8px 0;
  color: #e2e2dd;
  font-style: normal;
}

.handbook-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.85rem;
  background: rgba(8,9,10, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.handbook-article-body th {
  background: rgba(20,20,20, 0.95);
  color: #efefea;
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.handbook-article-body td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #c4c4be;
}

.handbook-article-body tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.handbook-article-body hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 2rem 0;
}

.handbook-attachments-wrap {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.handbook-attachments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.hb-attachment-card {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hb-attachment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-color: rgba(79,125,255, 0.4);
}

.hb-attachment-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.handbook-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
}

.hb-num-item {
  margin-bottom: 0.6rem;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--accent-gold);
  border-radius: 0 6px 6px 0;
  color: #e2e2dd;
}
.hb-inline-code {
  font-family: var(--font-mono);
  background: rgba(8,9,10, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.83rem;
  color: #82b3b8;
}
.hb-emoji-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(88, 101, 242, 0.15);
  color: #a5b4fc;
  font-size: 0.78rem;
  font-family: var(--font-mono);
}


/* Glowing In-Page Search Highlights */
mark.search-highlight {
  background: rgba(255,210,0, 0.32) !important;
  color: #fff !important;
  text-shadow: 0 0 8px rgba(255,225,77, 0.8);
  padding: 1px 5px !important;
  border-radius: 4px !important;
  border-bottom: 2px solid #ffd200 !important;
  box-shadow: 0 0 14px rgba(255,210,0, 0.65), inset 0 0 6px rgba(255,210,0, 0.35) !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
  display: inline-block !important;
}

mark.search-highlight.current-match {
  background: rgba(79,125,255, 0.55) !important;
  color: #ffffff !important;
  border-bottom: 2px solid #8fb0ff !important;
  box-shadow: 0 0 22px rgba(79,125,255, 0.95), 0 0 0 2px #4f7dff !important;
  animation: pulseGlow 1.2s infinite alternate !important;
}

@keyframes pulseGlow {
  0% { transform: scale(1); box-shadow: 0 0 14px rgba(79,125,255, 0.7); }
  100% { transform: scale(1.08); box-shadow: 0 0 26px rgba(79,125,255, 1); }
}

.hb-search-matches-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  margin-bottom: 1.25rem;
  background: rgba(255,210,0, 0.1);
  border: 1px solid rgba(255,210,0, 0.3);
  border-radius: 8px;
  font-size: 0.82rem;
  color: #fff4b3;
}

.hb-match-nav-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hb-match-nav-btn:hover {
  background: rgba(255,210,0, 0.25);
  border-color: #ffd200;
  color: #fff;
}


/* Hero Discord Community Card (Right Aligned, Sleek & Modern) */
.portal-hero-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .portal-hero-right {
    justify-content: flex-start;
    width: 100%;
    margin-top: 0.5rem;
  }
}

.hero-discord-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(88, 101, 242, 0.1);
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: 14px;
  padding: 12px 18px;
  text-decoration: none;
  transition: all 0.25s ease;
  min-width: 220px;
  backdrop-filter: blur(8px);
}

.hero-discord-card:hover {
  background: rgba(88, 101, 242, 0.2);
  border-color: rgba(88, 101, 242, 0.7);
  box-shadow: 0 0 24px rgba(88, 101, 242, 0.45), 0 8px 20px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.hero-dc-badge-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-dc-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #5865F2;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 16px rgba(88, 101, 242, 0.6);
  flex-shrink: 0;
}

.hero-dc-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.hero-dc-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a5b4fc;
}

.hero-dc-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
}

.hero-dc-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #9a9a94;
  font-family: var(--font-mono);
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.online-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6aa77a;
  box-shadow: 0 0 8px #6aa77a;
  display: inline-block;
}


/* ==========================================================================
   FivemPD Puan Marketi (Point Shop)
   ========================================================================== */
.market-header-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  backdrop-filter: blur(12px);
}

.market-balance-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,210,0, 0.08);
  border: 1px solid rgba(255,210,0, 0.35);
  border-radius: 12px;
  padding: 10px 18px;
  box-shadow: 0 0 20px rgba(255,210,0, 0.15);
}

.balance-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255,210,0, 0.18);
  color: #ffe14d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.balance-amount-gold {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffe14d;
  line-height: 1.1;
  text-shadow: 0 0 14px rgba(255,225,77, 0.5);
}

.market-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.market-item-card {
  background: rgba(20,20,20, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.market-item-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.market-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.15rem;
}

.market-card-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  border: 1px solid;
}

.market-price-badge {
  font-size: 0.82rem;
  font-weight: 800;
  color: #efefea;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.market-item-abbrev {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.market-item-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px;
  line-height: 1.3;
}

.market-item-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  min-height: 42px;
}

.market-card-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}


/* Market Card Photo Banner */
.market-card-banner {
  position: relative;
  width: 100%;
  height: 140px;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.market-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.market-item-card:hover .market-banner-img {
  transform: scale(1.08);
}

.market-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(20,20,20, 0.2) 0%, rgba(20,20,20, 0.85) 100%);
}

.market-card-banner .market-price-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(20,20,20, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.market-banner-icon-pill {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(20,20,20, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  z-index: 2;
}

/* Custom Modal Backdrop & Dialog */
.custom-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8,9,10, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeInModal 0.2s ease-out;
}

.custom-modal-dialog {
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85), 0 0 30px rgba(79,125,255, 0.2);
  overflow: hidden;
  animation: scalePopModal 0.25s ease-out;
}

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

.custom-modal-close {
  background: none;
  border: none;
  color: #9a9a94;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.15s ease;
}

.custom-modal-close:hover {
  color: #fff;
}

.custom-modal-body {
  padding: 1.5rem;
}

.modal-item-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 1.25rem;
}

.modal-preview-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.modal-balance-calc {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
}

.calc-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

.custom-modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scalePopModal {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ================= GLOBAL NOTIFICATIONS & BADGE COUNTERS ================= */
.nav-counter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  color: #9a9a94;
  margin-left: 5px;
  transition: all 0.2s ease;
  vertical-align: middle;
}
.nav-counter-pill.active {
  background: #ff3b30;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(255,59,48, 0.7);
  animation: notifPillPulse 2s infinite;
}
@keyframes notifPillPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); box-shadow: 0 0 14px rgba(255,59,48, 0.9); }
  100% { transform: scale(1); }
}

.qs-badge {
  background: #ff3b30;
  color: #fff;
  border-radius: 9999px;
  padding: 1px 6px;
  font-size: 0.65rem;
  font-weight: 800;
  margin-left: 4px;
}

/* Flyout Notification Bell in Navbar */
.notif-dropdown-wrapper {
  position: relative;
  display: inline-block;
}
.notif-bell-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #c4c4be;
  cursor: pointer;
  transition: all 0.2s ease;
}
.notif-bell-btn:hover {
  background: rgba(255,210,0, 0.15);
  border-color: rgba(255,210,0, 0.4);
  color: #ffe14d;
}
.notif-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff3b30;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 9999px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #0a0a0a;
  box-shadow: 0 0 10px rgba(255,59,48, 0.7);
}
.notif-count-badge.hidden {
  display: none !important;
}

.notif-flyout-box {
  position: absolute;
  right: 0;
  top: 45px;
  width: 380px;
  max-width: 90vw;
  background: #151515;
  border: 1.5px solid rgba(255,210,0, 0.35);
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(16px);
  animation: notifDropFade 0.2s ease-out;
}
@keyframes notifDropFade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.notif-flyout-box.show {
  display: flex !important;
}
.notif-flyout-header {
  padding: 10px 14px;
  background: rgba(34,34,34, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.notif-unread-tag {
  background: rgba(255,210,0, 0.15);
  color: #ffe14d;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}
.notif-action-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #9a9a94;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.notif-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.notif-action-btn.notif-clear:hover {
  background: rgba(255,59,48, 0.2);
  border-color: rgba(255,59,48, 0.4);
  color: #ff6b61;
}
.notif-flyout-body {
  max-height: 380px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 9px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
  position: relative;
}
.notif-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}
.notif-item.unread {
  background: rgba(79,125,255, 0.08);
  border-color: rgba(79,125,255, 0.25);
}
.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4f7dff;
  box-shadow: 0 0 6px #4f7dff;
}
.notif-icon-box {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}
.notif-content {
  flex: 1;
  min-width: 0;
}
.notif-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 2px;
}
.notif-desc {
  font-size: 0.74rem;
  color: #9a9a94;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.notif-time {
  font-size: 0.66rem;
  color: #75756f;
  margin-top: 4px;
}


    /* ================= TOP-LEFT QUICK ROLE SWITCHER ================= */
    .quick-role-dropdown-wrapper {
        position: relative;
        display: inline-flex;
        align-items: center;
        z-index: 1002;
    }
    .quick-role-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: rgba(20,20,20, 0.85);
        border: 1px solid rgba(255,210,0, 0.4);
        border-radius: 9999px;
        padding: 5px 12px;
        color: #e2e2dd;
        font-size: 0.74rem;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s ease;
        backdrop-filter: blur(10px);
        white-space: nowrap;
        user-select: none;
    }
    .quick-role-btn:hover {
        background: rgba(255,210,0, 0.18);
        border-color: var(--accent-gold);
        color: #fff;
        box-shadow: 0 0 14px rgba(255,210,0, 0.3);
    }
    .quick-role-btn.active {
        background: rgba(255,210,0, 0.22);
        border-color: var(--accent-gold);
        color: #ffe14d;
    }
    .quick-role-dropdown-menu {
        position: absolute !important;
        top: calc(100% + 8px) !important;
        left: 0 !important;
        width: 250px !important;
        background: #121212 !important;
        border: 1.5px solid rgba(255,210,0, 0.45) !important;
        border-radius: 12px !important;
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.95), 0 0 25px rgba(255,210,0, 0.15) !important;
        display: none !important;
        flex-direction: column !important;
        overflow: hidden !important;
        z-index: 1003 !important;
        padding: 6px !important;
    }
    .quick-role-dropdown-menu.show {
        display: flex !important;
        animation: quickRoleSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    }
    @keyframes quickRoleSlideDown {
        from {
            opacity: 0;
            transform: translateY(-8px) scale(0.97);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
    .quick-role-menu-header {
        padding: 6px 10px;
        background: rgba(34,34,34, 0.6);
        border-radius: 8px;
        margin-bottom: 5px;
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        color: #9a9a94;
        display: flex;
        align-items: center;
        gap: 6px;
        text-transform: uppercase;
    }
    .quick-role-items-list {
        display: flex;
        flex-direction: column;
        gap: 3px;
        max-height: 360px;
        overflow-y: auto;
    }
    .quick-role-item {
        display: flex !important;
        align-items: center !important;
        gap: 9px !important;
        padding: 7px 10px !important;
        border-radius: 8px !important;
        text-decoration: none !important;
        color: #c4c4be !important;
        background: transparent !important;
        transition: all 0.15s ease !important;
    }
    .quick-role-item:hover {
        background: rgba(255, 255, 255, 0.08) !important;
        color: #fff !important;
        transform: translateX(2px) !important;
    }
    .quick-role-item.active {
        background: rgba(255,210,0, 0.14) !important;
        border: 1px solid rgba(255,210,0, 0.4) !important;
        color: #ffe14d !important;
    }
    .role-badge-icon {
        width: 26px;
        height: 26px;
        border-radius: 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    .role-badge-icon.gold { background: rgba(255,210,0, 0.25); color: #ffe14d; }
    .role-badge-icon.chief { background: rgba(255,210,0, 0.25); color: #ffd200; }
    .role-badge-icon.admin { background: rgba(255,59,48, 0.25); color: #ff6b61; }
    .role-badge-icon.supervisor { background: rgba(79,125,255, 0.25); color: #8fb0ff; }
    .role-badge-icon.officer { background: rgba(106,167,122, 0.25); color: #6aa77a; }
    .role-badge-icon.citizen { background: rgba(154,154,148, 0.25); color: #c4c4be; }
    .role-badge-icon.guest { background: rgba(117,117,111, 0.25); color: #9a9a94; }
    .role-info {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-width: 0;
    }
    .role-name {
        font-size: 0.76rem;
        font-weight: 700;
        line-height: 1.2;
    }
    .role-desc {
        font-size: 0.65rem;
        color: #9a9a94;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .active-indicator {
        color: var(--accent-gold);
        font-size: 0.75rem;
        margin-left: auto;
    }

    /* Notification Tabs */
    .notif-tab-pill {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 6px 10px;
        font-size: 0.74rem;
        font-weight: 700;
        color: #9a9a94;
        background: transparent;
        border: 1px solid transparent;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    .notif-tab-pill:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
    }
    .notif-tab-pill.active {
        color: #ffe14d;
        background: rgba(255,210,0, 0.15);
        border-color: rgba(255,210,0, 0.35);
    }
    .notif-tab-badge {
        background: #ff3b30;
        color: #fff;
        font-size: 0.65rem;
        font-weight: 800;
        padding: 1px 6px;
        border-radius: 10px;
    }
