/* ============================================================
   MORTALITY — Deaths, Spirit Healer & The Grudge
   WhoDASH / Belmont Labs — BL-002
   ============================================================
   Sources consolidated from:
     style.css ~7252–7710   Legacy dash-card mortality block:
                            header, death stats grid, nemesis,
                            danger zone, log table, boss cards
     style.css ~10330–10360 Confidence badges (.conf-*)
     style.css ~10610–10950 deaths-grid / death-card / death
                            details / killing blow / attackers
     style.css ~12427–12952 #tab-mortality scoped block:
                            nav, overview stats, charts,
                            analysis grid, timeline, death
                            cards, pvp stats, empty states
     sections_mortality.php ~55–1549 (full inline <style>):
                            .mortality-loading, spirit-healer
                            tab (.sh-*) with ghost-flame nav
                            animation, grudge tab (.gr-*)
                            with hell-flame nav animation
   ⚠️  PENDING ACTION: Remove the inline <style> block from
       sections_mortality.php (lines 55–1549) once this file
       is linked.
   NOTE: .stat-value / .stat-label inside #tab-mortality are
   scoped to that ID. .muted is a shared global utility.
   ============================================================ */

/* ============================================================
   LOADING STATE
   ============================================================ */

.mortality-loading {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.loading-spinner {
  font-size: 3rem;
  margin-bottom: 16px;
  animation: mortalityPulse 2s infinite;
}

@keyframes mortalityPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* ============================================================
   LEGACY HEADER & DASH-CARD MORTALITY BLOCK
   (original flat layout used before tab redesign)
   ============================================================ */

.mortality-header {
  text-align: center;
  padding: 20px 0 30px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 20px;
}

.mortality-header h1 {
  font-size: 2.5rem;
  color: #d32f2f;
  margin: 0 0 10px 0;
}

.mortality-subtitle {
  color: #64748b;
  font-size: 1.1rem;
  margin: 0;
}

.mortality-tab-content {
  display: none;
}

.mortality-tab-content.active {
  display: block;
}

.mortality-content-wrapper {
  min-height: 400px;
}

/* dash-card override for mortality grid layout */
.dash-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  background: #fff;
  border: 1px solid #bcd0ee;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  margin: 14px 0;
}

.dash-card h3 {
  grid-column: 1 / -1;
  font-size: 1.3rem;
  color: #2456a5;
  margin: 0 0 16px 0;
  font-weight: 700;
}

/* ============================================================
   DEATH STATS GRID (legacy)
   ============================================================ */

.death-subtitle {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: #d32f2f;
  margin: -10px 0 20px 0;
  font-style: italic;
}

.death-stats-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.death-stat-item {
  text-align: center;
  padding: 20px 15px;
  background: linear-gradient(135deg, #fff5f5 0%, #ffebee 100%);
  border-radius: 12px;
  border: 1px solid #ffcdd2;
}

.death-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #d32f2f;
  margin-bottom: 8px;
}

.death-stat-label {
  font-size: 0.85rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* ============================================================
   ARCH NEMESIS CARD (legacy)
   ============================================================ */

.arch-nemesis-container {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nemesis-main {
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, #fff5f5 0%, #fce4ec 100%);
  border-radius: 12px;
  border: 2px solid #f48fb1;
}

.nemesis-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: #c62828;
  margin-bottom: 8px;
}

.nemesis-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  margin-bottom: 20px;
  font-style: italic;
}

.nemesis-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.nemesis-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.nemesis-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2456a5;
}

.nemesis-stat-label {
  font-size: 0.8rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ============================================================
   DANGER ZONE (legacy)
   ============================================================ */

.danger-zone {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  border-radius: 12px;
  border: 2px solid #ffb74d;
}

.danger-zone-label {
  font-size: 0.85rem;
  color: #f57c00;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  font-weight: 600;
}

.danger-zone-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #e65100;
  margin-bottom: 5px;
}

.danger-zone-deaths {
  font-size: 0.95rem;
  color: #64748b;
}

/* ============================================================
   DEATH TREND / INTERESTING STATS (legacy)
   ============================================================ */

.death-trend-chart {
  grid-column: 1 / -1;
  width: 100%;
  height: 250px;
  margin-top: 15px;
  background: #f8fafc;
  border-radius: 8px;
}

.interesting-stats-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.interesting-stat {
  text-align: center;
  padding: 24px 20px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-radius: 12px;
  border: 1px solid #81c784;
}

.interesting-stat-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.interesting-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #2e7d32;
  margin-bottom: 8px;
}

.interesting-stat-label {
  font-size: 0.9rem;
  color: #455a64;
  margin-bottom: 5px;
  font-weight: 500;
}

.interesting-stat-note {
  font-size: 0.8rem;
  color: #64748b;
  font-style: italic;
  margin-top: 8px;
}

/* ============================================================
   DEATH LOG TABLE (legacy)
   ============================================================ */

