/* ==========================================================================
   SOCIETY POLICE DEPARTMENT // THEME V8 VISUAL PRO MAX
   Next-Generation Tactical Cyber Command & Visual Excellence
   ========================================================================== */

:root {
  --neon-blue: #38bdf8;
  --neon-cyan: #06b6d4;
  --neon-gold: #fbbf24;
  --neon-amber: #f59e0b;
  --neon-red: #ef4444;
  --neon-emerald: #10b981;
  --card-bg-glass: rgba(10, 18, 36, 0.72);
  --card-border-glow: rgba(56, 189, 248, 0.22);
  --card-hover-border: rgba(56, 189, 248, 0.65);
}

/* 1. INTERACTIVE MOUSE SPOTLIGHT ON CARDS */
.card-spotlight,
.radio-card,
.article-card,
.station-rule-card,
.leave-card,
.lspd-rule-card,
.fine-card,
.felony-card,
.permission-card,
.radio-tier-card {
  position: relative;
  background: var(--card-bg-glass) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--card-border-glow) !important;
  border-radius: 14px !important;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease !important;
}

/* Mouse radial reflection on hover */
.card-spotlight::before,
.radio-card::before,
.article-card::before,
.station-rule-card::before,
.leave-card::before,
.lspd-rule-card::before,
.fine-card::before,
.radio-tier-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(56, 189, 248, 0.12), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.card-spotlight:hover::before,
.radio-card:hover::before,
.article-card:hover::before,
.station-rule-card:hover::before,
.leave-card:hover::before,
.lspd-rule-card:hover::before,
.fine-card:hover::before,
.radio-tier-card:hover::before {
  opacity: 1;
}

/* Subtle corner tech notches on hover */
.card-spotlight:hover,
.radio-card:hover,
.article-card:hover,
.station-rule-card:hover,
.leave-card:hover,
.lspd-rule-card:hover,
.fine-card:hover,
.radio-tier-card:hover {
  transform: translateY(-4px) scale(1.008);
  border-color: var(--card-hover-border) !important;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.65),
              0 0 24px 0 rgba(56, 189, 248, 0.18),
              inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* 2. SECTION 04: RADIO TIER TEMPLATE CARDS (صورة رابعة - قوالب درجات الأكواد) */
.radio-tier-selector-block {
  margin: 24px 0 32px 0;
}

.radio-tier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.radio-tier-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
}

.radio-tier-header h3 span {
  color: var(--neon-blue);
}

.radio-tier-sub {
  font-size: 0.85rem;
  color: #94a3b8;
}

.radio-tier-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.radio-tier-card {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  background: rgba(10, 18, 38, 0.85) !important;
  border: 1px solid rgba(56, 189, 248, 0.2) !important;
  border-radius: 14px;
  cursor: pointer;
  text-align: right;
  position: relative;
  user-select: none;
}

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

.radio-tier-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.radio-tier-count-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.radio-tier-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0 0 6px 0;
  line-height: 1.4;
}

.radio-tier-range {
  font-family: 'Outfit', monospace;
  font-size: 0.82rem;
  color: #38bdf8;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.radio-tier-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 14px 0;
  flex-grow: 1;
}

.radio-tier-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
}

.radio-tier-status .tier-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.radio-tier-status .tier-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #475569;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

/* Tier Specific Themes */
.radio-tier-card[data-cat="code"] .radio-tier-icon {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.35);
  color: #06b6d4;
}
.radio-tier-card[data-cat="code"] .radio-tier-range { color: #06b6d4; }

.radio-tier-card[data-cat="zero"] .radio-tier-icon {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}
.radio-tier-card[data-cat="zero"] .radio-tier-range { color: #60a5fa; }

.radio-tier-card[data-cat="ten"] .radio-tier-icon {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}
.radio-tier-card[data-cat="ten"] .radio-tier-range { color: #f87171; }

.radio-tier-card[data-cat="emergency"] .radio-tier-icon {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.radio-tier-card[data-cat="emergency"] .radio-tier-range { color: #fbbf24; }

.radio-tier-card[data-cat="favorites"] .radio-tier-icon {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.35);
  color: #facc15;
}
.radio-tier-card[data-cat="favorites"] .radio-tier-range { color: #facc15; }

/* ACTIVE TIER STATE */
.radio-tier-card.active {
  background: linear-gradient(145deg, rgba(14, 28, 56, 0.95), rgba(7, 14, 30, 0.98)) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.32),
              inset 0 0 18px rgba(56, 189, 248, 0.12) !important;
  transform: translateY(-4px) scale(1.02);
}

.radio-tier-card.active .radio-tier-icon {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.45);
}

.radio-tier-card.active .radio-tier-status {
  color: #38bdf8;
}

.radio-tier-card.active .tier-dot {
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: radarPulse 1.8s infinite;
}

@keyframes radarPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* 3. SECTION 03 & 08: REGULATION & FINES TEMPLATES GRID (صورة ثالثة وبنود المخالفات) */
.fines-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.fine-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: rgba(11, 20, 42, 0.78) !important;
  border: 1px solid rgba(56, 189, 248, 0.18) !important;
  border-radius: 14px;
  position: relative;
}

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

.fine-id-badge {
  font-family: 'Outfit', monospace;
  font-weight: 800;
  font-size: 0.85rem;
  color: #94a3b8;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.fine-cat-tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.fine-cat-tag.cat-traffic {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.fine-cat-tag.cat-security {
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

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

.fine-card-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 16px 0;
  line-height: 1.45;
}

.fine-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.fine-metric {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
}

.fine-metric .m-label {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 2px;
}

.fine-metric .m-val {
  font-family: 'Outfit', 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
}

.fine-metric .jail-val {
  color: #60a5fa;
}

.fine-metric .money-val {
  color: #34d399;
}

.fine-card-extra {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.45);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
  line-height: 1.4;
  flex-grow: 1;
}

.fine-card-extra .extra-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.fine-copy-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fine-copy-card-btn:hover {
  background: #38bdf8;
  color: #030712;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

/* 4. ARTICLES GRID UPGRADE (نظام قوالب المواد واللوائح) */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)) !important;
  gap: 18px !important;
}

.article-card {
  padding: 22px !important;
  display: flex;
  flex-direction: column;
}

.article-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px !important;
}

.art-num-badge {
  font-family: 'Outfit', 'Cairo', sans-serif;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  padding: 5px 12px !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.1)) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.2);
}

.article-card-title {
  font-size: 1.12rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  margin-bottom: 12px !important;
  line-height: 1.45 !important;
}

.article-card-text {
  font-size: 0.9rem !important;
  line-height: 1.7 !important;
  color: #cbd5e1 !important;
  margin-bottom: 18px !important;
  flex-grow: 1;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.art-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.12) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  border-radius: 8px !important;
  padding: 7px 14px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
}

.art-copy-btn:hover {
  background: #38bdf8 !important;
  color: #020617 !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.45) !important;
}

/* 5. AMBIENT GLOW & BACK-LIT VISUAL DEPTH */
#tacticalCursorGlow {
  z-index: 1 !important;
  mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.14) 0%, rgba(14, 165, 233, 0.04) 45%, transparent 70%) !important;
}

/* Glass View Toggles (Cards vs Table) */
.view-switch-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.view-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 7px;
  background: transparent;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-switch-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .radio-tier-cards-grid {
    grid-template-columns: 1fr;
  }
  .fines-cards-grid {
    grid-template-columns: 1fr;
  }
  .articles-grid {
    grid-template-columns: 1fr !important;
  }
}
