/* ===================================================================
   HAMILTON NEW ZEALAND ROLEPLAY (HNZRP) — OFFICIAL DESIGN SYSTEM
   Theme: Precision Dark Law Enforcement, Glassmorphism & Police Accents
   Palette: AMOLED Black #000000, Deep Navy #020617, Royal Blue #1d4ed8, Cyan #38bdf8
   =================================================================== */

:root {
  --bg-core: #03060c;
  --bg-surface: rgba(8, 14, 28, 0.4);
  --bg-card: rgba(8, 14, 28, 0.32);
  --bg-card-hover: rgba(14, 24, 46, 0.48);
  
  --primary-navy: #001233;
  --accent-blue: #2563eb;
  --accent-cyan: #38bdf8;
  --accent-red: #ef4444;
  --accent-gold: #f59e0b;
  
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-card: rgba(255, 255, 255, 0.13);
  --border-hover: rgba(56, 189, 248, 0.45);
  --border-gold: rgba(245, 158, 11, 0.4);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --max-width: 1240px;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-core);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Mandatory Authentication Gate: Hides entire site until Discord authentication completes */
body.auth-locked {
  overflow: hidden !important;
  height: 100vh !important;
}

body.auth-locked .navbar,
body.auth-locked .main-wrapper,
body.auth-locked footer,
body.auth-locked .nav-user-pill,
body.auth-locked .intro-splash {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.auth-locked .discord-gateway {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* ===================================================================
   ATMOSPHERIC WINDOWS BLOOM WALLPAPER BACKDROP
   =================================================================== */

.bloom-backdrop {
  position: fixed;
  inset: 0;
  background-image: url('assets/site_background.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

.bloom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.45);
  pointer-events: none;
  z-index: 0;
}

/* ===================================================================
   NAVIGATION BAR (Floating Rounded Island - Lakeview City Style)
   =================================================================== */

.navbar {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 0 20px;
}

.nav-container {
  pointer-events: auto;
  width: 100%;
  max-width: var(--max-width);
  height: 66px;
  background: rgba(9, 15, 30, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0 16px 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
  position: relative;
}

.nav-container:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-crest {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.nav-titles {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nav-title-main {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
  line-height: 1.15;
  white-space: nowrap;
}

.nav-title-sub {
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 2px;
  background: #3b82f6;
  border-radius: 2px;
}

.btn-discord-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #5865F2;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-discord-pill:hover {
  background: #4752c4;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
  transform: none;
}

.icon-discord {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ===================================================================
   HERO BANNER
   =================================================================== */

.hero-section {
  position: relative;
  min-height: 84vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 130px 24px 60px;
  overflow: hidden;
  z-index: 2;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  opacity: 0.2;
  filter: contrast(1.1) brightness(0.7);
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.45);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  text-align: center;
  margin: 0 auto;
}

.command-status-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(4, 12, 28, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  margin: 12px auto 22px auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e;
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}

.command-status-text {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #e2e8f0;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.hero-tagline {
  font-size: 1.05rem;
  font-weight: 600;
  color: #38bdf8;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #cbd5e1;
  max-width: 720px;
  margin: 0 auto 36px;
  font-weight: 400;
  line-height: 1.65;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 46px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background: #2563eb;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Quick Metrics Bar */
.metrics-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: rgba(8, 14, 28, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 18px 32px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  max-width: 780px;
  margin: 0 auto;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-num {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
  line-height: 1.1;
}

.metric-num.server-code {
  color: var(--accent-cyan);
  letter-spacing: 0.06em;
}

.metric-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-top: 4px;
}

.metric-separator {
  width: 1px;
  height: 28px;
  background: var(--border-subtle);
}

/* ===================================================================
   GENERIC SECTION LAYOUT
   =================================================================== */

.page-section {
  position: relative;
  z-index: 2;
  padding: 80px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 48px;
}

.section-tag {
  display: none !important;
}

.section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===================================================================
   1. MAIN PANEL: Commissioner Welcome & Police Ranks
   =================================================================== */

.commissioner-feature-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  transition: all 0.3s ease;
}

.commissioner-feature-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

.comm-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 24px;
}

.comm-badge-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: #0f172a;
  border: 1px solid #334155;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.comm-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius-md) - 2px);
  object-fit: cover;
  object-position: center top;
  display: block;
}

.comm-rank-chip {
  position: absolute;
  bottom: -6px;
  right: -6px;
  height: 28px;
  width: auto;
  padding: 2px 4px;
  background: rgba(8, 14, 28, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
  object-fit: contain;
}

.comm-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.comm-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.comm-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 0.98rem;
  color: #cbd5e1;
  line-height: 1.75;
}

.comm-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.quick-links-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.quick-links-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quick-link-btn {
  display: inline-block;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.quick-link-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #ffffff;
}

/* Police Ranks Grid */
.ranks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.rank-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 24px;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.rank-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

.rank-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.rank-epaulette {
  width: 44px;
  height: 64px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  padding: 2px;
}

.rank-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rank-tier-tag {
  display: none !important;
}

.rank-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.rank-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===================================================================
   2. EXECUTIVE LEADERSHIP
   =================================================================== */

.leadership-tier {
  margin-bottom: 40px;
}

.tier-label {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.tier-label span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.leadership-grid {
  display: grid;
  gap: 20px;
}

.leadership-grid.tier-1 {
  grid-template-columns: 1fr;
}

.leadership-grid.tier-2 {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.leadership-grid.tier-4 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.leader-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 24px;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  display: flex;
  gap: 20px;
  align-items: center;
  transition: all 0.25s ease;
}

.leader-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

.leader-avatar-wrap {
  position: relative;
  width: 78px;
  height: 78px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: #020617;
  border: 1px solid var(--border-card);
  overflow: visible;
}

.leader-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.leader-epaulette-chip {
  position: absolute;
  bottom: -6px;
  right: -8px;
  width: 32px;
  height: 46px;
  object-fit: contain;
  background: rgba(3, 7, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  padding: 2px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
  z-index: 2;
}

.leader-details {
  display: flex;
  flex-direction: column;
}

.leader-badge {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.leader-badge.blue {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.leader-badge.cyan {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.leader-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.leader-role {
  font-size: 0.86rem;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 4px;
}

.leader-brief {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Compact leader cards for Supt & Insp */
.leader-card.compact {
  padding: 18px;
}

.leader-card.compact .leader-avatar-wrap {
  width: 66px;
  height: 66px;
}

.leader-card.compact .leader-epaulette-chip {
  width: 26px;
  height: 38px;
  bottom: -5px;
  right: -6px;
}

.leader-card.compact .leader-name {
  font-size: 1.08rem;
}

.leader-dept-tag {
  font-size: 0.74rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: 600;
  margin-top: 4px;
  line-height: 1.35;
  display: block;
}

/* ===================================================================
   3. SPECIALIST DIVISIONS: TABS & CONTENT
   =================================================================== */

.division-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 32px;
  scrollbar-width: thin;
}

.div-tab-btn {
  background: rgba(10, 18, 36, 0.32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: none;
}

.div-tab-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.div-tab-btn.active {
  background: #1e3a8a;
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.division-pane {
  display: none;
  animation: fadeInPane 0.3s ease;
}

.division-pane.active {
  display: block;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.div-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 30px;
  margin-bottom: 24px;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.div-hero-content {
  display: flex;
  align-items: center;
  gap: 24px;
}

.div-badge-crest {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.division-crest-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.div-pane-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.div-pane-motto {
  font-size: 0.94rem;
  color: var(--text-muted);
}

.div-content-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .div-content-split {
    grid-template-columns: 1fr;
  }
}

.div-about-card, .div-personnel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 28px;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.div-subheading {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.div-about-card p {
  font-size: 0.94rem;
  color: #cbd5e1;
  line-height: 1.7;
}

.div-officer-item {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.div-officer-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.div-officer-epaulette {
  width: 38px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

.officer-role-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-weight: 700;
  text-transform: uppercase;
}

.officer-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

.officer-rank {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.officer-duty-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.sub-officers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.sub-officer-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.sub-officer-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.sub-officer-rank {
  font-size: 0.76rem;
  color: var(--text-dim);
}

/* ===================================================================
   4. ROYAL NZ POLICE COLLEGE (RNZPC)
   =================================================================== */

.rnzpc-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.rnzpc-hero-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 24px;
}

.rnzpc-crest-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.rnzpc-headline {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
}

.rnzpc-subhead {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.rnzpc-speech-box {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-left: 3px solid #3b82f6;
  border-radius: var(--radius-sm);
  padding: 28px;
  margin-bottom: 40px;
}

.rnzpc-quote p {
  font-size: 0.96rem;
  color: #e2e8f0;
  line-height: 1.75;
  margin-bottom: 16px;
}

.speech-opening {
  font-size: 1.15rem !important;
  font-weight: 700;
  color: #ffffff !important;
}

.speech-closing {
  margin-top: 20px;
  font-weight: 600;
  color: var(--accent-cyan) !important;
}

.rnzpc-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.rnzpc-info-block {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
}

.rnzpc-block-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.rnzpc-info-block p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===================================================================
   5. ACTIVE ROSTER
   =================================================================== */

.roster-header-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.roster-search-wrapper {
  position: relative;
  min-width: 320px;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--text-dim);
}

#rosterSearchInput {
  width: 100%;
  background: rgba(8, 14, 28, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 12px 38px 12px 42px;
  font-size: 0.88rem;
  color: #ffffff;
  font-family: var(--font-sans);
  outline: none;
  transition: all 0.2s ease;
}

#rosterSearchInput:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.clear-btn {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
}

.clear-btn:hover {
  color: #ffffff;
}

.rank-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.rank-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rank-pill:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.rank-pill.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.roster-display {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.roster-group {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 24px;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.roster-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.roster-group-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.roster-group-count {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--accent-cyan);
}

.officers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.officers-table th {
  text-align: left;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-subtle);
}

.officers-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.officers-table tr:last-child td {
  border-bottom: none;
}

.officers-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.callsign-badge {
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.14);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(96, 165, 250, 0.32);
  display: inline-block;
  font-size: 0.86rem;
}

.qid-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.roblox-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}

.roblox-link:hover {
  text-decoration: underline;
  color: var(--accent-cyan);
}

.discord-user {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.roster-loading-state, .roster-empty-state {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.sheet-toggle-wrap {
  text-align: center;
  margin-top: 28px;
}

.btn-sheet-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sheet-toggle:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.raw-sheet-container {
  margin-top: 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-card);
}

#rawSheetFrame {
  width: 100%;
  height: 520px;
  border: none;
  background: #000000;
}

/* ===================================================================
   6. POLICIES & STANDARDS
   =================================================================== */

.notice-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  margin-bottom: 32px;
}

.notice-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  padding: 4px 10px;
  border-radius: 4px;
}

.notice-text {
  font-size: 0.92rem;
  color: #fde68a;
  line-height: 1.5;
}

.standards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.standard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 30px;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  position: relative;
  transition: all 0.25s ease;
}

.standard-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

.standard-duty-tag {
  display: none !important;
}

.standard-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.standard-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===================================================================
   7. APPLICATIONS
   =================================================================== */

.app-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 44px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.app-badge {
  display: none !important;
}

.app-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
}

.app-desc {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.app-dm-box {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 16px 28px;
  margin-bottom: 24px;
  text-align: left;
  box-shadow: none;
}

.dm-avatar-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1d4ed8;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.dm-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.dm-sub {
  font-size: 0.78rem;
  color: var(--accent-cyan);
}

.app-instruction {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.app-action-wrap {
  display: flex;
  justify-content: center;
}

/* ===================================================================
   FOOTER (Clean NZ Copyright & Made by Ezra)
   =================================================================== */

.footer {
  position: relative;
  z-index: 2;
  background: rgba(3, 7, 18, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 60px 24px 40px;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 520px;
}

.footer-crest {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.footer-brand-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.footer-external-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.footer-btn-roblox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-btn-roblox:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(88, 101, 242, 0.12);
  border: 1px solid rgba(88, 101, 242, 0.32);
  color: #c7d2fe;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-btn-discord:hover {
  background: rgba(88, 101, 242, 0.25);
  border-color: rgba(88, 101, 242, 0.55);
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-links-col {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-links-col a:hover {
  color: var(--accent-cyan);
}

.footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 28px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.copyright-text {
  max-width: 640px;
  line-height: 1.5;
}

.credits-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.credit-highlight {
  color: #ffffff;
  font-weight: 700;
}

.credit-tag {
  color: var(--accent-cyan);
}

/* ===================================================================
   AUTHENTIC DISCORD OAUTH2 & SIGN-IN GATEWAY
   Identical to Discord's official OAuth authorization & login interface
   =================================================================== */

/* ===================================================================
   OFFICIAL DISCORD OAUTH LOGIN GATEWAY
   Directs users to the real discord.com/oauth2/authorize
   =================================================================== */

.discord-gateway {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  padding: 24px 16px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.discord-gateway.dismissed {
  opacity: 0 !important;
  transform: scale(0.97) !important;
  pointer-events: none !important;
  display: none !important;
}

.discord-official-prompt {
  background: rgba(11, 18, 33, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  max-width: 420px;
  width: 100%;
  padding: 34px 28px;
  text-align: center;
  animation: promptFadeIn 0.35s ease forwards;
}

@keyframes promptFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.official-crest-ring {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.official-prompt-crest {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
}

.official-prompt-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.official-prompt-sub {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 22px;
}

.btn-official-discord-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  background: #5865F2;
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  padding: 13px 20px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease, border-color 0.2s ease;
  margin-bottom: 14px;
}

.btn-official-discord-login:hover {
  background: #4752c4;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transform: none;
}

.btn-official-discord-login:active {
  transform: translateY(0);
}

.discord-auth-status {
  width: 100%;
  margin-top: 14px;
  margin-bottom: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

.discord-auth-status.loading {
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #93c5fd;
}

.discord-auth-status.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.auth-fallback-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0 12px;
  color: var(--text-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.auth-fallback-divider::before,
.auth-fallback-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.auth-fallback-divider span {
  padding: 0 10px;
}
.auth-fallback-form {
  margin-bottom: 16px;
}
.auth-input-wrapper {
  display: flex;
  gap: 8px;
}
.auth-text-input {
  flex: 1;
  background: rgba(2, 6, 23, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #ffffff;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}
.auth-text-input:focus {
  border-color: var(--accent-cyan);
}
.btn-auth-submit {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}
.btn-auth-submit:hover {
  background: #1d4ed8;
}

.official-prompt-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.official-prompt-note strong {
  color: #ffffff;
}

/* Fixed Floating Discord User Session Widget (Bottom-Left Corner) */
.nav-user-pill {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(8, 14, 28, 0.95);
  border: 1px solid #334155;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.nav-user-pill:hover {
  border-color: #64748b;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}

.nav-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: #1e293b;
  border: 1.5px solid #475569;
}

.nav-user-info {
  display: flex;
  flex-direction: column;
}

.nav-user-status {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #22c55e;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.nav-user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-sans);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.btn-logout {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
  margin-left: 4px;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  user-select: none;
}

.btn-logout:hover {
  color: #ffffff;
  background: #dc2626;
  border-color: #dc2626;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

@media (max-width: 640px) {
  .nav-user-pill {
    bottom: 16px;
    left: 16px;
    padding: 5px 10px 5px 6px;
    gap: 8px;
  }
  .nav-user-avatar {
    width: 26px;
    height: 26px;
  }
  .nav-user-name {
    max-width: 85px;
  }
  .btn-logout span {
    display: none;
  }
}

/* ===================================================================
   CINEMATIC INTRO SPLASH & ANIMATED SHOWCASE BANNER
   =================================================================== */

.intro-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #030712;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.intro-splash.dismissed {
  opacity: 0 !important;
  transform: translateY(-40px) !important;
  pointer-events: none !important;
  display: none !important;
}

.intro-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.86) contrast(1.1);
  transform: scale(1.04);
  animation: introZoom 6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes introZoom {
  0% { transform: scale(1.08); filter: brightness(0.80); }
  100% { transform: scale(1.01); filter: brightness(0.90); }
}

.intro-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.65);
}

.intro-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 30px;
  max-width: 860px;
}

.intro-tag {
  display: none !important;
}

.intro-slider-frame {
  overflow: hidden;
  margin-bottom: 12px;
}

.intro-title {
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  transform: translateY(100%);
  opacity: 0;
  animation: introSlideText 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.9);
}

.intro-sub-frame {
  overflow: hidden;
  margin-bottom: 28px;
}

.intro-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  font-weight: 600;
  color: #93c5fd;
  letter-spacing: 0.08em;
  transform: translateY(100%);
  opacity: 0;
  animation: introSlideText 1s cubic-bezier(0.16, 1, 0.3, 1) 0.65s forwards;
}

.intro-bar {
  width: 220px;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  margin: 0 auto 24px;
  overflow: hidden;
}

.intro-bar-fill {
  width: 0%;
  height: 100%;
  background: #2563eb;
  border-radius: 999px;
  animation: introProgress 2.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

.intro-skip-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0;
  animation: introFadeIn 0.8s ease 1s forwards;
}

.intro-skip-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: #38bdf8;
  transform: translateY(-1px);
}

@keyframes introSlideText {
  0% {
    transform: translateY(110%);
    opacity: 0;
    filter: blur(6px);
  }
  100% {
    transform: translateY(0);
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes introFadeIn {
  to { opacity: 1; }
}

@keyframes introProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* In-Page Leadership Showcase Banner */
.leadership-showcase-banner {
  position: relative;
  width: 100%;
  min-height: 240px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-banner-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.84) contrast(1.1);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.leadership-showcase-banner:hover .showcase-banner-img {
  transform: scale(1.03);
  filter: brightness(0.92) contrast(1.12);
}

.showcase-banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.65);
}

.showcase-banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 38px 24px;
  max-width: 820px;
}

.showcase-badge {
  display: none !important;
}

.showcase-slide-wrap {
  position: relative;
  overflow: hidden;
}

.showcase-title {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
  animation: showcaseSlideIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
}

.showcase-author {
  font-family: var(--font-mono);
  font-size: 0.94rem;
  font-weight: 600;
  color: #93c5fd;
  letter-spacing: 0.05em;
  animation: showcaseSlideIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.showcase-indicator {
  width: 120px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  margin: 18px auto 0;
  position: relative;
  overflow: hidden;
  border-radius: 999px;
}

.indicator-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 40%;
  background: #38bdf8;
  animation: indicatorSlide 2.4s infinite ease-in-out;
}

@keyframes showcaseSlideIn {
  0% {
    transform: translateY(24px);
    opacity: 0;
    filter: blur(4px);
  }
  100% {
    transform: translateY(0);
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes indicatorSlide {
  0% { left: -40%; }
  100% { left: 140%; }
}

/* ===================================================================
   RESPONSIVE QUERIES
   =================================================================== */

@media (max-width: 868px) {
  .navbar {
    top: 10px;
    padding: 0 12px;
  }

  .nav-container {
    height: 58px;
    padding: 0 16px;
    border-radius: 999px;
  }

  .nav-links {
    display: none;
  }
  
  .commissioner-feature-card {
    padding: 24px;
  }
  
  .comm-header {
    flex-direction: column;
    text-align: center;
  }
  
  .comm-title {
    font-size: 1.4rem;
  }
  
  .metrics-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px;
  }
  
  .metric-separator {
    display: none;
  }
  
  .roster-header-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .roster-search-wrapper {
    min-width: 100%;
  }
}

/* ===================================================================
   MULTI-PAGE PORTAL ARCHITECTURE & EXPANDED VIEWS
   =================================================================== */

.portal-main-wrapper {
  position: relative;
  z-index: 2;
  min-height: 80vh;
}

.portal-page {
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}

.portal-page.active {
  display: block;
  opacity: 1;
  animation: pageFadeIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Page Top Banner */
.page-top-banner {
  padding: 128px 24px 44px;
  background: #081226;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.page-banner-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 700;
}

.breadcrumb-separator {
  color: rgba(255, 255, 255, 0.25);
}

.breadcrumb-current {
  color: #ffffff;
}

.page-banner-title {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.page-banner-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 780px;
  line-height: 1.6;
}

/* Official Radio Codes Tables (K-Codes & Status 10-Codes) */
.codes-table-container {
  margin-top: 16px;
}

.status-codes-section {
  margin-top: 36px;
}

.status-codes-heading-wrap {
  text-align: center;
  margin-bottom: 16px;
}

.status-codes-red-title {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 800;
  color: #ef4444;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.codes-table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(6, 11, 22, 0.65);
}

.police-codes-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: transparent;
}

.police-codes-table thead tr {
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.police-codes-table th {
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.police-codes-table th.col-code {
  width: 120px;
  text-align: center;
}

.police-codes-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
}

.police-codes-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.015);
}

.police-codes-table tbody tr:nth-child(even) {
  background: transparent;
}

.police-codes-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.police-codes-table td {
  padding: 11px 20px;
  vertical-align: middle;
}

.police-codes-table td.col-code {
  text-align: center;
}

.code-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  box-shadow: none;
}

.code-pill.k-code {
  background: rgba(30, 58, 138, 0.45);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #bfdbfe;
}

.code-pill.ten-code {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}

.police-codes-table td.col-desc {
  font-size: 0.92rem;
  color: #cbd5e1;
  font-weight: 500;
  line-height: 1.45;
}

.policy-feature-block {
  background: rgba(10, 18, 36, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.policy-block-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.policy-block-desc {
  font-size: 0.92rem;
  color: #94a3b8;
  margin-bottom: 22px;
}

/* Division Meta Details */
.div-meta-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(4, 10, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 20px;
}

.div-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.div-meta-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
}

.div-meta-val {
  font-size: 0.88rem;
  color: #e2e8f0;
  font-weight: 500;
  line-height: 1.45;
}

/* Application Checklist */
.app-req-checklist {
  background: rgba(4, 10, 24, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin: 24px 0;
}

.checklist-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.checklist-items {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.checklist-items li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checklist-items li::before {
  content: "✓";
  font-weight: 800;
  color: #22c55e;
  font-family: var(--font-mono);
}

/* Auth & Controls */
.login-auth-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 18px;
}

.leader-role-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 8px;
}

.sync-indicator-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: #22c55e;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===================================================================
   SIMPLE & ACCESSIBLE HOMEPAGE HUB
   =================================================================== */

.hero-simple {
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 130px 24px 60px;
}

.portal-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
  margin: 36px 0 40px;
  text-align: left;
}

.portal-hub-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(8, 16, 36, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  text-decoration: none;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.portal-hub-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent-cyan);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.portal-hub-card:hover {
  background: rgba(14, 26, 56, 0.72);
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.portal-hub-card:hover::before {
  opacity: 1;
}

.hub-card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.portal-hub-card:hover .hub-card-icon {
  background: var(--accent-cyan);
  color: #030712;
}

.hub-card-body {
  flex: 1;
  min-width: 0;
}

.hub-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.hub-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.hub-card-arrow {
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.25rem;
  font-weight: 600;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.portal-hub-card:hover .hub-card-arrow {
  color: var(--accent-cyan);
  transform: translateX(4px);
}