.death-log-table {
  grid-column: 1 / -1;
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.death-log-table thead {
  background: linear-gradient(90deg, #2456a5 0%, #3182ce 100%);
  color: #fff;
}

.death-log-table th {
  padding: 14px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.death-log-row {
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  transition: background-color 0.2s;
  background: #fff;
}

.death-log-row:hover {
  background: #fef2f2;
}

.death-log-row.expanded {
  background: #fee;
}

.death-log-table td {
  padding: 12px;
  font-size: 0.9rem;
  color: #334155;
}

.death-killer {
  color: #d32f2f;
  font-weight: 600;
}

.detail-row {
  background: #f8fafc;
  border-bottom: 2px solid #cbd5e1;
}

.death-details {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.death-details div {
  font-size: 0.9rem;
  color: #475569;
}

.death-details strong {
  color: #2456a5;
  margin-right: 8px;
}

/* ============================================================
   BOSS DEATH CARDS & TABLE (legacy)
   ============================================================ */

.hardest-boss-card {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%) !important;
  border: 2px solid #ba68c8 !important;
  margin-bottom: 25px;
}

.hardest-boss-content {
  grid-column: 1 / -1;
  text-align: center;
  padding: 20px;
}

.hardest-boss-name {
  font-size: 2rem;
  font-weight: 700;
  color: #6a1b9a;
  margin-bottom: 20px;
}

.hardest-boss-stat {
  margin: 20px 0;
}

.boss-stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #d32f2f;
  display: block;
  margin-bottom: 8px;
}

.boss-stat-label {
  font-size: 0.95rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.boss-timeline {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 2px solid #ce93d8;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-item {
  font-size: 0.95rem;
  color: #455a64;
}

.timeline-label {
  color: #64748b;
  margin-right: 10px;
  font-weight: 500;
}

.timeline-value {
  color: #2456a5;
  font-weight: 600;
}

.boss-death-table {
  grid-column: 1 / -1;
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.boss-death-table thead {
  background: linear-gradient(90deg, #2456a5 0%, #3182ce 100%);
  color: #fff;
}

.boss-death-table th {
  padding: 14px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.boss-death-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.9rem;
  color: #334155;
}

.boss-name {
  color: #6a1b9a;
  font-weight: 600;
}

/* ============================================================
   CONFIDENCE BADGES
   ============================================================ */

.confidence-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.conf-very-high {
  background: #22c55e;
}

.conf-high {
  background: #3b82f6;
}

.conf-medium {
  background: #eab308;
  color: #000;
}

.conf-low {
  background: #f97316;
}

/* ============================================================
   DEATHS GRID & DEATH CARD (modern version)
   ============================================================ */

.deaths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.death-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.death-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.death-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.death-card-title {
  flex: 1;
}

.death-killer-name {
  font-size: 1.15em;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.death-timestamp {
  font-size: 0.85em;
  color: #64748b;
}

.death-confidence {
  margin-left: 12px;
}

.death-card-body {
  padding: 16px;
}

.death-location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.95em;
  color: #475569;
}

.location-icon {
  font-size: 1.2em;
}

.instance-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 600;
}

.death-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 6px;
}

.death-stat-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-mini-label {
  font-size: 0.75em;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-mini-value {
  font-size: 1.1em;
  font-weight: 700;
  color: #1e293b;
}

/* Killing blow */
.killing-blow {
  margin: 16px 0;
  padding: 12px;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-left: 4px solid #dc2626;
  border-radius: 6px;
}

.kb-header {
  font-size: 0.85em;
  font-weight: 700;
  color: #991b1b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.kb-spell {
  font-size: 1.1em;
  font-weight: 700;
  color: #7f1d1d;
  margin-bottom: 6px;
}

.kb-stats {
  font-size: 0.9em;
  color: #991b1b;
}

.kb-damage {
  font-weight: 600;
}

.kb-overkill {
  margin-left: 8px;
  font-style: italic;
  color: #b91c1c;
}

/* Recent attackers */
.recent-attackers {
  margin: 16px 0;
  padding: 12px;
  background: #f1f5f9;
  border-radius: 8px;
}

.attackers-header {
  font-size: 0.85em;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

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

.attacker-item {
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  border-left: 3px solid #cbd5e1;
}

.primary-attacker {
  border-left-color: #dc2626;
  background: #fef2f2;
}

.attacker-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.primary-badge {
  padding: 2px 6px;
  background: #dc2626;
  color: white;
  border-radius: 3px;
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.attacker-stats {
  display: flex;
  gap: 12px;
  font-size: 0.85em;
  color: #64748b;
}

.attacker-stats span {
  display: flex;
  align-items: center;
}

.top-spell {
  padding: 2px 6px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 3px;
  font-weight: 600;
}

.attackers-more {
  padding: 8px;
  text-align: center;
  font-size: 0.85em;
  font-style: italic;
}

/* Detection method */
.detection-method {
  margin: 12px 0;
  padding: 8px 12px;
  background: #fef3c7;
  border-radius: 6px;
  font-size: 0.85em;
}

.method-label {
  color: #78350f;
  font-weight: 600;
  margin-right: 8px;
}

.method-value {
  color: #92400e;
  font-weight: 500;
}

/* Active debuffs */
.active-debuffs {
  margin: 12px 0;
  padding: 10px 12px;
  background: #fae8ff;
  border-radius: 6px;
}

.debuffs-label {
  font-size: 0.85em;
  font-weight: 700;
  color: #86198f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.debuffs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.debuff-badge {
  padding: 4px 8px;
  background: #a855f7;
  color: white;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 600;
}

/* Death footer */
.death-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rez-type {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9em;
  color: #475569;
}

.rez-icon {
  font-size: 1.2em;
}

/* Section header */
.section-header {
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 1.8em;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

/* ============================================================
   #TAB-MORTALITY SCOPED — modern redesigned tabs
   ============================================================ */

/* Layout */
#tab-mortality .mortality-header {
  margin-bottom: 2rem;
  text-align: center;
}

#tab-mortality .mortality-header h1 {
  margin: 0 0 0.5rem 0;
  color: #1e293b;
  font-size: 2.5rem;
}

#tab-mortality .mortality-header .subtitle {
  color: #64748b;
  font-size: 1.1rem;
  margin: 0;
}

/* Navigation */
#tab-mortality .mortality-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

#tab-mortality .nav-tab {
  padding: 0.75rem 1.5rem;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
  color: #64748b;
  font-size: 0.95rem;
}

#tab-mortality .nav-tab:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

#tab-mortality .nav-tab.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

/* Content */
#tab-mortality .mortality-content {
  min-height: 400px;
}

#tab-mortality .tab-content {
  display: none;
}

#tab-mortality .tab-content.active {
  display: block;
}

/* Overview stats */
#tab-mortality .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

#tab-mortality .stat-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s;
}

#tab-mortality .stat-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

#tab-mortality .stat-card.primary {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
}

#tab-mortality .stat-card.danger {
  border-color: #ef4444;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

#tab-mortality .stat-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

#tab-mortality .stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

#tab-mortality .stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
  font-weight: 600;
}

/* Charts */
#tab-mortality .chart-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

#tab-mortality .chart-card h3 {
  margin: 0 0 1.5rem 0;
  color: #1e293b;
  font-size: 1.25rem;
}

#tab-mortality .horizontal-chart {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#tab-mortality .chart-bar {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  gap: 1rem;
  align-items: center;
}

#tab-mortality .bar-label {
  font-weight: 600;
  color: #374151;
  text-transform: capitalize;
}

#tab-mortality .bar-container {
  background: #f1f5f9;
  border-radius: 8px;
  height: 24px;
  overflow: hidden;
}

#tab-mortality .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  border-radius: 8px;
  transition: width 0.8s ease;
}

#tab-mortality .bar-value {
  font-weight: 700;
  color: #374151;
  text-align: center;
}

/* Analysis grid */
#tab-mortality .analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

#tab-mortality .list-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
}

#tab-mortality .list-card h3 {
  margin: 0 0 1rem 0;
  color: #1e293b;
  font-size: 1.1rem;
}

#tab-mortality .list-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#tab-mortality .list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
}

#tab-mortality .list-item.highlight {
  background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
  border: 1px solid #f59e0b;
}

#tab-mortality .item-rank {
  font-weight: 800;
  color: #f59e0b;
  font-size: 1.1rem;
  min-width: 32px;
}

#tab-mortality .item-info {
  flex: 1;
}

#tab-mortality .item-name {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

#tab-mortality .item-meta {
  color: #64748b;
  font-size: 0.85rem;
}

/* Timeline */
#tab-mortality .timeline-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

#tab-mortality .timeline-card h3 {
  margin: 0 0 1.5rem 0;
  color: #1e293b;
  font-size: 1.25rem;
}

#tab-mortality .timeline-chart {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 160px;
  padding-bottom: 0;
}

#tab-mortality .timeline-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 4px;
}

#tab-mortality .timeline-bar .bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  border-radius: 4px 4px 2px 2px;
  min-height: 4px;
  transition: height 0.6s ease;
  flex-shrink: 0;
}

#tab-mortality .timeline-bar .bar-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  flex-shrink: 0;
  line-height: 1;
  padding-top: 2px;
}

/* Death cards (modern) */
#tab-mortality .deaths-header {
  text-align: center;
  margin-bottom: 2rem;
}

#tab-mortality .deaths-header h2 {
  margin: 0 0 0.5rem 0;
  color: #1e293b;
  font-size: 2rem;
}

#tab-mortality .deaths-header p {
  color: #64748b;
  margin: 0;
}

#tab-mortality .deaths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

#tab-mortality .death-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.2s;
}

#tab-mortality .death-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

#tab-mortality .death-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

#tab-mortality .death-time {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
}

#tab-mortality .confidence-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
}

#tab-mortality .death-killer {
  margin-bottom: 1rem;
}

#tab-mortality .killer-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

#tab-mortality .killer-icon {
  font-size: 1.25rem;
}

#tab-mortality .killer-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1e293b;
}

#tab-mortality .killer-spell {
  color: #f59e0b;
  font-weight: 600;
  font-size: 0.9rem;
}

#tab-mortality .death-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

#tab-mortality .detail-item {
  background: #f1f5f9;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  color: #374151;
}

#tab-mortality .death-location {
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
}

/* PvP stats */
#tab-mortality .pvp-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

#tab-mortality .pvp-stat-card {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border: 2px solid #fca5a5;
  border-radius: 16px;
  padding: 1.5rem;
}

#tab-mortality .pvp-stat-card h4 {
  margin: 0 0 1rem 0;
  color: #991b1b;
  font-size: 1.1rem;
}

#tab-mortality .pvp-stat-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#tab-mortality .pvp-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.75rem;
  border-radius: 8px;
}

#tab-mortality .stat-name {
  font-weight: 600;
  color: #7c2d12;
}

#tab-mortality .stat-value {
  font-weight: 700;
  color: #dc2626;
}

/* Empty / error states */
#tab-mortality .empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #64748b;
}

#tab-mortality .empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

#tab-mortality .empty-state h3 {
  margin: 0 0 0.5rem 0;
  color: #374151;
  font-size: 1.5rem;
}

#tab-mortality .empty-state p {
  margin: 0;
  font-size: 1.1rem;
}

#tab-mortality .no-data {
  text-align: center;
  color: #64748b;
  font-style: italic;
  margin: 1rem 0;
}

#tab-mortality .error-message {
  background: #fee2e2;
  border: 2px solid #fca5a5;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  color: #991b1b;
  margin: 2rem 0;
}

#tab-mortality .error-message h3 {
  margin: 0 0 0.5rem 0;
  color: #7c2d12;
}

/* ============================================================
   SPIRIT HEALER TAB — Ghost Flame Nav Button
   ============================================================ */

#tab-mortality .nav-tab[data-tab="spirit-healer"] {
  position: relative;
  overflow: visible;
  isolation: isolate;
  z-index: 0;
}

/* Core flame border */
#tab-mortality .nav-tab[data-tab="spirit-healer"]::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 15px;
  z-index: -1;
  pointer-events: none;
  background: transparent;
  border: 2px solid rgba(56, 189, 248, 0.9);
  box-shadow:
    0 0 4px 1px rgba(186, 230, 253, 0.9),
    0 0 8px 3px rgba(56, 189, 248, 0.7),
    0 0 16px 5px rgba(14, 165, 233, 0.5),
    0 0 28px 8px rgba(7, 89, 133, 0.35);
  animation: sh-flame-breathe 3s ease-in-out infinite;
}

/* Wispy flame tongues */
#tab-mortality .nav-tab[data-tab="spirit-healer"]::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 18px;
  z-index: -2;
  pointer-events: none;
  background: transparent;
  border: 3px solid rgba(125, 211, 252, 0.5);
  box-shadow:
    0 0 10px 4px rgba(56, 189, 248, 0.4),
    0 0 22px 8px rgba(14, 165, 233, 0.25),
    0 0 40px 12px rgba(7, 89, 133, 0.15);
  filter: blur(2px);
  animation: sh-flame-wisp 3s ease-in-out infinite;
  animation-delay: -1.5s;
}

@keyframes sh-flame-breathe {

  0%,
  100% {
    box-shadow:
      0 0 4px 1px rgba(186, 230, 253, 0.9),
      0 0 8px 3px rgba(56, 189, 248, 0.7),
      0 0 16px 5px rgba(14, 165, 233, 0.5),
      0 0 28px 8px rgba(7, 89, 133, 0.35);
    inset: -3px;
    opacity: 0.9;
  }

  50% {
    box-shadow:
      0 0 6px 2px rgba(224, 247, 255, 1),
      0 0 12px 5px rgba(56, 189, 248, 0.85),
      0 0 22px 8px rgba(14, 165, 233, 0.6),
      0 0 38px 12px rgba(7, 89, 133, 0.4);
    opacity: 1;
  }
}

@keyframes sh-flame-wisp {

  0%,
  100% {
    box-shadow:
      0 0 10px 4px rgba(56, 189, 248, 0.4),
      0 0 22px 8px rgba(14, 165, 233, 0.25),
      0 0 40px 12px rgba(7, 89, 133, 0.15);
    opacity: 0.6;
  }

  50% {
    box-shadow:
      0 0 14px 6px rgba(125, 211, 252, 0.55),
      0 0 30px 12px rgba(56, 189, 248, 0.35),
      0 0 54px 18px rgba(14, 165, 233, 0.2);
    opacity: 0.85;
  }
}

#tab-mortality .nav-tab[data-tab="spirit-healer"].active {
  background: #0f2744;
  border-color: #38bdf8;
  color: #bae6fd;
}

#tab-mortality .nav-tab[data-tab="spirit-healer"]:not(.active) {
  border-color: #7dd3fc;
  color: #0ea5e9;
  background: rgba(224, 242, 254, 0.55);
}

#tab-mortality .nav-tab[data-tab="spirit-healer"]:not(.active)::before {
  opacity: 0.55;
}

#tab-mortality .nav-tab[data-tab="spirit-healer"]:not(.active)::after {
  opacity: 0.4;
}

#tab-mortality .nav-tab[data-tab="spirit-healer"]:hover::before,
#tab-mortality .nav-tab[data-tab="spirit-healer"]:hover::after {
  animation-duration: 1.8s;
}

/* ============================================================
   SPIRIT HEALER TAB — Content (.sh-*)
   ============================================================ */

#spirit-healer-tab {
  padding: 0 0 40px;
}

.sh-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.sh-ghost-icon {
  font-size: 2.6rem;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.5));
  animation: sh-float 3.5s ease-in-out infinite;
}

@keyframes sh-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.sh-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 3px;
  letter-spacing: -0.01em;
}

.sh-subtitle {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
}

/* Search panel */
.sh-search-panel {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.sh-search-row {
  margin-bottom: 1rem;
}

.sh-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.sh-search-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  pointer-events: none;
  opacity: 0.45;
  z-index: 1;
}

.sh-input {
  width: 100%;
  padding: 11px 40px 11px 42px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  color: #1e293b;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.sh-input::placeholder {
  color: #94a3b8;
}

.sh-input:focus {
  outline: none;
  border-color: #38bdf8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.sh-clear-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px 6px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, color 0.15s;
}

.sh-clear-btn:hover {
  color: #475569;
}

.sh-filter-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.sh-date-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sh-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
}

.sh-date-input {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  color: #1e293b;
  font-size: 0.88rem;
  font-family: inherit;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.sh-date-input:focus {
  outline: none;
  border-color: #38bdf8;
}

.sh-date-sep {
  color: #94a3b8;
  font-size: 1.1rem;
  padding-bottom: 8px;
  font-weight: 300;
}

.sh-search-btn {
  padding: 9px 22px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid #0ea5e9;
  background: #0ea5e9;
  color: #fff;
  align-self: flex-end;
}

.sh-search-btn:hover {
  background: #0284c7;
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.sh-reset-btn {
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8fafc;
  color: #64748b;
  border: 2px solid #e2e8f0;
  align-self: flex-end;
}

.sh-reset-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #374151;
}

/* Status bar */
.sh-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.sh-status-text {
  font-size: 0.88rem;
  color: #64748b;
  font-weight: 500;
}

.sh-status-text strong {
  color: #1e293b;
  font-weight: 700;
}

.sh-loading-text {
  color: #0ea5e9;
}

.sh-load-all-btn {
  background: white;
  border: 2px solid #e2e8f0;
  color: #0ea5e9;
  border-radius: 8px;
  padding: 5px 16px;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.sh-load-all-btn:hover {
  background: #f0f9ff;
  border-color: #38bdf8;
}

/* Results */
.sh-results-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Death card */
.sh-death-card {
  display: flex;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.2s;
  animation: sh-card-in 0.2s ease both;
}

@keyframes sh-card-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sh-death-card:hover {
  border-color: #7dd3fc;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.12);
}

.sh-death-card.sh-unknown {
  border-color: #e2e8f0;
  opacity: 0.78;
}

/* Left accent strip */
.sh-card-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.1rem 0.85rem 0.85rem;
  min-width: 68px;
  background: #f8fafc;
  border-right: 2px solid #e2e8f0;
  gap: 6px;
}

.sh-death-card[data-killer-type="player"] .sh-card-left {
  background: linear-gradient(180deg, #fee2e2 0%, #fef2f2 100%);
  border-right-color: #fca5a5;
}

.sh-death-card[data-killer-type="npc"] .sh-card-left,
.sh-death-card[data-killer-type="pet"] .sh-card-left {
  background: linear-gradient(180deg, #fef3c7 0%, #fffbeb 100%);
  border-right-color: #fcd34d;
}

.sh-death-card[data-killer-type="environmental"] .sh-card-left {
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  border-right-color: #93c5fd;
}

.sh-killer-type-badge {
  font-size: 1.7rem;
  line-height: 1;
}

.sh-type-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  text-align: center;
  font-weight: 700;
  white-space: nowrap;
}

/* Card body */
.sh-card-body {
  flex: 1;
  padding: 1rem 1.25rem;
  min-width: 0;
}

.sh-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.sh-killer-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sh-killer-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.2;
}

.sh-killer-spell {
  font-size: 0.82rem;
  color: #d97706;
  font-weight: 600;
}

.sh-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.sh-confidence-pill {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 100px;
  border: 1.5px solid currentColor;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.6);
}

.sh-timestamp {
  font-size: 0.78rem;
  color: #94a3b8;
  white-space: nowrap;
  font-weight: 500;
}

/* Location bar */
.sh-location-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #f1f5f9;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  border: 1px solid #e2e8f0;
}

.sh-loc-icon {
  font-size: 0.85rem;
}

.sh-loc-text {
  font-size: 0.85rem;
  color: #374151;
  font-weight: 600;
  flex: 1;
}

.sh-coords {
  font-size: 0.72rem;
  color: #94a3b8;
  font-family: monospace;
  letter-spacing: 0.02em;
}

/* Data grid */
.sh-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 2px 16px;
}

.sh-data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.sh-data-row:hover {
  background: #f8fafc;
}

.sh-data-label {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}

.sh-data-value {
  font-size: 0.82rem;
  color: #1e293b;
  font-weight: 700;
}

/* Skeleton loader */
.sh-death-card.sh-skeleton {
  pointer-events: none;
}

.sh-skel-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e2e8f0;
  animation: sh-shimmer 1.4s ease-in-out infinite;
}

.sh-skel-line {
  height: 12px;
  border-radius: 6px;
  background: #e2e8f0;
  margin-bottom: 10px;
  animation: sh-shimmer 1.4s ease-in-out infinite;
}

.sh-skel-wide {
  width: 55%;
}

.sh-skel-med {
  width: 38%;
}

.sh-skel-narrow {
  width: 22%;
}

@keyframes sh-shimmer {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

/* Empty / error */
.sh-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: #64748b;
}

.sh-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.sh-empty p {
  margin: 0 0 6px;
  font-size: 1rem;
}

.sh-empty-sub {
  font-size: 0.85rem;
  color: #94a3b8;
}

.sh-error {
  background: #fee2e2;
  border: 2px solid #fca5a5;
  color: #991b1b;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
}

/* Pagination */
.sh-pagination {
  padding: 1.5rem 0 0;
}

.sh-pagination-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sh-page-btn {
  background: white;
  border: 2px solid #e2e8f0;
  color: #64748b;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 38px;
  text-align: center;
}

.sh-page-btn:hover:not([disabled]) {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}

.sh-page-btn.sh-page-active {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #fff;
  font-weight: 700;
}

.sh-page-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.sh-page-nav {
  padding: 6px 14px;
}

.sh-page-ellipsis {
  color: #94a3b8;
  padding: 0 4px;
  font-size: 0.9rem;
}

/* ============================================================
   THE GRUDGE TAB — Hell Flame Nav Button
   ============================================================ */

#tab-mortality .nav-tab[data-tab="grudge"] {
  position: relative;
  overflow: visible;
  isolation: isolate;
  z-index: 0;
}

#tab-mortality .nav-tab[data-tab="grudge"]::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 15px;
  z-index: -1;
  pointer-events: none;
  background: transparent;
  border: 2px solid rgba(180, 20, 20, 0.85);
  box-shadow:
    0 0 4px 1px rgba(255, 180, 160, 0.8),
    0 0 8px 3px rgba(200, 30, 30, 0.65),
    0 0 16px 5px rgba(120, 10, 10, 0.45),
    0 0 28px 8px rgba(60, 0, 0, 0.3);
  animation: gr-flame-breathe 3.5s ease-in-out infinite;
}

#tab-mortality .nav-tab[data-tab="grudge"]::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 18px;
  z-index: -2;
  pointer-events: none;
  background: transparent;
  border: 3px solid rgba(160, 20, 20, 0.45);
  box-shadow:
    0 0 10px 4px rgba(180, 30, 30, 0.35),
    0 0 22px 8px rgba(120, 10, 10, 0.22),
    0 0 40px 12px rgba(60, 0, 0, 0.12);
  filter: blur(2px);
  animation: gr-flame-wisp 3.5s ease-in-out infinite;
  animation-delay: -1.75s;
}

@keyframes gr-flame-breathe {

  0%,
  100% {
    box-shadow:
      0 0 4px 1px rgba(255, 180, 160, 0.8),
      0 0 8px 3px rgba(200, 30, 30, 0.65),
      0 0 16px 5px rgba(120, 10, 10, 0.45),
      0 0 28px 8px rgba(60, 0, 0, 0.3);
    opacity: 0.9;
  }

  50% {
    box-shadow:
      0 0 6px 2px rgba(255, 210, 190, 0.95),
      0 0 12px 5px rgba(220, 50, 30, 0.8),
      0 0 22px 8px rgba(150, 20, 10, 0.55),
      0 0 38px 12px rgba(80, 5, 5, 0.38);
    opacity: 1;
  }
}

@keyframes gr-flame-wisp {

  0%,
  100% {
    box-shadow:
      0 0 10px 4px rgba(180, 30, 30, 0.35),
      0 0 22px 8px rgba(120, 10, 10, 0.22),
      0 0 40px 12px rgba(60, 0, 0, 0.12);
    opacity: 0.55;
  }

  50% {
    box-shadow:
      0 0 14px 6px rgba(210, 50, 30, 0.5),
      0 0 30px 12px rgba(160, 20, 10, 0.32),
      0 0 54px 18px rgba(80, 5, 5, 0.18);
    opacity: 0.8;
  }
}

#tab-mortality .nav-tab[data-tab="grudge"].active {
  background: #1a0505;
  border-color: #b91c1c;
  color: #fca5a5;
}

#tab-mortality .nav-tab[data-tab="grudge"]:not(.active) {
  border-color: #ef4444;
  color: #dc2626;
  background: rgba(254, 226, 226, 0.5);
}

#tab-mortality .nav-tab[data-tab="grudge"]:not(.active)::before {
  opacity: 0.5;
}

#tab-mortality .nav-tab[data-tab="grudge"]:not(.active)::after {
  opacity: 0.38;
}

#tab-mortality .nav-tab[data-tab="grudge"]:hover::before,
#tab-mortality .nav-tab[data-tab="grudge"]:hover::after {
  animation-duration: 2s;
}

/* ============================================================
   THE GRUDGE TAB — Content (.gr-*)
   ============================================================ */

#grudge-tab {
  padding: 0 0 40px;
}

/* Header */
.gr-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.gr-skull-icon {
  font-size: 2.6rem;
  filter: drop-shadow(0 0 8px rgba(185, 28, 28, 0.55));
  animation: gr-skull-pulse 3s ease-in-out infinite;
}

@keyframes gr-skull-pulse {

  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(185, 28, 28, 0.55));
  }

  50% {
    filter: drop-shadow(0 0 16px rgba(220, 38, 38, 0.8));
  }
}

.gr-title-block {
  display: flex;
  flex-direction: column;
}

.gr-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 3px;
  letter-spacing: -0.01em;
}

.gr-subtitle {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
  font-style: italic;
}

/* Export panel */
.gr-export-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e0a0a 100%);
  border: 1px solid #3f1a1a;
  border-radius: 14px;
  padding: 0.9rem 1.25rem;
  margin-bottom: 1.5rem;
}

.gr-export-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.gr-export-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.gr-export-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gr-export-text strong {
  font-size: 0.9rem;
  color: #fca5a5;
  font-weight: 700;
  white-space: nowrap;
}

.gr-export-text span {
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gr-export-text code {
  font-family: 'Courier New', monospace;
  color: #f97316;
  font-size: 0.77rem;
  background: rgba(249, 115, 22, 0.1);
  padding: 1px 4px;
  border-radius: 4px;
}

.gr-export-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 10px;
  border: 2px solid #b91c1c;
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
  color: #fecaca;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s;
  white-space: nowrap;
}

.gr-export-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%);
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 4px 16px rgba(185, 28, 28, 0.45);
  transform: translateY(-1px);
}

.gr-export-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.gr-export-btn-icon {
  font-size: 1rem;
  line-height: 1;
}

/* Search panel */
.gr-search-panel {
  position: relative;
  margin-bottom: 1.75rem;
}

.gr-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.gr-search-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  pointer-events: none;
  opacity: 0.45;
  z-index: 1;
}

.gr-input {
  width: 100%;
  padding: 12px 40px 12px 42px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  color: #1e293b;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.gr-input::placeholder {
  color: #94a3b8;
}

.gr-input:focus {
  outline: none;
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.gr-clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px 6px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, color 0.15s;
  z-index: 1;
}

.gr-clear-btn:hover {
  color: #475569;
}

/* Autocomplete dropdown */
.gr-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  z-index: 100;
  overflow: hidden;
}

.gr-dropdown.gr-dropdown-open {
  display: block;
}

.gr-dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid #f1f5f9;
}

.gr-dropdown-item:last-child {
  border-bottom: none;
}

.gr-dropdown-item:hover {
  background: #fef2f2;
}

.gr-dropdown-item.gr-flicker {
  animation: gr-flicker 0.42s ease;
}

@keyframes gr-flicker {
  0% {
    background: white;
  }

  15% {
    background: #fca5a5;
  }

  35% {
    background: #ef4444;
    color: white;
  }

  60% {
    background: #fca5a5;
  }

  80% {
    background: #fee2e2;
  }

  100% {
    background: white;
  }
}

.gr-dropdown-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
}

.gr-dropdown-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: #dc2626;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: 20px;
}

.gr-dropdown-empty {
  padding: 14px 16px;
  color: #94a3b8;
  font-size: 0.88rem;
  font-style: italic;
}

/* Confirmation modal */
.gr-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.gr-modal-overlay.gr-modal-visible {
  display: flex;
  animation: gr-modal-in 0.2s ease;
}

@keyframes gr-modal-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.gr-modal {
  background: white;
  border: 2px solid #fca5a5;
  border-radius: 20px;
  padding: 2rem 2.5rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(185, 28, 28, 0.2), 0 8px 24px rgba(0, 0, 0, 0.15);
}

.gr-modal-skull {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  animation: gr-skull-pulse 2s ease-in-out infinite;
}

.gr-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.gr-modal-title span {
  color: #dc2626;
}

.gr-modal-sub {
  color: #64748b;
  font-size: 0.88rem;
  margin: 0 0 1.75rem;
}

.gr-modal-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.gr-modal-cancel {
  padding: 9px 24px;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.gr-modal-cancel:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #374151;
}

.gr-modal-confirm {
  padding: 9px 24px;
  border-radius: 10px;
  border: 2px solid #dc2626;
  background: #dc2626;
  color: white;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.gr-modal-confirm:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.4);
  transform: translateY(-1px);
}

/* Grudge list */
.gr-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gr-entry {
  background: white;
  border: 2px solid #fecaca;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.2s;
  animation: gr-entry-in 0.25s ease both;
}

@keyframes gr-entry-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gr-entry:hover {
  border-color: #fca5a5;
  box-shadow: 0 6px 20px rgba(185, 28, 28, 0.1);
}

.gr-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  border-bottom: 1px solid #fecaca;
}

.gr-entry-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gr-entry-skull {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 4px rgba(185, 28, 28, 0.4));
}

.gr-entry-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gr-entry-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: 0.01em;
}

.gr-entry-meta {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}

.gr-remove-btn {
  background: none;
  border: 1px solid #fecaca;
  color: #fca5a5;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gr-remove-btn:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #dc2626;
}

/* Death incidents */
.gr-incidents-list {
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gr-incident {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 7px 10px;
  border-radius: 8px;
  flex-wrap: wrap;
  transition: background 0.12s;
}

.gr-incident:hover {
  background: #fef2f2;
}

.gr-incident+.gr-incident {
  border-top: 1px solid #f1f5f9;
}

.gr-incident-date {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
  min-width: 160px;
}

.gr-incident-location {
  font-size: 0.82rem;
  color: #374151;
  font-weight: 500;
  flex: 1;
}

.gr-incident-spell {
  font-size: 0.78rem;
  color: #d97706;
  font-weight: 600;
  font-style: italic;
  white-space: nowrap;
}

.gr-incident-none {
  color: #94a3b8;
  font-style: italic;
  font-size: 0.85rem;
}

/* Empty state */
.gr-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: #64748b;
}

.gr-empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.35;
}

.gr-empty-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 6px;
}

.gr-empty-sub {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .mortality-header h1 {
    font-size: 2rem;
  }

  .death-stats-grid,
  .interesting-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nemesis-stats {
    flex-direction: column;
    gap: 15px;
  }

  .death-log-table,
  .boss-death-table {
    font-size: 0.8rem;
  }

  .death-log-table th,
  .death-log-table td,
  .boss-death-table th,
  .boss-death-table td {
    padding: 8px 6px;
  }

  /* Hide extra columns on mobile */
  .death-log-table th:nth-child(4),
  .death-log-table td:nth-child(4),
  .death-log-table th:nth-child(5),
  .death-log-table td:nth-child(5),
  .death-log-table th:nth-child(6),
  .death-log-table td:nth-child(6) {
    display: none;
  }

  .deaths-grid {
    grid-template-columns: 1fr;
  }

  #tab-mortality .mortality-nav {
    flex-direction: column;
    align-items: stretch;
  }

  #tab-mortality .nav-tab {
    text-align: center;
  }

  #tab-mortality .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  #tab-mortality .analysis-grid {
    grid-template-columns: 1fr;
  }

  #tab-mortality .deaths-grid {
    grid-template-columns: 1fr;
  }

  #tab-mortality .chart-bar {
    grid-template-columns: 100px 1fr 50px;
    gap: 0.5rem;
  }

  #tab-mortality .death-details {
    flex-direction: column;
    gap: 0.5rem;
  }

  .sh-filter-row {
    gap: 8px;
  }

  .sh-data-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {

  .death-stats-grid,
  .interesting-stats-grid {
    grid-template-columns: 1fr;
  }

  #tab-mortality .stats-grid {
    grid-template-columns: 1fr;
  }

  #tab-mortality .mortality-header h1 {
    font-size: 2rem;
  }

  #tab-mortality .stat-value {
    font-size: 2rem;
  }

  .sh-data-grid {
    grid-template-columns: 1fr;
  }

  .sh-card-left {
    min-width: 54px;
    padding: 0.85rem 0.6rem;
  }

  .sh-card-top {
    flex-direction: column;
  }

  .sh-card-meta {
    align-items: flex-start;
  }

  .sh-search-panel {
    padding: 1rem;
  }

  .gr-entry-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .gr-incident {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .gr-incident-date {
    min-width: unset;
  }

  .gr-modal {
    padding: 1.5rem;
  }
}


/* ===== PVP DEATH CARD — CLICKABLE =====  */

.pvp-death-card-clickable {
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
}

.pvp-death-card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.25);
  border-color: rgba(220, 38, 38, 0.4);
}

.pvp-death-card-clickable:active {
  transform: translateY(0);
}

.pvp-card-datetime {
  font-size: 0.8rem;
  color: var(--text-muted, #888);
  margin-top: 0.25rem;
}

.pvp-kill-count {
  margin-left: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(220, 38, 38, 0.18);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  white-space: nowrap;
  vertical-align: middle;
}

.pvp-card-hint {
  margin-top: 0.65rem;
  font-size: 0.72rem;
  color: var(--text-muted, #888);
  opacity: 0;
  transition: opacity 0.15s ease;
  text-align: right;
  font-style: italic;
}

.pvp-death-card-clickable:hover .pvp-card-hint {
  opacity: 1;
}

/* ===== PVP DEATH DETAIL MODAL ===== */

.pvp-detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(4px);
}

.pvp-detail-overlay.pvp-detail-visible {
  display: flex;
}

.pvp-detail-modal {
  background: var(--bg-card, #1a1a2e);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 14px;
  width: 100%;
  max-width: 820px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(220, 38, 38, 0.06);
  display: flex;
  flex-direction: column;
}

.pvp-detail-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted, #aaa);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  z-index: 2;
}

.pvp-detail-close:hover {
  background: rgba(220, 38, 38, 0.2);
  color: #fff;
  border-color: rgba(220, 38, 38, 0.5);
}

/* ---- DOSSIER ID CARD ---- */

.dos-idcard {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(220, 38, 38, 0.2);
  min-height: 200px;
}

.dos-idcard-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 2rem 1.75rem;
  background: rgba(220, 38, 38, 0.06);
  border-right: 1px solid rgba(220, 38, 38, 0.15);
  min-width: 190px;
  flex-shrink: 0;
}

.dos-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.12);
  border: 2px solid rgba(220, 38, 38, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.dos-idcard-name-block {
  text-align: center;
}

.dos-subject-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(220, 38, 38, 0.7);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.dos-subject-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f87171;
  line-height: 1.2;
  word-break: break-word;
  max-width: 150px;
}

.dos-subject-type {
  font-size: 0.72rem;
  color: var(--text-muted, #888);
  margin-top: 0.2rem;
}

.dos-idcard-right {
  flex: 1;
  padding: 1.5rem 2.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dos-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 2rem;
}

.dos-stat {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dos-stat-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 1.4rem;
  text-align: center;
  margin-top: 0.1rem;
}

.dos-stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted, #888);
  line-height: 1.3;
}

.dos-stat-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary, #e2e8f0);
  line-height: 1.3;
}

/* ---- INCIDENT LOG HEADING ---- */

.dos-incidents-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.dos-incidents-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted, #777);
}

.dos-incidents-count {
  font-size: 0.72rem;
  color: #f87171;
  font-weight: 600;
}

/* ---- INCIDENT LOG BODY ---- */

.pvp-events-list {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 2rem 2rem;
  gap: 0.75rem;
}

.pvp-event-block {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.pvp-event-highlighted {
  border-color: rgba(220, 38, 38, 0.5);
  background: rgba(220, 38, 38, 0.07);
}

.pvp-event-dateline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.pvp-event-this-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: rgba(220, 38, 38, 0.22);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
}

.pvp-event-date {
  font-size: 0.8rem;
  color: var(--text-muted, #888);
}

.pvp-other-kills-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pvp-other-kills-heading {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted, #666);
  margin: 0.25rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ---- INCIDENT TABLE (2-column) ---- */

.pvp-detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
  font-size: 0.82rem;
}

.pvp-detail-table-2col .pvp-detail-spacer {
  width: 1.5rem;
}

.pvp-detail-row+.pvp-detail-row td {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.pvp-detail-label {
  padding: 0.3rem 0.6rem 0.3rem 0;
  color: var(--text-muted, #888);
  white-space: nowrap;
  vertical-align: middle;
}

.pvp-detail-value {
  padding: 0.3rem 0;
  color: var(--text-primary, #e2e8f0);
  font-weight: 500;
  vertical-align: middle;
}

/* ---- GRUDGE BUTTON ---- */

.pvp-detail-grudge-btn {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
  border: 1px solid rgba(220, 38, 38, 0.5);
  color: #fca5a5;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  width: 100%;
  max-width: 170px;
}

.pvp-detail-grudge-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #991b1b, #b91c1c);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
  color: #fff;
}

.pvp-detail-grudge-btn.pvp-detail-grudge-added,
.pvp-detail-grudge-btn:disabled {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #888);
  cursor: default;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 680px) {
  .pvp-detail-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .pvp-detail-modal {
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
  }

  .dos-idcard {
    flex-direction: column;
  }

  .dos-idcard-left {
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid rgba(220, 38, 38, 0.15);
    padding: 1.25rem 1.5rem;
    min-width: unset;
  }

  .dos-idcard-name-block {
    text-align: left;
  }

  .dos-subject-name {
    max-width: unset;
  }

  .dos-idcard-right {
    padding: 1.25rem 1.5rem;
  }

  .dos-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Collapse 2-col table to 1-col on mobile */
  .pvp-detail-table-2col .pvp-detail-spacer,
  .pvp-detail-table-2col tr td:nth-child(4),
  .pvp-detail-table-2col tr td:nth-child(5) {
    display: none;
  }

  .pvp-events-list {
    padding: 1rem;
  }

  .dos-incidents-heading {
    padding: 0.65rem 1rem;
  }
}