/* === GLOBAL STYLES === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #3a8dde 0%, #1e3c72 100%);
}

.container {
  width: 100%;
  max-width: 1440px;
  margin: 48px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(30, 60, 114, 0.12);
  padding: 40px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.tab-content {
  display: block;
  padding: 2px 12px;
  background: transparent;
  border-radius: 0 0 8px 8px;
  min-height: 24px;
  box-shadow: 0 2px 8px rgba(49, 130, 206, 0.04);
  margin-bottom: 1px;
  margin-top: 0;
  opacity: 1;
  transition: opacity 0.3s;
}

.tab-content.fade-out {
  opacity: 0;
  transition: opacity 0.2s;
}

.tab-content.fade-in {
  opacity: 1;
  transition: opacity 0.3s;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #2456a5;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 18px;
  border: 1px solid #bcd0ee;
  border-radius: 8px;
  font-size: 1.05rem;
  background: #f7fafc;
}

button,
.btn {
  background: linear-gradient(90deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(49, 130, 206, 0.08);
  margin-right: 8px;
  margin-bottom: 8px;
}

button:hover,
.btn:hover {
  background: linear-gradient(90deg, #2456a5 0%, #3182ce 100%);
  box-shadow: 0 4px 16px rgba(49, 130, 206, 0.16);
}

h1 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 32px;
  font-weight: 700;
  color: #2456a5;
}

h2,
h3 {
  color: #2456a5;
}

.muted {
  color: #6e7f9b;
  margin: 8px 0 0 0;
  font-size: 0.95em;
}

a {
  color: #2456a5;
  text-decoration: underline;
  cursor: pointer;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .container {
    width: 98vw;
    padding: 16px 4vw;
  }

  h1 {
    font-size: 1.3rem;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 14px 6px;
  }

  .tab {
    font-size: 0.95rem;
  }
}

/* --- NAV SECTION START --- */
.topbar {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.08);
  padding: 4px 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 10;
  min-height: 38px;
}

.searchbar-wrapper {
  position: relative;
  width: 75%;
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#sectionSearch {
  width: 100%;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid #bcd0ee;
  font-size: 1rem;
  font-family: 'Segoe UI', Arial, sans-serif;
  outline: none;
  background: #f7fafc;
  box-shadow: 0 1px 4px rgba(30, 60, 114, 0.06);
  margin: 0;
  transition: box-shadow 0.2s, border-color 0.2s;
}

#sectionSearch:focus {
  box-shadow: 0 3px 12px rgba(49, 130, 206, 0.15);
  border-color: #3182ce;
}

#sectionSearch::placeholder {
  color: #9ca3af;
}

.dropdown {
  position: absolute;
  top: 48px;
  left: 0;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(30, 60, 114, 0.18);
  border: 1px solid #e2e8f0;
  padding: 8px;
  max-height: 520px;
  overflow-y: auto;
  font-family: 'Segoe UI', Arial, sans-serif;
  z-index: 1000;
}

.dropdown .search-category {
  padding: 8px 12px 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6e7f9b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.dropdown .search-category:first-child {
  margin-top: 0;
}

.dropdown .section-item {
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 8px;
  color: #2456a5;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
}

.dropdown .section-item .item-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  line-height: 1;
}

.dropdown .section-item .item-content {
  flex: 1;
  min-width: 0;
}

.dropdown .section-item .item-title {
  font-weight: 600;
  color: #2456a5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown .section-item .item-description {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 400;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown .section-item:hover,
.dropdown .section-item.active {
  background: linear-gradient(90deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
}

.dropdown .section-item:hover .item-title,
.dropdown .section-item.active .item-title {
  color: #fff;
}

.dropdown .section-item:hover .item-description,
.dropdown .section-item.active .item-description {
  color: rgba(255, 255, 255, 0.85);
}

.dropdown .no-results {
  padding: 24px;
  text-align: center;
  color: #6e7f9b;
  font-size: 0.95rem;
}

.dropdown .search-loading {
  padding: 16px;
  text-align: center;
  color: #6e7f9b;
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .searchbar-wrapper {
    width: 70%;
  }
}

@media (max-width: 900px) {
  .searchbar-wrapper {
    width: 65%;
  }
}

@media (max-width: 600px) {
  .searchbar-wrapper {
    width: 90%;
  }

  .dropdown .section-item {
    padding: 10px 12px;
  }

  .dropdown .section-item .item-icon {
    font-size: 1.25rem;
    width: 28px;
    height: 28px;
  }
}

.hidden {
  display: none;
}

/* --- NAV SECTION END --- */

/* --- FADE TRANSITIONS --- */
.fade-out {
  opacity: 0 !important;
  transition: opacity 0.3s;
}

.fade-in {
  opacity: 1 !important;
  transition: opacity 0.3s;
}

/* === Character Select (top-left in topbar) === */
.charselect-wrapper {
  position: absolute;
  left: 12px;
  top: 6px;
  display: inline-block;
  z-index: 11;
  /* above topbar content */
}

.charselect-trigger {
  /* Text-only button (no visible box) */
  background: transparent;
  border: 0;
  padding: 4px 0;
  color: #2456a5;
  /* deep blue from your theme */
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  outline: none;
}

.charselect-trigger:focus-visible {
  outline: 2px solid #3182ce;
  border-radius: 6px;
}

.charselect-trigger:hover .charselect-label,
.charselect-trigger:hover .charselect-icon {
  text-decoration: underline;
}

.charselect-icon {
  font-size: 1.05rem;
  /* emoji size */
}

.charselect-caret {
  font-size: 0.9rem;
  color: #6e7f9b;
}

/* Dropdown (white card look, like your .dropdown) */
.charselect-menu {
  position: absolute;
  top: 28px;
  left: 0;
  min-width: 240px;
  max-width: 320px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(30, 60, 114, 0.12);
  border: 1px solid #bcd0ee;
  /* soft blue border to match cards */
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 6px;
  z-index: 100;
}

.charselect-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  color: #2456a5;
  transition: background 0.2s, color 0.2s;
  font-weight: 500;
  user-select: none;
}

.charselect-item:hover,
.charselect-item.active {
  background: linear-gradient(90deg, #2efff5 0%, #fff 100%);
  color: #fff;
}

.charselect-item .char-emoji {
  font-size: 1.1rem;
}

.charselect-item .char-name {
  font-size: 1.02rem;
  font-weight: 600;
}

.charselect-item .char-meta {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 400;
}

.hidden {
  display: none !important;
}

/* Responsive: keep menu usable on mobile */
@media (max-width: 600px) {
  .charselect-menu {
    min-width: 90vw;
    left: 0;
    right: 0;
    margin: 0 auto;
  }
}

/* === WhoDASH dashboard components === */
.dash-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid #bcd0ee;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  margin: 14px 0;
}

.dash-portrait {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e7eef8, #c8d9f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2456a5;
  font-weight: 700;
}

.dash-main {
  display: flex;
  flex-direction: column;
}

.dash-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2456a5;
}

.dash-meta {
  margin-top: 4px;
  color: #6e7f9b;
  font-size: 0.95rem;
}

.dash-gold {
  margin-top: 6px;
  font-weight: 600;
  color: #2456a5;
}

.dash-actions {
  text-align: right;
}

.dash-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2456a5;
  margin-top: 10px;
}

@media (max-width: 700px) {
  .dash-card {
    grid-template-columns: 100%;
  }

  .dash-actions {
    justify-self: end;
  }

  .dash-portrait {
    width: 100%;
    height: 160px;
  }
}

/* Coin badges */
.coin {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  margin-right: 6px;
}

.coin-gold {
  color: #9c6b00;
  background: #fff7e0;
  border: 1px solid #f1d38a;
}

.coin-silver {
  color: #5b6a7a;
  background: #eef2f7;
  border: 1px solid #cfd8e3;
}

.coin-copper {
  color: #7a3b1a;
  background: #f5e9e4;
  border: 1px solid #ddb7a4;
}

/* Tooltip for charts */
.whodat-tip {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  background: #111;
  color: #fff;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 12px;
  line-height: 1.25;
  transform: translate(-50%, -120%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  opacity: 0;
  transition: opacity .08s ease;
}

/* === Travel Log (fragment) === */
.segmented {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  background: #eef4ff;
  border-radius: 10px;
  border: 1px solid #d7e3fb;
}

.segmented-btn {
  padding: 8px 14px;
  border-radius: 8px;
  background: #f7fafc;
  color: #2456a5;
  border: 1px solid #cfe0fb;
  cursor: pointer;
}

.segmented-btn.is-active {
  background: #2456a5;
  color: #fff;
  border-color: #2456a5;
}

.panel.hidden {
  display: none;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card {
  background: #ffffff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 12px;
}

.card-title {
  margin: 0 0 8px 0;
  color: #2456a5;
  font-weight: 600;
}

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead th {
  text-align: left;
  background: #f0f5ff;
  color: #2456a5;
  font-weight: 600;
  padding: 8px;
  border-bottom: 1px solid #d7e3fb;
  cursor: pointer;
}

.table tbody td {
  padding: 8px;
  border-bottom: 1px solid #eef2f9;
}

.table.compact tbody td,
.table.compact thead th {
  padding: 6px;
}

.table.sticky thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.table thead th.sort-asc::after {
  content: " â–²";
  /* or "\25B2" */
}

.table thead th.sort-desc::after {
  content: " â–¼";
  /* or "\25BC" */
}

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

.bar-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: center;
  gap: 8px;
}

.bar-label {
  color: #334e88;
}

.bar {
  --w: 0%;
  position: relative;
  height: 22px;
  border-radius: 10px;
  background: linear-gradient(90deg, #cfe0fb var(--w), #eef4ff var(--w));
  border: 1px solid #d7e3fb;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  color: #2456a5;
  font-weight: 600;
}

/* Travel Log date range layout (optional) */
.date-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

.date-range input[type="datetime-local"] {
  padding: 6px 10px;
  border: 1px solid #bcd0ee;
  border-radius: 8px;
  background: #f7fafc;
  color: #2456a5;
}

/* Icon placeholder cell */
.cell-icon {
  width: 28px;
}

.icon-placeholder {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #eef4ff;
  border: 1px solid #d7e3fb;
}

/* Quality badge pills (Q0ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â€šÂ¬Ã…â€œQ5 typical) */
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid transparent;
}

.pill.q-0 {
  color: #666;
  background: #f2f2f2;
  border-color: #ddd;
}

/* Poor */
.pill.q-1 {
  color: #2456a5;
  background: #eef4ff;
  border-color: #cfe0fb;
}

/* Common */
.pill.q-2 {
  color: #0a7a34;
  background: #e6f6ea;
  border-color: #bfe8ca;
}

/* Uncommon (green) */
.pill.q-3 {
  color: #3a2b96;
  background: #eceaff;
  border-color: #cfc9ff;
}

/* Rare (blue/purple mix) */
.pill.q-4 {
  color: #9c6b00;
  background: #fff7e0;
  border-color: #f1d38a;
}

/* Epic-ish */
.pill.q-5 {
  color: #7a3b1a;
  background: #f5e9e4;
  border-color: #ddb7a4;
}

.q-badge {
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.6;
  display: inline-block;
}

.q-poor {
  background: #6b6b6b;
  color: #fff;
}

.q-common {
  background: #dfe7df;
  color: #2e5b2e;
}

.q-uncommon {
  background: #1eff00;
  color: #033600;
}

.q-rare {
  background: #0070dd;
  color: #fff;
}

.q-epic {
  background: #a335ee;
  color: #fff;
}

.q-legendary {
  background: #ff8000;
  color: #231300;
}

.vault-bars-row {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.vault-bar-block {
  flex: 1 1 0;
  min-width: 220px;
}

.vault-bar-block h4 {
  margin-top: 250;
  margin-bottom: 8px;
}

/* === Achievements (minimal additions) === */

/* Canvas container */
.chart-canvas {
  width: 100%;
  /* height is set via the canvas attribute and scaled by JS DPR */
  display: block;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(30, 60, 114, 0.06);
  margin-bottom: 8px;
}

/* KPI chips (color tokens consistent with theme) */
.chip {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.chip-blue {
  background: #2456a5;
}

.chip-gray {
  background: #6e7f9b;
}

.chip-gold {
  background: #f1d38a;
}

.mini-kpi {
  color: #2456a5;
  font-weight: 600;
  margin: 4px 0;
}

/* Latest 5 list */
.ach-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.ach-item {
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
}

.ach-item .ach-name {
  font-weight: 700;
  color: #2456a5;
}

.ach-item .ach-meta {
  margin-top: 4px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.ach-item .ach-desc {
  margin-top: 6px;
  color: #334e88;
}

/* Reputation vertical column */
.rep-vbar {
  width: 100%;
  height: 0%;
  border-radius: 6px;
  transition: height 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Rainbow-ready reputation styling */
.rep-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}

.rep-name {
  flex: 0 0 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #222;
}

.rep-value {
  flex: 0 0 auto;
  min-width: 64px;
  text-align: right;
  color: #7a7a7a;
  font-variant-numeric: tabular-nums;
}

.rep-bar {
  flex: 1 1 auto;
  height: 16px;
  background: #101314;
  border-radius: 999px;
  overflow: hidden;
}

.rep-fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
}

/* container only */
.rep-fill-inner {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  will-change: width;
}

/* ============================================================================
   DASHBOARD SUMMARY STYLES
   ============================================================================ */

/* Dashboard Sections */
.dashboard-section {
  margin-bottom: 24px;
}

.dashboard-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dashboard-row-three {
  grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 1200px) {
  .dashboard-row-three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   TIPS CARD
   ============================================================================ */
.tips-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.tips-card h3 {
  margin: 0 0 12px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.tips-subtitle {
  color: #6e7f9b;
  font-size: 0.9rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e6eefb;
}

.tips-section-title {
  margin: 16px 0 10px 0;
  color: #2456a5;
  font-size: 0.95rem;
  font-weight: 600;
}

.tips-zones-list,
.tips-notes-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}

.tips-zones-list li {
  padding: 6px 12px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #eef4ff 0%, #f7fafc 100%);
  border-left: 3px solid #3182ce;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #2c5282;
}

.tips-notes-list li {
  padding: 8px 0 8px 20px;
  margin-bottom: 8px;
  position: relative;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #4a5568;
}

.tips-notes-list li:before {
  content: "✱";
  /* or "\2022" for Unicode escape */
  position: absolute;
  left: 6px;
  color: #3182ce;
  font-weight: bold;
}

.tips-card .muted {
  color: #9ca3af;
  font-style: italic;
  text-align: center;
  padding: 20px;
}


/* ============================================================================
   HERO STATS GRID
   ============================================================================ */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.hero-stat {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(30, 60, 114, 0.12);
}

.hero-stat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.hero-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.hero-stat-label {
  font-size: 0.95rem;
  color: #6e7f9b;
  font-weight: 500;
  margin-bottom: 4px;
}

.hero-stat-tier {
  font-size: 0.85rem;
  color: #3182ce;
  font-weight: 600;
  margin-top: 6px;
}

.hero-stat-subtitle {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-top: 4px;
}

/* ============================================================================
   HIGHLIGHTS CARD
   ============================================================================ */
.highlights-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.highlights-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.highlights-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.highlights-list li {
  padding: 14px 0;
  /* Changed from 10px to 14px */
  border-bottom: 1px solid #eef4ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Extended highlights list with more spacing */
.highlights-list-extended li {
  padding: 16px 0;
}

.highlights-list li:last-child {
  border-bottom: none;
}

.hl-icon {
  font-size: 1.1rem;
  margin-right: 8px;
  display: inline-block;
  min-width: 24px;
}

.hl-label {
  color: #6e7f9b;
  font-weight: 500;
}

.highlights-list strong {
  color: #2456a5;
  font-weight: 700;
}

/* ============================================================================
   ACTIVITY HEATMAP
   ============================================================================ */
.activity-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.activity-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.activity-heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16px, 1fr));
  /* Changed from 12px */
  gap: 5px;
  /* Changed from 3px */
  max-width: 100%;
}

.heatmap-cell {
  width: 16px;
  /* Changed from 12px */
  height: 16px;
  /* Changed from 12px */
  border-radius: 3px;
  /* Changed from 2px */
  background: #eef4ff;
  border: 1px solid #d7e3fb;
  transition: all 0.2s;
}

.heatmap-cell[data-intensity="0"] {
  background: #eef4ff;
  border-color: #d7e3fb;
}

.heatmap-cell[data-intensity="1"] {
  background: #c8d9f1;
  border-color: #b8c9e1;
}

.heatmap-cell[data-intensity="2"] {
  background: #9ab8e5;
  border-color: #8aa8d5;
}

.heatmap-cell[data-intensity="3"] {
  background: #5a92d6;
  border-color: #4a82c6;
}

.heatmap-cell[data-intensity="4"] {
  background: #3182ce;
  border-color: #2456a5;
}

.heatmap-cell:hover {
  transform: scale(1.4);
  /* Changed from 1.3 */
  z-index: 10;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  /* Enhanced shadow */
}

/* ============================================================================
   TOP LOOT WIDGET
   ============================================================================ */
.top-loot-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.top-loot-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.top-loot-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-loot-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.top-loot-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.loot-rank {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(49, 130, 206, 0.2);
}

.loot-name {
  color: #334e88;
  font-weight: 600;
  font-size: 0.95rem;
}

.loot-count {
  color: #2456a5;
  font-weight: 700;
  font-size: 1rem;
  background: #eef4ff;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #d7e3fb;
}

/* ============================================================================
   SPARKLINE CHART
   ============================================================================ */
.sparkline-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.sparkline-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.sparkline-canvas {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  background: #f7fafc;
}

.sparkline-info {
  margin-top: 12px;
  padding: 12px;
  background: #eef4ff;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #334e88;
  font-weight: 500;
  text-align: center;
}

.sparkline-tooltip {
  position: absolute;
  display: none;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   ACTIVITY FEED
   ============================================================================ */
.activity-feed-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 600px;
  overflow-y: auto;
}

.activity-feed-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 12px;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.activity-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.activity-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #d7e3fb;
}

.activity-icon-img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid #d7e3fb;
  display: block;
  background: #fff;
}

.activity-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.activity-desc {
  color: #334e88;
  font-size: 0.95rem;
  line-height: 1.4;
}

.activity-desc strong {
  color: #2456a5;
  font-weight: 600;
}

.activity-time {
  color: #6e7f9b;
  font-size: 0.85rem;
}

/* ============================================================================
   REPUTATION LIST (Animated)
   ============================================================================ */
.reputation-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 600px;
  overflow-y: auto;
}

.reputation-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.rep-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f7fafc;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #334e88;
}

.rep-legend .chip {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.rep-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rep-row {
  display: grid;
  grid-template-columns: 150px 1fr 80px;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}

.rep-name {
  color: #2456a5;
  font-weight: 600;
  font-size: 0.95rem;
}

.rep-bar {
  position: relative;
  height: 22px;
  background: #eef4ff;
  border-radius: 11px;
  border: 1px solid #d7e3fb;
  overflow: hidden;
}

.rep-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 11px;
  transition: width 0.5s ease-out;
}

.rep-value {
  text-align: right;
  color: #334e88;
  font-weight: 600;
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .rep-row {
    grid-template-columns: 100%;
    gap: 6px;
  }

  .rep-value {
    text-align: left;
    font-size: 0.85rem;
  }
}

/* ============================================================================
   COIN DISPLAY (from original)
   ============================================================================ */
.coin {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  margin-right: 4px;
  font-size: 0.9rem;
}

.coin-gold {
  color: #9c6b00;
  background: #fff7e0;
  border: 1px solid #f1d38a;
}

.coin-silver {
  color: #5b6a7a;
  background: #eef2f7;
  border: 1px solid #cfd8e3;
}

.coin-copper {
  color: #7a3b1a;
  background: #f5e9e4;
  border: 1px solid #ddb7a4;
}

/* ============================================================================
   UTILITIES
   ============================================================================ */
.muted {
  color: #6e7f9b;
  font-size: 0.95rem;
  font-style: italic;
}

/* ============================================================================
   CHARACTER DASHBOARD STYLES
   ============================================================================ */

/* Character Profile Card */
.char-profile-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.char-header {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e6eefb;
}

.char-avatar {
  flex-shrink: 0;
}

.char-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.char-info {
  flex: 1;
}

.char-name {
  margin: 0 0 8px 0;
  font-size: 2rem;
  font-weight: 700;
  color: #2456a5;
}

.char-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.char-identity {
  font-size: 1rem;
  color: #334e88;
  font-weight: 500;
  line-height: 1.5;
}

.char-level,
.char-class,
.char-race {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.char-level {
  background: #eef4ff;
  color: #2456a5;
  border: 1px solid #d7e3fb;
}

.char-class {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.char-race {
  background: #f5f3ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.char-guild {
  color: #6e7f9b;
  font-size: 0.95rem;
  font-weight: 500;
}

.char-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.char-stat-item {
  text-align: center;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e6eefb;
}

.stat-label {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

/* Stats Dashboard */
.stats-dashboard-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.stats-dashboard-card h3 {
  margin: 0 0 20px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-bar-item {
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border: 1px solid #e6eefb;
}

.stat-bar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.stat-icon {
  font-size: 1.3rem;
}

.stat-name {
  flex: 1;
  font-weight: 600;
  color: #334e88;
  font-size: 0.95rem;
}

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

.stat-bar {
  height: 8px;
  background: #e6eefb;
  border-radius: 4px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, #3182ce 0%, #2456a5 100%);
  transition: width 0.5s ease-out;
  border-radius: 4px;
}

/* Progression Card */
.progression-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.progression-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.progression-canvas {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  background: #f7fafc;
}

.progression-info {
  margin-top: 12px;
  padding: 12px;
  background: #eef4ff;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #334e88;
  text-align: center;
}

/* Leveling Speed Card */
.speed-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.speed-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.speed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.speed-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.speed-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.speed-level {
  font-weight: 700;
  color: #2456a5;
  font-size: 0.95rem;
}

.speed-time {
  color: #334e88;
  font-weight: 500;
  font-size: 0.9rem;
}

.speed-rate {
  background: #eef4ff;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  color: #2456a5;
  font-size: 0.85rem;
  border: 1px solid #d7e3fb;
}

.speed-average {
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #eef4ff 0%, #d7e3fb 100%);
  border-radius: 10px;
  text-align: center;
  color: #334e88;
  font-size: 1rem;
  border: 1px solid #d7e3fb;
}

.speed-average strong {
  color: #2456a5;
  font-size: 1.1rem;
}

/* Milestones Card */
.milestones-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.milestones-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.milestone-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.milestone-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  padding: 14px;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.milestone-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.milestone-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #3182ce 0%, #2456a5 100%);
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(49, 130, 206, 0.2);
}

.milestone-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.milestone-title {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
}

.milestone-desc {
  color: #6e7f9b;
  font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .char-header {
    flex-direction: column;
    text-align: center;
  }

  .char-meta {
    justify-content: center;
  }

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

/* ============================================================================
   CURRENCIES / ECONOMY STYLES
   ============================================================================ */
/* Enhanced Auction Analytics Styles */

/* Analytics Grid Layout */
.analytics-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

.analytics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.analytics-row.full-width {
  grid-template-columns: 1fr;
}

.auction-analytics-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.auction-analytics-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auction-analytics-card h4 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 500;
  color: #475569;
}

/* Sell-Through by Duration */
.sell-through-chart {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.duration-bar-item {
  display: grid;
  grid-template-columns: 60px 1fr 140px;
  gap: 12px;
  align-items: center;
}

.duration-label {
  font-weight: 600;
  color: #334155;
  text-align: right;
}

.duration-bar-bg {
  height: 32px;
  background: #f1f5f9;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.duration-bar-fill {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  transition: width 0.3s ease;
  border-radius: 6px;
}

.duration-bar-text {
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.duration-stats {
  font-size: 0.85rem;
  color: #64748b;
  text-align: right;
}

/* Market Seasonality Heatmaps */
.seasonality-container {
  display: flex;
  gap: 32px;
}

.seasonality-section {
  flex: 1;
}

.day-heatmap,
.hour-heatmap {
  display: grid;
  gap: 8px;
}

.day-heatmap {
  grid-template-columns: repeat(7, 1fr);
}

.hour-heatmap {
  grid-template-columns: repeat(3, 1fr);
}

.heat-cell {
  padding: 16px 12px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s;
}

.heat-cell:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.heat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.heat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

/* Scatter Plot */
.scatter-plot-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scatter-canvas {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.scatter-legend {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #475569;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* Price History Charts */
.price-history-charts {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.price-history-item {
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.price-history-item h4 {
  color: #1e293b;
  font-size: 1rem;
  font-weight: 600;
}

.price-history-item canvas {
  margin-top: 12px;
  display: block;
}

/* Undercut Ladder */
.undercut-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.undercut-item {
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.undercut-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

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

.position-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.position-badge.competitive {
  background: #dcfce7;
  color: #166534;
}

.position-badge.overpriced {
  background: #fef3c7;
  color: #92400e;
}

.undercut-pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-label {
  font-size: 0.85rem;
  color: #64748b;
}

.price-value {
  font-weight: 600;
  color: #1e293b;
}

.undercut-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.undercut-option {
  background: white;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.undercut-option span {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 4px;
}

.undercut-option strong {
  display: block;
  color: #1e293b;
  font-size: 0.9rem;
}

/* Profit Calculator */
.profit-calculator .calculator-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calc-input-group {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  align-items: center;
}

.calc-input-group label {
  font-size: 0.9rem;
  color: #475569;
  font-weight: 500;
}

.calc-input-group input,
.calc-input-group select {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
}

.calc-input-group input:focus,
.calc-input-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.calc-results {
  margin-top: 8px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.calc-result-row:not(:last-child) {
  border-bottom: 1px solid #e2e8f0;
}

.calc-result-row span {
  font-size: 0.9rem;
  color: #64748b;
}

.calc-result-row strong {
  font-size: 1rem;
  font-weight: 600;
}

.calc-total {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 2px solid #cbd5e1 !important;
}

.calc-total span {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

.calc-total strong {
  font-size: 1.25rem;
}

.profit-value.positive {
  color: #16a34a;
}

.profit-value.negative {
  color: #dc2626;
}

/* Performance Table */
.performance-table-container {
  overflow-x: auto;
}

.performance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.performance-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.performance-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.performance-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.performance-table tbody tr:hover {
  background: #f8fafc;
}

.performance-table .item-name {
  font-weight: 600;
  color: #1e293b;
}

.performance-table .success-rate {
  font-weight: 600;
}

.performance-table .success-rate.excellent {
  color: #16a34a;
}

.performance-table .success-rate.good {
  color: #f59e0b;
}

.performance-table .success-rate.poor {
  color: #dc2626;
}

/* Competitor Analysis */
.competitor-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.competitor-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.competitor-rank {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  font-weight: 700;
  border-radius: 8px;
  font-size: 1rem;
}

.competitor-info {
  flex: 1;
}

.competitor-name {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.competitor-stats {
  font-size: 0.85rem;
  color: #64748b;
}

/* Repost Tracker */
.repost-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.repost-item {
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.repost-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.repost-name {
  font-weight: 600;
  color: #1e293b;
}

.repost-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.repost-badge.sold {
  background: #dcfce7;
  color: #166534;
}

.repost-badge.expired {
  background: #fee2e2;
  color: #991b1b;
}

.repost-stats {
  font-size: 0.85rem;
  color: #64748b;
}

/* Utility Classes */
.positive {
  color: #16a34a;
}

.negative {
  color: #dc2626;
}

.muted {
  color: #94a3b8;
  font-style: italic;
}

/* Existing styles compatibility */
.coin {
  font-weight: 600;
  white-space: nowrap;
}

.coin-gold {
  color: #f59e0b;
}

.coin-silver {
  color: #94a3b8;
}

.coin-copper {
  color: #a16207;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .analytics-row {
    grid-template-columns: 1fr;
  }

  .seasonality-container {
    flex-direction: column;
  }

  .undercut-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .auction-analytics-card {
    padding: 16px;
  }

  .duration-bar-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .duration-label {
    text-align: left;
  }

  .duration-stats {
    text-align: left;
  }

  .calc-input-group {
    grid-template-columns: 1fr;
  }

  .undercut-pricing {
    grid-template-columns: 1fr;
  }

  .performance-table {
    font-size: 0.8rem;
  }

  .performance-table th,
  .performance-table td {
    padding: 8px;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.auction-analytics-card {
  animation: fadeIn 0.3s ease-out;
}

.analytics-row:nth-child(1) .auction-analytics-card {
  animation-delay: 0.05s;
}

.analytics-row:nth-child(2) .auction-analytics-card {
  animation-delay: 0.1s;
}

.analytics-row:nth-child(3) .auction-analytics-card {
  animation-delay: 0.15s;
}

.analytics-row:nth-child(4) .auction-analytics-card {
  animation-delay: 0.2s;
}

.analytics-row:nth-child(5) .auction-analytics-card {
  animation-delay: 0.25s;
}

/* Loading state */
.auction-analytics-card.loading {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

/* Empty state */
.auction-analytics-card .muted {
  text-align: center;
  padding: 40px 20px;
  font-size: 0.9rem;
}

/* ===== G/S/C Input Styles ===== */
.gsc-input {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gsc-input input[type="number"] {
  width: 60px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.95rem;
}

.gsc-input .coin-label {
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 15px;
}

.coin-label.coin-gold {
  color: #f59e0b;
}

.coin-label.coin-silver {
  color: #9ca3af;
}

.coin-label.coin-copper {
  color: #b45309;
}

/* ===== Price History Legend ===== */
.price-legend {
  display: flex;
  gap: 16px;
  margin: 12px 0;
  padding: 8px;
  background: #f9fafb;
  border-radius: 4px;
  font-size: 0.85rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* ===== Enhanced Competitor Analysis ===== */
.competitor-analysis-card .competitor-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fafafa;
}

.competitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.competitor-card {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.competitor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
}

.competitor-rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.competitor-name-lg {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
  padding-right: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.competitor-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.competitor-stat {
  text-align: center;
}

.competitor-stat .stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #059669;
  margin-bottom: 2px;
}

.competitor-stat .stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.competitor-items-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.competitor-item-mini {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: white;
  border-radius: 6px;
  font-size: 0.85rem;
  border: 1px solid #f3f4f6;
}

.item-name-mini {
  color: #374151;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 8px;
}

.item-price-mini {
  color: #059669;
  font-weight: 600;
  white-space: nowrap;
}

.competitor-more-mini {
  color: #6b7280;
  font-size: 0.8rem;
  font-style: italic;
  text-align: center;
  padding: 4px 8px;
}

.competitor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.competitor-summary {
  color: #6b7280;
  font-size: 0.85rem;
  margin-left: auto;
}

.competitor-items {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.competitor-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: white;
  border-radius: 4px;
  font-size: 0.9rem;
}

.competitor-item-row .item-name {
  color: #374151;
  font-weight: 500;
}

.competitor-item-row .item-price {
  color: #059669;
  font-weight: 600;
}

.competitor-more {
  color: #6b7280;
  font-size: 0.85rem;
  font-style: italic;
  padding: 4px 8px;
  text-align: center;
}

/* ===== Responsive Updates ===== */
@media (max-width: 640px) {
  .gsc-input {
    flex-direction: column;
    align-items: stretch;
  }

  .gsc-input input[type="number"] {
    width: 100%;
  }

  .price-legend {
    flex-direction: column;
    gap: 8px;
  }

  .competitor-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .competitor-summary {
    margin-left: 0;
  }

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

/* ===== Auction History Table ===== */
.auction-history-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auction-history-card h2 {
  margin: 0 0 20px 0;
  color: #1e3a8a;
  font-size: 1.5rem;
}

.history-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

.history-search {
  flex: 1;
  min-width: 250px;
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.history-search:focus {
  outline: none;
  border-color: #3b82f6;
}

.history-stats {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
}

.history-stats span {
  color: #6b7280;
}

.history-stats strong {
  color: #111827;
  font-weight: 600;
}

.table-container {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 20px;
}

.auction-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.auction-history-table thead {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
}

.auction-history-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  position: relative;
  white-space: nowrap;
}

.auction-history-table th:hover {
  background: rgba(255, 255, 255, 0.1);
}

.auction-history-table th.sorted {
  background: rgba(255, 255, 255, 0.15);
}

.sort-arrow {
  margin-left: 4px;
  font-size: 0.8em;
  opacity: 0.7;
}

.auction-history-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s;
}

.auction-history-table tbody tr:hover {
  background-color: #f9fafb;
}

.auction-history-table tbody tr:last-child {
  border-bottom: none;
}

.auction-history-table td {
  padding: 12px 16px;
  color: #374151;
}

.item-name-cell {
  font-weight: 500;
  color: #1e3a8a;
}

.auction-history-table td.center {
  text-align: center;
}

.history-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.page-btn {
  padding: 8px 16px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.page-btn:hover:not(:disabled) {
  background: #2563eb;
}

.page-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

#pageInfo {
  color: #6b7280;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .history-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .history-search {
    min-width: 100%;
  }

  .history-stats {
    flex-direction: column;
    gap: 8px;
  }

  .auction-history-table {
    font-size: 0.8rem;
  }

  .auction-history-table th,
  .auction-history-table td {
    padding: 8px 12px;
  }
}

/* ===== Profit/Loss Display with Arrows ===== */
.profit-gain {
  color: #059669;
  font-weight: 600;
}

.profit-loss {
  color: #dc2626;
  font-weight: 600;
}

.profit-gain::before,
.profit-loss::before {
  font-weight: 700;
  margin-right: 2px;
}

/* Tab Navigation */
.currency-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.currency-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.currency-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.currency-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

/* Financial Health Card */
.finance-health-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.finance-title {
  margin: 0 0 24px 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #2456a5;
}

.finance-stats-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 20px;
}

.finance-stat-main {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff !important;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.finance-stat-main .stat-label {
  font-size: 1.3rem;
  color: #fff !important;
  opacity: 0.95;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value-huge {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff !important;
}

/* Make coins more readable on green background */
.stat-value-huge .coin-gold {
  color: #fef3c7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.stat-value-huge .coin-silver {
  color: #f3f4f6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.stat-value-huge .coin-copper {
  color: #fed7aa;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.finance-stat {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  text-align: center;
}

.finance-stat .stat-label {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.finance-stat .stat-value {
  font-size: 1.3rem;
  font-weight: 700;
}

.stat-value.positive {
  color: #10b981;
}

.stat-value.negative {
  color: #ef4444;
}

/* Coin Styles */
.coin {
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
  margin: 0 2px;
}

.coin-gold {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
}

.coin-silver {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #9ca3af;
}

.coin-copper {
  background: #fed7aa;
  color: #7c2d12;
  border: 1px solid #f97316;
}

/* Prevent coin wrapping in stat displays */
.stat-value-huge,
.stat-value,
.gph-value,
.calc-text {
  white-space: nowrap;
}

/* Override for green background - white coins with subtle backgrounds */
.stat-value-huge .coin-gold {
  background: rgba(254, 243, 199, 0.25);
  color: #fef3c7;
  border: 1px solid rgba(251, 191, 36, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.stat-value-huge .coin-silver {
  background: rgba(243, 244, 246, 0.25);
  color: #f3f4f6;
  border: 1px solid rgba(156, 163, 175, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.stat-value-huge .coin-copper {
  background: rgba(254, 215, 170, 0.25);
  color: #fed7aa;
  border: 1px solid rgba(249, 115, 22, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Net Worth Chart */
.networth-chart-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.networth-chart-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.networth-canvas {
  width: 100%;
  height: 300px;
  /* Increased from 200px for full-width display */
  border-radius: 8px;
  background: #f7fafc;
}

/* Gold Per Hour Table */
.gph-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 800px;
  /* Increased from 500px for full-width display with 20 rows */
  overflow-y: auto;
}

.gph-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.gph-table {
  width: 100%;
  border-collapse: collapse;
}

.gph-table thead {
  background: #f7fafc;
  position: sticky;
  top: 50px;
  z-index: 1;
}

.gph-table th {
  text-align: left;
  padding: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6e7f9b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e6eefb;
}

.gph-table td {
  padding: 12px;
  border-bottom: 1px solid #f0f4f8;
  color: #334e88;
  font-size: 0.95rem;
}

.gph-table tbody tr:hover {
  background: #f7fafc;
}

.gph-value {
  font-weight: 700;
  color: #10b981;
}

.gph-average {
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #eef4ff 0%, #d7e3fb 100%);
  border-radius: 10px;
  text-align: center;
  color: #334e88;
  font-size: 1rem;
  border: 1px solid #d7e3fb;
}

.gph-average strong {
  color: #10b981;
  font-size: 1.1rem;
}

/* Milestones */
.milestones-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.milestones-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.milestone-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.milestone-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  padding: 14px;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.milestone-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.milestone-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(251, 191, 36, 0.3);
}

.milestone-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.milestone-title {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
}

.milestone-desc {
  color: #6e7f9b;
  font-size: 0.85rem;
}

/* Epic Flying Calculator */
.epic-flying-calc {
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
  border-radius: 12px;
  border: 2px solid #fb923c;
}

.calc-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #c2410c;
  margin-bottom: 12px;
  text-align: center;
}

.calc-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-bar {
  height: 24px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #fb923c;
}

.calc-fill {
  height: 100%;
  background: linear-gradient(90deg, #fb923c 0%, #f97316 100%);
  transition: width 0.5s ease-out;
}

.calc-text {
  text-align: center;
  font-weight: 600;
  color: #c2410c;
  font-size: 0.95rem;
}

/* Recent Loot */
.recent-loot-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.recent-loot-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.loot-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.loot-item {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border-radius: 10px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.loot-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.loot-name {
  font-weight: 600;
  font-size: 0.95rem;
}

/* WoW Item Quality Colors */
.quality-poor {
  color: #9d9d9d;
}

.quality-common {
  color: #334e88;
}

.quality-uncommon {
  color: #1eff00;
  font-weight: 700;
}

.quality-rare {
  color: #0070dd;
  font-weight: 700;
}

.quality-epic {
  color: #a335ee;
  font-weight: 700;
}

.quality-legendary {
  color: #ff8000;
  font-weight: 700;
}

.loot-source {
  color: #6e7f9b;
  font-size: 0.85rem;
}

.loot-time {
  color: #6e7f9b;
  font-size: 0.85rem;
  font-style: italic;
}

/* Responsive */
@media (max-width: 1200px) {
  .finance-stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .gph-table {
    font-size: 0.85rem;
  }

  .gph-table th,
  .gph-table td {
    padding: 8px;
  }
}

/* ============================================================================
   AUCTION HOUSE STYLES
   ============================================================================ */

/* Auction Performance Card */
.auction-performance-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.auction-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.auction-stat {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  text-align: center;
}

/* Active Auctions */
.active-auctions-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.active-auctions-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.auction-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auction-item {
  display: grid;
  grid-template-columns: 2fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.auction-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.auction-name {
  font-weight: 600;
  color: #2456a5;
  font-size: 0.95rem;
}

.auction-price {
  font-weight: 700;
  color: #10b981;
  font-size: 0.95rem;
}

.auction-time {
  color: #6e7f9b;
  font-size: 0.85rem;
  font-style: italic;
}

/* Success Rate Card */
.success-rate-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.success-rate-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.success-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.success-circle {
  display: flex;
  justify-content: center;
  align-items: center;
  /* This ensures the SVG fills available space */
  width: 100%;
  max-width: 280px;
}

.success-circle svg {
  width: 100%;
  height: auto;
  /* This prevents any layout shift */
  display: block;
}

.success-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  width: 100%;
}

.success-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.success-label {
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.success-value {
  font-size: 1.75rem;
  font-weight: 700;
}

.success-value.sold {
  color: #10b981;
}

.success-value.expired {
  color: #ef4444;
}

/* Responsive adjustment for smaller screens */
@media (max-width: 768px) {
  .success-circle {
    max-width: 240px;
  }

  .success-circle svg {
    width: 100%;
    height: auto;
  }

  .success-stats {
    gap: 24px;
  }

  .success-value {
    font-size: 1.5rem;
  }
}

/* Best Sellers Table */
.best-sellers-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.best-sellers-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.best-sellers-table {
  width: 100%;
  border-collapse: collapse;
}

.best-sellers-table thead {
  background: #f7fafc;
}

.best-sellers-table th {
  text-align: left;
  padding: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6e7f9b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e6eefb;
}

.best-sellers-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #f0f4f8;
  color: #334e88;
  font-size: 0.95rem;
}

.best-sellers-table tbody tr:hover {
  background: #f7fafc;
}

.best-sellers-table .rank {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
  border-radius: 8px;
  text-align: center;
  line-height: 32px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 12px;
}

@media (max-width: 1200px) {
  .auction-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .currency-tabs {
    flex-direction: column;
  }

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

/* Configuration Upload Progress Bar */

.upload-progress-container {
  max-width: 600px;
  margin: 40px auto;
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.progress-bar-wrapper {
  margin: 24px 0;
}

.progress-bar-container {
  height: 40px;
  background: #e6eefb;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(45deg,
      #2456a5 25%,
      #ffffff 25%,
      #ffffff 50%,
      #2456a5 50%,
      #2456a5 75%,
      #ffffff 75%,
      #ffffff);
  background-size: 40px 40px;
  border-radius: 20px;
  transition: width 0.3s ease;
  animation: candy-cane 1s linear infinite;
  box-shadow: 0 2px 8px rgba(36, 86, 165, 0.3);
}

@keyframes candy-cane {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 40px 40px;
  }
}

.progress-text {
  text-align: center;
  margin-top: 16px;
  font-size: 1rem;
  color: #2456a5;
  font-weight: 600;
  min-height: 24px;
}

.progress-message {
  text-align: center;
  margin-top: 8px;
  font-size: 0.9rem;
  color: #6e7f9b;
  font-style: italic;
  min-height: 20px;
}

/* ============================================================================
   TRAVEL LOG STYLES (Matching Currencies Design)
   ============================================================================ */

/* Container */
.travel-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation (Reusing currencies style) */
.travel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.travel-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.travel-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.travel-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

/* Tab Content */
.travel-tab-content {
  display: none;
}

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

.travel-content-wrapper {
  margin-top: 24px;
}

/* ===== Journal Tab (Overview Stats) ===== */

.travel-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.travel-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.travel-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

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

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

.stat-label {
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-sublabel {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 4px;
}

/* Favorite Zone Card */
.favorite-zone-card {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #fbbf24;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
  margin-bottom: 24px;
}

.favorite-zone-card h3 {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  color: #92400e;
}

.favorite-zone-name {
  font-size: 2rem;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 12px;
}

.favorite-zone-stats {
  font-size: 1rem;
  color: #92400e;
  font-weight: 600;
}

/* Zone Timeline Graph */
.zone-timeline-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  margin-bottom: 24px;
}

.zone-timeline-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.zone-timeline-canvas {
  width: 100%;
  height: auto;
  max-width: 1000px;
  display: block;
}

/* ===== Log Tab (Searchable Table) ===== */

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.log-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.log-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.zone-search-input,
.date-input {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.zone-search-input {
  min-width: 200px;
}

.date-input {
  min-width: 140px;
}

.zone-search-input:focus,
.date-input:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.clear-filters-btn {
  padding: 8px 16px;
  background: #f0f4f8;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  color: #2456a5;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-filters-btn:hover {
  background: #e6eefb;
  border-color: #2456a5;
}

.log-table-container {
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  margin-bottom: 12px;
}

.pagination-info {
  text-align: right;
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
}

.travel-log-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.travel-log-table thead {
  background: linear-gradient(135deg, #2456a5 0%, #1e4a8f 100%);
  color: #fff;
}

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

.travel-log-table tbody tr {
  border-bottom: 1px solid #e6eefb;
  transition: background 0.15s;
}

.travel-log-table tbody tr:hover {
  background: #f7fafc;
}

.travel-log-table tbody tr:last-child {
  border-bottom: none;
}

.travel-log-table td {
  padding: 12px 16px;
  color: #374151;
}

.travel-log-table td.muted {
  color: #9ca3af;
  font-size: 0.9rem;
}

/* ===== Heatmap Tab ===== */

.heatmap-section,
.transitions-section,
.subzone-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.heatmap-section h3,
.transitions-section h3,
.subzone-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

/* Heatmap Bars */
.heatmap-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.heatmap-bar-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.heatmap-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.zone-name {
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.zone-percentage {
  font-weight: 700;
  color: #2456a5;
  font-size: 0.9rem;
}

.heatmap-bar-track {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.heatmap-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.5s ease-out;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.heatmap-stats {
  font-size: 0.85rem;
  color: #6e7f9b;
}

/* Zone Transitions */
.transitions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transition-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e6eefb;
}

.transition-route {
  display: flex;
  align-items: center;
  gap: 12px;
}

.from-zone,
.to-zone {
  font-weight: 600;
  color: #374151;
}

.transition-arrow {
  color: #2456a5;
  font-size: 1.2rem;
}

.transition-count {
  font-weight: 600;
  color: #2456a5;
  font-size: 0.9rem;
  background: #eef4ff;
  padding: 4px 12px;
  border-radius: 12px;
}

/* Subzone Table */
.subzone-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.subzone-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.subzone-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.subzone-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.subzone-table tbody tr:hover {
  background: #f7fafc;
}

.subzone-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
  .travel-stats-grid {
    grid-template-columns: 1fr;
  }

  .travel-tabs {
    flex-wrap: wrap;
  }

  .travel-tab {
    flex: 1;
    min-width: 100px;
  }
}

/* ============================================================================
   PROGRESSION / RAIDS STYLES
   ============================================================================ */

/* Container */
.prog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation */
.prog-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.prog-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.prog-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.prog-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

.prog-content-wrapper {
  margin-top: 24px;
}

/* ===== Overview Tab ===== */

.prog-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.prog-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.prog-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

/* Raid Progression */
.raid-progression-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.raid-progression-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.raid-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.raid-card:last-child {
  margin-bottom: 0;
}

.raid-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 12px;
}

.raid-difficulty-row {
  display: grid;
  grid-template-columns: 120px 1fr 80px;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.raid-difficulty-row:last-child {
  margin-bottom: 0;
}

.diff-name {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.raid-progress-bar {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.raid-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  transition: width 0.5s ease-out;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.raid-progress-text {
  font-weight: 700;
  color: #2456a5;
  font-size: 0.9rem;
  text-align: right;
}

/* Difficulty Breakdown */
.difficulty-breakdown-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.difficulty-breakdown-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
  align-self: flex-start;
}

.difficulty-pie-chart {
  margin-bottom: 20px;
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 400px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  font-weight: 600;
  color: #374151;
}

.legend-value {
  color: #6e7f9b;
  font-weight: 600;
}

/* ===== Boss Kills Tab ===== */

.boss-kills-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.boss-kills-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.boss-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.boss-search-input,
.difficulty-filter {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.boss-search-input {
  min-width: 220px;
}

.difficulty-filter {
  min-width: 160px;
}

.boss-search-input:focus,
.difficulty-filter:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.boss-kills-table-container {
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  margin-bottom: 12px;
}

.boss-kills-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.boss-kills-table thead {
  background: linear-gradient(135deg, #2456a5 0%, #1e4a8f 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.boss-kills-table tbody tr {
  border-bottom: 1px solid #e6eefb;
  transition: background 0.15s;
}

.boss-kills-table tbody tr:hover {
  background: #f7fafc;
}

.boss-kills-table td {
  padding: 12px 16px;
  color: #374151;
}

.difficulty-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.diff-normal {
  background: #e0f2fe;
  color: #0369a1;
}

.diff-heroic {
  background: #fef3c7;
  color: #92400e;
}

.diff-mythic {
  background: #fce7f3;
  color: #9f1239;
}

/* ===== Lockouts Tab ===== */

.lockouts-section,
.lockout-history-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.lockouts-section h3,
.lockout-history-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.lockouts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.lockout-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
}

.lockout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.lockout-instance {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
}

.lockout-difficulty {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6e7f9b;
  background: #e6eefb;
  padding: 4px 8px;
  border-radius: 4px;
}

.lockout-progress {
  margin-bottom: 12px;
}

.lockout-progress-bar {
  height: 20px;
  background: #e6eefb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
}

.lockout-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-radius: 10px;
  transition: width 0.5s ease-out;
}

.lockout-progress-text {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 600;
}

.lockout-reset {
  font-size: 0.9rem;
  color: #374151;
  font-weight: 600;
}

.extended-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Lockout History Table */
.lockout-history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.lockout-history-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.lockout-history-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.lockout-history-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.lockout-history-table tbody tr:hover {
  background: #f7fafc;
}

.lockout-history-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
  .prog-stats-grid {
    grid-template-columns: 1fr;
  }

  .prog-tabs {
    flex-wrap: wrap;
  }

  .prog-tab {
    flex: 1;
    min-width: 100px;
  }

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

/* ============================================================================
   QUESTS STYLES
   ============================================================================ */

/* Container */
.quest-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation */
.quest-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.quest-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.quest-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.quest-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

.quest-content-wrapper {
  margin-top: 24px;
}

/* ===== Overview Tab ===== */

.quest-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.quest-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.quest-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

/* Most Rewarding Quest Card */
.most-rewarding-quest-card {
  background: linear-gradient(135deg, #ffe064 0%, #775f00 100%);
  border: 2px solid #fbbf24;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
  margin-bottom: 24px;
}

.most-rewarding-quest-card h3 {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  color: #92400e;
}

.rewarding-quest-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 12px;
}

.rewarding-quest-details {
  display: flex;
  gap: 20px;
  justify-content: center;
  font-size: 1.1rem;
  color: #92400e;
  font-weight: 600;
}

/* Quest Trends */
.quest-trends-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.quest-trends-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.quest-trends-canvas {
  width: 100%;
  height: auto;
  max-width: 1000px;
  display: block;
}

/* Quests by Zone */
.quests-by-zone-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.quests-by-zone-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.zone-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zone-bar-container {
  display: grid;
  grid-template-columns: 200px 1fr 60px;
  align-items: center;
  gap: 12px;
}

.zone-bar-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.zone-bar-track {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
}

.zone-bar-fill {
  height: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  transition: width 0.5s ease-out;
}

.zone-bar-count {
  font-weight: 700;
  color: #2456a5;
  text-align: right;
}

/* ===== Quest Log Tab ===== */

.quest-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.quest-log-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.quest-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.quest-search-input,
.level-input {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.quest-search-input {
  min-width: 220px;
}

.level-input {
  width: 90px;
}

.quest-search-input:focus,
.level-input:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.quest-log-table-container {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  margin-bottom: 24px;
}

.quest-log-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.quest-log-table thead {
  background: linear-gradient(135deg, #2456a5 0%, #1e4a8f 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.quest-log-table tbody tr {
  border-bottom: 1px solid #e6eefb;
  transition: background 0.15s;
}

.quest-log-table tbody tr:hover {
  background: #f7fafc;
}

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

/* Notable Quests */
.notable-quests-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.notable-quests-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.notable-quests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.notable-quest-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
}

.notable-quest-card h4 {
  margin: 0 0 12px 0;
  color: #2456a5;
  font-size: 1rem;
}

.notable-quest-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notable-quest-card li {
  padding: 6px 0;
  color: #374151;
  font-size: 0.9rem;
  border-bottom: 1px solid #e6eefb;
}

.notable-quest-card li:last-child {
  border-bottom: none;
}

/* ===== Rewards Tab ===== */

.reward-quality-section,
.reward-slot-section,
.top-rewards-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.reward-quality-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reward-quality-section h3,
.reward-slot-section h3,
.top-rewards-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
  align-self: flex-start;
}

.quality-pie-chart {
  margin-bottom: 20px;
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 400px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  font-weight: 600;
  color: #374151;
}

.legend-value {
  color: #6e7f9b;
  font-weight: 600;
}

/* Slot Distribution */
.slot-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slot-bar-container {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  align-items: center;
  gap: 12px;
}

.slot-bar-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.slot-bar-track {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
}

.slot-bar-fill {
  height: 100%;
  background: linear-gradient(135deg, #3182ce 0%, #1e4a8f 100%);
  border-radius: 12px;
  transition: width 0.5s ease-out;
}

.slot-bar-count {
  font-weight: 700;
  color: #2456a5;
  text-align: right;
}

/* Top Rewards Gallery */
.reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.reward-card {
  background: linear-gradient(135deg, #262b33 0%, #1e5275 100%);
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 12px;
}

.reward-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.reward-count {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .quest-stats-grid {
    grid-template-columns: 1fr;
  }

  .quest-tabs {
    flex-wrap: wrap;
  }

  .quest-tab {
    flex: 1;
    min-width: 100px;
  }

  .zone-bar-container,
  .slot-bar-container {
    grid-template-columns: 150px 1fr 50px;
  }

  .notable-quests-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   PROFESSIONS / SKILLS STYLES
   ============================================================================ */

/* Container */
.prof-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation */
.prof-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.prof-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.prof-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.prof-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

.prof-content-wrapper {
  margin-top: 24px;
}

/* ===== Overview Tab ===== */

.prof-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.prof-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.prof-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

/* Professions Section */
.professions-section,
.secondary-section,
.recipe-counts-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.professions-section h3,
.secondary-section h3,
.recipe-counts-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.profession-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.profession-card {
  background: linear-gradient(135deg, #f7fafc 0%, #eef4ff 100%);
  border: 1px solid #d7e3fb;
  border-radius: 8px;
  padding: 16px;
}

.profession-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.profession-name {
  font-weight: 700;
  color: #2456a5;
  font-size: 1.1rem;
}

.profession-rank {
  font-weight: 600;
  color: #6e7f9b;
  font-size: 0.95rem;
}

.profession-progress-bar {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}

.profession-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  transition: width 0.5s ease-out;
}

.profession-stats {
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
}

/* Secondary Skills */
.secondary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.secondary-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
}

.secondary-name {
  font-weight: 700;
  color: #374151;
  margin-bottom: 12px;
  font-size: 1rem;
}

.secondary-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.secondary-progress-bar {
  flex: 1;
  height: 20px;
  background: #e6eefb;
  border-radius: 10px;
  overflow: hidden;
}

.secondary-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #3182ce 0%, #1e4a8f 100%);
  border-radius: 10px;
  transition: width 0.5s ease-out;
}

.secondary-rank {
  font-weight: 600;
  color: #2456a5;
  font-size: 0.9rem;
  min-width: 60px;
  text-align: right;
}

/* Recipe Counts Table */
.recipe-counts-table {
  width: 100%;
  border-collapse: collapse;
}

.recipe-counts-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.recipe-counts-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.recipe-counts-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.recipe-counts-table tbody tr:hover {
  background: #f7fafc;
}

.recipe-counts-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

/* ===== Recipes Tab ===== */

.recipes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.recipes-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.recipe-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.recipe-search-input,
.profession-filter {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.recipe-search-input {
  min-width: 220px;
}

.profession-filter {
  min-width: 160px;
}

.recipe-search-input:focus,
.profession-filter:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.recipe-cards-container {
  margin-bottom: 24px;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.recipe-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

.recipe-card-name {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
  margin-bottom: 8px;
}

.recipe-card-profession {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 600;
  margin-bottom: 6px;
}

.recipe-card-type {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 4px;
}

.recipe-card-cooldown {
  font-size: 0.85rem;
  color: #f59e0b;
  font-weight: 600;
  margin-top: 8px;
}

/* Notable Recipes */
.notable-recipes-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.notable-recipe-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.notable-recipe-card h4 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.1rem;
}

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

.notable-recipe-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f7fafc;
  border-radius: 6px;
  border: 1px solid #e6eefb;
}

.recipe-name {
  font-weight: 600;
  color: #374151;
  flex: 1;
}

.recipe-prof,
.recipe-cooldown {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .prof-stats-grid {
    grid-template-columns: 1fr;
  }

  .prof-tabs {
    flex-wrap: wrap;
  }

  .prof-tab {
    flex: 1;
    min-width: 100px;
  }

  .profession-cards,
  .secondary-cards,
  .recipe-grid {
    grid-template-columns: 1fr;
  }

  .notable-recipes-section {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   ACHIEVEMENTS STYLES
   ============================================================================ */

/* Container */
.ach-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation */
.ach-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.ach-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.ach-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.ach-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

.ach-content-wrapper {
  margin-top: 24px;
}

/* ===== Overview Tab ===== */

.ach-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.ach-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ach-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

/* Categories */
.category-section,
.recent-achievements-section,
.highest-achievements-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.category-section h3,
.recent-achievements-section h3,
.highest-achievements-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.category-card {
  background: linear-gradient(135deg, #f7fafc 0%, #eef4ff 100%);
  border: 1px solid #d7e3fb;
  border-radius: 8px;
  padding: 16px;
}

.category-name {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
  margin-bottom: 12px;
}

.category-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
}

/* Recent Achievements */
.recent-achievements-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-achievement-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  gap: 16px;
}

.achievement-content {
  flex: 1;
}

.achievement-name {
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 4px;
}

.achievement-desc {
  font-size: 0.85rem;
  color: #6e7f9b;
}

.achievement-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.achievement-points {
  font-weight: 700;
  color: #f59e0b;
  font-size: 0.95rem;
}

.achievement-date {
  font-size: 0.85rem;
  color: #9ca3af;
}

/* Highest Achievements Table */
.highest-achievements-table {
  width: 100%;
  border-collapse: collapse;
}

.highest-achievements-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.highest-achievements-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.highest-achievements-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.highest-achievements-table tbody tr:hover {
  background: #f7fafc;
}

.highest-achievements-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

.points-cell {
  color: #f59e0b;
  font-weight: 700;
}

/* ===== Collections Tab ===== */

.mounts-section,
.pets-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.mounts-section h3,
.pets-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.collection-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.collection-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

.collection-card.active-mount,
.collection-card.active-pet {
  border: 2px solid #10b981;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.collection-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
}

.collection-icon-placeholder {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: #e6eefb;
  border-radius: 8px;
}

.collection-name {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.active-badge {
  margin-top: 8px;
  padding: 4px 8px;
  background: #10b981;
  color: #fff;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ===== Timeline Tab ===== */

.spam-days-section,
.monthly-graph-section,
.timeline-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.spam-days-section h3,
.monthly-graph-section h3,
.timeline-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

/* Spam Days */
.spam-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.spam-day-card {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #fbbf24;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.spam-day-date {
  font-weight: 700;
  color: #92400e;
  font-size: 1rem;
  margin-bottom: 8px;
}

.spam-day-stats {
  font-size: 0.9rem;
  color: #78350f;
  font-weight: 600;
}

.spam-day-count {
  margin-bottom: 4px;
}

/* Monthly Graph */
.monthly-graph-canvas {
  width: 100%;
  height: auto;
  max-width: 1000px;
  display: block;
}

/* Timeline */
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.timeline-search {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  min-width: 250px;
  transition: border-color 0.2s;
}

.timeline-search:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 600px;
  overflow-y: auto;
}

.timeline-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
}

.timeline-date {
  min-width: 120px;
  font-weight: 600;
  color: #6e7f9b;
  font-size: 0.9rem;
}

.timeline-achievement {
  flex: 1;
}

.timeline-name {
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 6px;
}

.timeline-points {
  font-size: 0.85rem;
  color: #f59e0b;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .ach-stats-grid {
    grid-template-columns: 1fr;
  }

  .ach-tabs {
    flex-wrap: wrap;
  }

  .ach-tab {
    flex: 1;
    min-width: 100px;
  }

  .category-grid,
  .collection-grid,
  .spam-days-grid {
    grid-template-columns: 1fr;
  }

  .recent-achievement-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .achievement-meta {
    align-items: flex-start;
  }

  .timeline-item {
    flex-direction: column;
    gap: 8px;
  }

  .timeline-date {
    min-width: auto;
  }
}

/* ===== ITEMS PAGE STYLES - CONSOLIDATED & FIXED ===== */

/* Tab styling */
.items-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 8px;
}

.items-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 500;
  font-size: 1rem;
  color: #6b7280;
  transition: all 0.2s;
}

.items-tab:hover {
  color: #1e3a8a;
  background: #f3f4f6;
  border-radius: 8px 8px 0 0;
}

.items-tab.active {
  color: #1e3a8a;
  border-bottom-color: #1e3a8a;
  font-weight: 600;
}

.items-tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

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

/* Vault Overview */
.vault-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.vault-stat-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
  padding: 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vault-stat-icon {
  font-size: 3rem;
  opacity: 0.9;
}

.vault-stat-content {
  flex: 1;
}

.vault-stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 4px;
}

.vault-stat-value {
  font-size: 2rem;
  font-weight: 700;
}

/* Vault Sections */
.vault-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.vault-section h3 {
  margin: 0 0 20px 0;
  color: #1e3a8a;
  font-size: 1.3rem;
}

/* Quality Chart */
.quality-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quality-bar {
  display: grid;
  grid-template-columns: 120px 1fr 80px;
  align-items: center;
  gap: 12px;
}

.quality-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.quality-bar-fill {
  height: 24px;
  border-radius: 4px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.quality-bar:hover .quality-bar-fill {
  opacity: 1;
}

.quality-count {
  text-align: right;
  font-weight: 700;
  color: #111827;
}

/* Vault Items List */
.vault-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vault-item-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  transition: background 0.2s;
}

.vault-item-row:hover {
  background: #f3f4f6;
}

.vault-item-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.vault-item-ilvl {
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 600;
}

.vault-item-location {
  color: #6b7280;
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 500;
}

/* Bags/Bank/Mail - Grid Display */
.bag-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bag-container h3 {
  margin: 0 0 20px 0;
  color: #1e3a8a;
  font-size: 1.2rem;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.item-card {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.item-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.item-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  border: 2px solid #d1d5db;
}

/* Item card text - DARK version (used in bags/bank/mail) */
.item-name-dark {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  /* Quality color applied via inline style - NO text shadow needed */
}

.item-count-dark {
  font-size: 1rem;
  color: #111827;
  font-weight: 700;
}

.item-ilvl-dark {
  font-size: 0.85rem;
  color: #374151;
  margin-top: 4px;
  font-weight: 600;
}

.item-sender-dark {
  font-size: 0.8rem;
  color: #374151;
  margin-top: 4px;
  font-style: italic;
  font-weight: 500;
}

/* Combined Tab */
.combined-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.combined-container h3 {
  margin: 0 0 20px 0;
  color: #1e3a8a;
  font-size: 1.3rem;
}

.combined-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

.combined-search {
  flex: 1;
  min-width: 250px;
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.combined-search:focus {
  outline: none;
  border-color: #3b82f6;
}

.combined-count {
  color: #6b7280;
  font-size: 0.95rem;
}

.combined-count strong {
  color: #111827;
  font-weight: 600;
}

.combined-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.combined-table thead {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
}

.combined-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.combined-table th:hover {
  background: rgba(255, 255, 255, 0.1);
}

.combined-table th.sorted {
  background: rgba(255, 255, 255, 0.15);
}

.sort-arrow {
  margin-left: 4px;
  font-size: 0.8em;
  opacity: 0.7;
}

.combined-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s;
}

.combined-table tbody tr:hover {
  background-color: #f9fafb;
}

.combined-table tbody td {
  padding: 12px 16px;
  color: #111827;
}

.combined-table tbody td strong {
  font-weight: 700;
}

.combined-table td.center {
  text-align: center;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .vault-overview {
    grid-template-columns: 1fr;
  }

  .vault-item-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
  }

  .item-icon {
    width: 48px;
    height: 48px;
  }

  .combined-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .combined-search {
    min-width: 100%;
  }

  .combined-table {
    font-size: 0.8rem;
  }

  .combined-table th,
  .combined-table td {
    padding: 8px 12px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.muted {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Dashboard Tabs */
.dashboard-tabs {
  display: flex;
  gap: 8px;
  margin: 24px 0;
  border-bottom: 2px solid #e2e8f0;
  padding: 0 20px;
}

.dashboard-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #64748b;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: -2px;
}

.dashboard-tab:hover {
  color: #2456a5;
  background: #f8fafc;
}

.dashboard-tab.active {
  color: #2456a5;
  border-bottom-color: #2456a5;
  background: #f8fafc;
}

.dashboard-content-wrapper {
  padding: 20px;
}

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

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

/* Gear Tab - Paper Doll */
.paperdoll-card {
  min-height: auto;
  margin-bottom: 20px;
}

.upgrade-opportunities-card {
  width: 100%;
}

.paperdoll {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  margin-top: 20px;
}

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

.paperdoll-center {
  justify-content: center;
  gap: 20px;
}

.equipment-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: #001933;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.equipment-slot:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.equipment-slot.empty {
  opacity: 0.6;
}

.equipment-slot.needs-upgrade {
  border-color: #ff0000;
  background: #370000;
}

.slot-icon {
  width: 40px;
  height: 40px;
  border: 2px solid #9d9d9d;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: #1e293b;
  flex-shrink: 0;
  position: relative;
}

.slot-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.slot-icon.empty-slot {
  background: #e2e8f0;
  color: #94a3b8;
  border-color: #cbd5e1;
}

.slot-info {
  flex: 1;
  min-width: 0;
}

.slot-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-ilvl {
  font-size: 0.85rem;
  color: #64748b;
}

.slot-empty {
  font-size: 0.85rem;
  color: #94a3b8;
  font-style: italic;
}

.upgrade-flag {
  font-size: 0.75rem;
  color: #f59e0b;
  font-weight: 600;
}

/* Upgrade Opportunities */
.upgrade-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.upgrade-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #181400;
  border: 2px solid #ffdd00;
  border-radius: 8px;
}

.upgrade-slot {
  font-weight: 700;
  color: #92400e;
  min-width: 80px;
}

.upgrade-info {
  flex: 1;
}

.upgrade-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.upgrade-deficit {
  font-size: 0.85rem;
  color: #78350f;
  margin-top: 4px;
}

.deficit-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #dc2626;
  color: white;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
  margin-left: 8px;
}

.success-message {
  color: #16a34a;
  font-weight: 600;
  padding: 20px;
  text-align: center;
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  border-radius: 8px;
  margin-top: 16px;
}

/* Stats Tab */
.stats-bars-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.stat-bar-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-bar-label {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
}

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

.stat-bar-container {
  width: 100%;
  height: 24px;
  background: #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.3s ease;
  position: relative;
}

.stat-bar-fill.health {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

.stat-bar-fill.mana {
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
}

.stat-bar-fill.ilvl {
  background: linear-gradient(90deg, #7c3aed 0%, #a855f7 100%);
}

/* Stat Trends */
.trends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.trend-item {
  padding: 16px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  text-align: center;
}

.trend-label {
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.trend-indicator {
  font-size: 1.3rem;
  font-weight: 700;
}

.trend-indicator.up {
  color: #16a34a;
}

.trend-indicator.down {
  color: #dc2626;
}

.trend-indicator.neutral {
  color: #64748b;
}

/* Talent Points Tab */
.talents-card {
  max-width: 100%;
}

.talent-trees-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.talent-tree-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
}

.talent-tree-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.talent-tree-header h4 {
  margin: 0;
  color: #1e293b;
  font-size: 1.1rem;
}

.talent-tree-points {
  font-weight: 700;
  color: #2456a5;
  font-size: 1.1rem;
}

.talent-tree-bar-container {
  width: 100%;
  height: 20px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.talent-tree-bar {
  height: 100%;
  background: linear-gradient(90deg, #2456a5 0%, #3b6fd9 100%);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.talent-tree-percentage {
  text-align: center;
  font-weight: 600;
  color: #64748b;
  font-size: 0.9rem;
}

.talents-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.talent-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.talent-item:hover {
  border-color: #2456a5;
  box-shadow: 0 2px 8px rgba(36, 86, 165, 0.1);
}

.talent-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  position: relative;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  font-size: 1.2rem;
}

.talent-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.talent-rank {
  position: absolute;
  bottom: -6px;
  right: -6px;
  background: #2456a5;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 2px solid white;
}

.talent-info {
  flex: 1;
  min-width: 0;
}

.talent-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.talent-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .paperdoll {
    grid-template-columns: 1fr;
  }

  .paperdoll-center {
    flex-direction: row;
    justify-content: space-around;
  }

  .talent-trees-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-tabs {
    overflow-x: auto;
    padding: 0 10px;
  }

  .dashboard-tab {
    padding: 10px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
  }
}

/* ========================================
   MORTALITY SECTION STYLES - Light Theme
   ======================================== */

/* Mortality Header */
.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;
}

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

/* Death Subtitle */
.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 */
.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 */
.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 */
.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 Chart */
.death-trend-chart {
  grid-column: 1 / -1;
  width: 100%;
  height: 250px;
  margin-top: 15px;
  background: #f8fafc;
  border-radius: 8px;
}

/* Interesting Stats Grid */
.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 */
.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 */
.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 */
.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;
}

.muted {
  color: #94a3b8;
  font-style: italic;
}

/* Override dash-card for mortality to allow proper 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;
}

/* Tab content visibility */
.mortality-tab-content {
  display: none;
}

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

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

/* Responsive adjustments */
@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 some 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;
  }
}

@media (max-width: 480px) {

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

/* ==========================================================================
   WhoDASH Quests - Enhanced Styles for Quest Events & Timeline
   Add this to your existing CSS file or include it separately
   ========================================================================== */

/* Current Quest Log Section */
.current-quest-log-section {
  margin-bottom: 2rem;
}

.current-quest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.current-quest-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s;
}

.current-quest-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.current-quest-card.quest-complete {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #22c55e;
}

.quest-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.quest-card-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: #1f2937;
  flex: 1;
}

.quest-complete-badge {
  background: #22c55e;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.quest-objectives {
  margin: 0.75rem 0;
}

.objective-item {
  padding: 0.5rem;
  margin: 0.25rem 0;
  background: #f9fafb;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #4b5563;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.objective-item.objective-complete {
  background: #d1fae5;
  color: #065f46;
  text-decoration: line-through;
}

.objective-progress {
  margin-left: auto;
  font-weight: 600;
  color: #6366f1;
}

.quest-card-footer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.85rem;
}

/* Quest Event History Section */
.quest-event-history-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
}

.quest-event-timeline {
  max-height: 600px;
  overflow-y: auto;
  margin-top: 1rem;
  padding-right: 0.5rem;
}

.quest-event-timeline::-webkit-scrollbar {
  width: 8px;
}

.quest-event-timeline::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.quest-event-timeline::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.quest-event-timeline::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.quest-event-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #cbd5e1;
  transition: all 0.2s;
}

.quest-event-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.event-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 50%;
}

.event-content {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.event-kind {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: #e5e7eb;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #4b5563;
  margin-bottom: 0.25rem;
}

.event-detail {
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: #f3f4f6;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #6b7280;
}

.event-time {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Success stat card highlight */
.stat-card-success {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #22c55e !important;
}

.stat-card-success .stat-value {
  color: #16a34a;
}

/* Quest Level Distribution */
.quest-level-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.level-bars {
  margin-top: 1rem;
}

.level-bar-container {
  display: grid;
  grid-template-columns: 80px 1fr 60px;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.level-bar-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4b5563;
}

.level-bar-track {
  height: 28px;
  background: #f1f5f9;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.level-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 14px;
  transition: width 0.5s ease;
}

.level-bar-count {
  text-align: right;
  font-weight: 600;
  color: #6366f1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .current-quest-grid {
    grid-template-columns: 1fr;
  }

  .quest-event-item {
    flex-direction: column;
    gap: 0.75rem;
  }

  .event-icon {
    width: 100%;
    height: 48px;
  }

  .level-bar-container {
    grid-template-columns: 60px 1fr 50px;
    gap: 0.75rem;
  }
}

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

.quest-stat-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s;
}

.quest-stat-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 500;
}

.stat-sublabel {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

/* Canvas containers */
.quest-trends-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.quest-trends-canvas,
.quest-timeline-canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

/* ===================================================================
   Combat Analytics Styles
   =================================================================== */

/* Tab Navigation */
.combat-tabs-container {
  margin-bottom: 32px;
}

.combat-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
}

.combat-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  bottom: -2px;
}

.combat-tab:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.combat-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.combat-tab-content {
  position: relative;
}

.combat-tab-pane {
  display: none;
}

.combat-tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* Combat Overview Card */
.combat-overview-card {
  background: linear-gradient(135deg, #991b1b 0%, #450a0a 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.combat-title {
  color: #f1f5f9;
  font-size: 1.75rem;
  margin: 0 0 24px 0;
  font-weight: 600;
}

.combat-stats-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .combat-stats-grid {
    grid-template-columns: 1fr;
  }
}

.combat-stat-main {
  grid-column: span 1;
  text-align: center;
  padding: 24px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 12px;
  border: 2px solid rgba(239, 68, 68, 0.3);
}

.combat-stat {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.stat-value-huge {
  font-size: 3rem;
  font-weight: 700;
  color: #ef4444;
  margin: 8px 0;
  text-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 8px 0;
}

.stat-value.highlight {
  color: #fbbf24;
}

.stat-label {
  font-size: 0.875rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.stat-sublabel {
  font-size: 0.875rem;
  color: #cbd5e1;
  margin-top: 4px;
}

/* Chart Cards */
.dps-chart-card,
.combat-breakdown-card,
.instance-performance-card,
.dps-distribution-card,
.role-performance-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.dps-chart-card h3,
.combat-breakdown-card h3,
.instance-performance-card h3,
.dps-distribution-card h3,
.role-performance-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.dps-canvas,
.combat-breakdown-card canvas,
.instance-performance-card canvas,
.dps-distribution-card canvas {
  display: block;
  margin: 20px auto;
}

/* Pie Chart Legend */
.pie-legend {
  margin-top: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px;
  background: #f8fafc;
  border-radius: 6px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.legend-label {
  flex: 1;
  color: #475569;
  font-weight: 500;
}

.legend-value {
  color: #64748b;
  font-weight: 600;
}

/* Boss Encounters Table */
.boss-table-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.boss-table-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.boss-table-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.filter-buttons {
  display: flex;
  gap: 8px;
}

.filter-btn {
  padding: 8px 16px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.filter-btn.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.table-wrapper {
  overflow-x: auto;
  margin-bottom: 16px;
}

.boss-encounters-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.boss-encounters-table thead {
  background: #f8fafc;
}

.boss-encounters-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.boss-encounters-table th:hover {
  background: #f1f5f9;
}

.boss-encounters-table th.sorted {
  background: #e0e7ff;
  color: #3b82f6;
}

.sort-arrow {
  margin-left: 4px;
  font-size: 12px;
  color: #94a3b8;
}

.boss-encounters-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s;
}

.boss-encounters-table tbody tr:hover {
  background: #f8fafc;
}

.boss-encounters-table td {
  padding: 12px 16px;
  color: #334155;
}

.boss-name {
  font-weight: 600;
  color: #1e293b;
}

.dps-value {
  font-weight: 600;
  color: #64748b;
}

.dps-value.high-dps {
  color: #10b981;
}

.table-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.page-btn {
  padding: 8px 16px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  border-color: #3b82f6;
  color: #3b82f6;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* DPS Distribution */
.percentiles-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .percentiles-info {
    grid-template-columns: 1fr;
  }
}

.percentile-item {
  text-align: center;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
}

.percentile-label {
  display: block;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.percentile-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: #06b6d4;
}

/* Role Performance */
.role-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .role-stats-grid {
    grid-template-columns: 1fr;
  }
}

.role-stat {
  text-align: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
}

/* Section styling */
.combat-section {
  margin-bottom: 48px;
}

.section-title {
  color: #1e293b;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 3px solid #e2e8f0;
}

/* Utility classes */
.muted {
  color: #94a3b8;
  text-align: center;
  padding: 20px;
}

.positive {
  color: #10b981;
}

.negative {
  color: #ef4444;
}

/* ===================================================================
   NEW DPS-SPECIFIC COMPONENTS
   =================================================================== */

/* Burst vs Sustained Analysis */
.burst-analysis-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.burst-analysis-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.burst-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .burst-comparison {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .burst-divider {
    display: none;
  }
}

.burst-item {
  text-align: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
}

.burst-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}

.burst-desc {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 12px;
}

.burst-value {
  font-size: 2rem;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 8px;
}

.burst-value.highlight {
  color: #dc2626;
}

.burst-count {
  font-size: 0.875rem;
  color: #64748b;
}

.burst-divider {
  font-size: 1.5rem;
  font-weight: 700;
  color: #cbd5e1;
}

.burst-insight {
  padding: 16px;
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #1e40af;
}

/* Target Type Analysis */
.target-analysis-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.target-analysis-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.target-comparison {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .target-comparison {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .target-divider {
    display: none;
  }
}

.target-item {
  text-align: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
}

.target-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 12px;
}

.target-value {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.target-value.boss {
  color: #7c3aed;
}

.target-value.adds {
  color: #f97316;
}

.target-detail {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.target-count {
  font-size: 0.875rem;
  color: #94a3b8;
}

.target-divider {
  background: linear-gradient(to bottom, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
}

.target-insight {
  padding: 16px;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #92400e;
}

/* Consistency Metrics */
.consistency-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.consistency-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.consistency-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 968px) {
  .consistency-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .consistency-grid {
    grid-template-columns: 1fr;
  }
}

.consistency-item {
  text-align: center;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.consistency-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.consistency-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #334155;
}

.consistency-rating {
  font-size: 1.25rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  display: inline-block;
}

.consistency-rating.excellent {
  background: #d1fae5;
  color: #065f46;
}

.consistency-rating.good {
  background: #dbeafe;
  color: #1e40af;
}

.consistency-rating.average {
  background: #fef3c7;
  color: #92400e;
}

.consistency-rating.poor {
  background: #fee2e2;
  color: #991b1b;
}

.consistency-insight {
  padding: 16px;
  background: #f0f9ff;
  border-left: 4px solid #0ea5e9;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #075985;
}

/* ===================================================================
   Healing Analytics Styles (Green Theme for Healers)
   =================================================================== */

/* Tab Navigation */
.healing-tabs-container {
  margin-bottom: 32px;
}

.healing-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
}

.healing-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  bottom: -2px;
}

.healing-tab:hover {
  color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.healing-tab.active {
  color: #10b981;
  border-bottom-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.healing-tab-content {
  position: relative;
}

.healing-tab-pane {
  display: none;
}

.healing-tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

/* Healing Overview Card */
.healing-overview-card {
  background: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.healing-title {
  color: #f1f5f9;
  font-size: 1.75rem;
  margin: 0 0 24px 0;
  font-weight: 600;
}

.healing-stats-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .healing-stats-grid {
    grid-template-columns: 1fr;
  }
}

.healing-stat-main {
  grid-column: span 1;
  text-align: center;
  padding: 24px;
  background: rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  border: 2px solid rgba(16, 185, 129, 0.4);
}

.healing-stat {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

/* Chart Cards */
.hps-chart-card,
.healing-breakdown-card,
.instance-performance-card,
.hps-distribution-card,
.overheal-analysis-card,
.efficiency-metrics-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.hps-chart-card h3,
.healing-breakdown-card h3,
.instance-performance-card h3,
.hps-distribution-card h3,
.overheal-analysis-card h3,
.efficiency-metrics-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.hps-canvas,
.healing-breakdown-card canvas,
.instance-performance-card canvas,
.hps-distribution-card canvas {
  display: block;
  margin: 20px auto;
}

/* Healing Encounters Table */
.healing-table-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.healing-table-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.healing-table-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.healing-encounters-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.healing-encounters-table thead {
  background: #f8fafc;
}

.healing-encounters-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.healing-encounters-table th:hover {
  background: #f1f5f9;
}

.healing-encounters-table th.sorted {
  background: #d1fae5;
  color: #10b981;
}

.healing-encounters-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s;
}

.healing-encounters-table tbody tr:hover {
  background: #f8fafc;
}

.healing-encounters-table td {
  padding: 12px 16px;
  color: #334155;
}

.target-name {
  font-weight: 600;
  color: #1e293b;
}

.hps-value {
  font-weight: 600;
  color: #64748b;
}

.hps-value.high-hps {
  color: #10b981;
}

.overheal-value.low-overheal {
  color: #10b981;
  font-weight: 600;
}

.overheal-value.high-overheal {
  color: #ef4444;
  font-weight: 600;
}

/* Overheal Analysis */
.overheal-by-type {
  margin-bottom: 24px;
}

.overheal-by-type h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.type-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.type-item {
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.type-label {
  font-weight: 600;
  color: #475569;
  text-transform: capitalize;
}

.type-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #64748b;
}

.type-value.low-overheal {
  color: #10b981;
}

.type-value.high-overheal {
  color: #ef4444;
}

.type-count {
  margin-left: auto;
  color: #94a3b8;
  font-size: 0.875rem;
}

.improvement-opportunities {
  margin-top: 24px;
}

.improvement-opportunities h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.opportunities-table {
  width: 100%;
  border-collapse: collapse;
}

.opportunities-table thead {
  background: #fef2f2;
}

.opportunities-table th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: #991b1b;
  font-size: 0.875rem;
}

.opportunities-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
}

/* Efficiency Metrics */
.efficiency-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

.efficiency-section h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.efficiency-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.efficiency-item {
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #e2e8f0;
  transition: all 0.2s;
}

.efficiency-item:hover {
  background: #f1f5f9;
  border-left-color: #10b981;
}

.efficiency-target {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.efficiency-stats {
  display: flex;
  gap: 12px;
  font-size: 0.875rem;
}

.efficiency-hps {
  color: #10b981;
  font-weight: 600;
}

.efficiency-overheal {
  font-weight: 600;
}

.efficiency-date {
  color: #94a3b8;
  margin-left: auto;
}

/* Section styling */
.healing-section {
  margin-bottom: 48px;
}

/* Utility classes for healing */
.low-overheal {
  color: #10b981;
}

.high-overheal {
  color: #ef4444;
}

/* ===================================================================
   Tanking Analytics Styles (Blue/Steel Theme for Tanks)
   =================================================================== */

/* Tab Navigation */
.tanking-tabs-container {
  margin-bottom: 32px;
}

.tanking-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
}

.tanking-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  bottom: -2px;
}

.tanking-tab:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.tanking-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.tanking-tab-content {
  position: relative;
}

.tanking-tab-pane {
  display: none;
}

.tanking-tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

/* Tanking Overview Card */
.tanking-overview-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.tanking-title {
  color: #f1f5f9;
  font-size: 1.75rem;
  margin: 0 0 24px 0;
  font-weight: 600;
}

.tanking-stats-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .tanking-stats-grid {
    grid-template-columns: 1fr;
  }
}

.tanking-stat-main {
  grid-column: span 1;
  text-align: center;
  padding: 24px;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  border: 2px solid rgba(59, 130, 246, 0.4);
}

.tanking-stat {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

/* Chart Cards */
.dtps-chart-card,
.tanking-breakdown-card,
.instance-performance-card,
.dtps-distribution-card,
.death-analysis-card,
.survivability-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.dtps-chart-card h3,
.tanking-breakdown-card h3,
.instance-performance-card h3,
.dtps-distribution-card h3,
.death-analysis-card h3,
.survivability-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.dtps-canvas,
.tanking-breakdown-card canvas,
.instance-performance-card canvas,
.dtps-distribution-card canvas {
  display: block;
  margin: 20px auto;
}

/* Tanking Encounters Table */
.tanking-table-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.tanking-table-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.tanking-table-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tanking-encounters-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tanking-encounters-table thead {
  background: #f8fafc;
}

.tanking-encounters-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.tanking-encounters-table th:hover {
  background: #f1f5f9;
}

.tanking-encounters-table th.sorted {
  background: #dbeafe;
  color: #3b82f6;
}

.tanking-encounters-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s;
}

.tanking-encounters-table tbody tr:hover {
  background: #f8fafc;
}

.tanking-encounters-table td {
  padding: 12px 16px;
  color: #334155;
}

.dtps-value {
  font-weight: 600;
  color: #64748b;
}

.dtps-value.high-dtps {
  color: #3b82f6;
}

.outcome {
  font-weight: 600;
}

.outcome.survived {
  color: #10b981;
}

.outcome.died {
  color: #ef4444;
}

/* Death Analysis */
.death-analysis-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.death-section h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.killer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.killer-item {
  padding: 12px;
  background: #fef2f2;
  border-radius: 8px;
  border-left: 4px solid #ef4444;
  display: flex;
  align-items: center;
  gap: 8px;
}

.killer-label {
  font-weight: 600;
  color: #991b1b;
  text-transform: capitalize;
}

.killer-count {
  margin-left: auto;
  color: #dc2626;
  font-weight: 700;
}

.hotspot-table,
.recent-deaths-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.hotspot-table thead,
.recent-deaths-table thead {
  background: #fef2f2;
}

.hotspot-table th,
.recent-deaths-table th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: #991b1b;
}

.hotspot-table td,
.recent-deaths-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.death-count-cell {
  color: #dc2626;
  font-weight: 700;
}

/* Survivability Metrics */
.survivability-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

.surv-section h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.surv-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.surv-item {
  padding: 12px;
  background: #f0fdf4;
  border-radius: 8px;
  border-left: 4px solid #10b981;
  transition: all 0.2s;
}

.surv-item.dangerous {
  background: #fef2f2;
  border-left-color: #ef4444;
}

.surv-item:hover {
  background: #dcfce7;
}

.surv-item.dangerous:hover {
  background: #fee2e2;
}

.surv-target {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.surv-stats {
  display: flex;
  gap: 12px;
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.surv-dtps {
  color: #3b82f6;
  font-weight: 600;
}

.surv-duration {
  color: #10b981;
  font-weight: 600;
}

.surv-duration.negative {
  color: #ef4444;
}

.surv-damage {
  color: #64748b;
}

.surv-zone {
  color: #94a3b8;
}

.surv-date {
  color: #94a3b8;
  margin-left: auto;
}

/* Section styling */
.tanking-section {
  margin-bottom: 48px;
}

/* Utility classes for tanking */
.high-dtps {
  color: #3b82f6;
}

/* ===================================================================
   Role Performance - Unified Multi-Role Analytics Styles
   =================================================================== */

/* Main Role Tabs (Top Level) */
.role-main-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  border-bottom: 3px solid #e2e8f0;
  padding-bottom: 0;
  flex-wrap: wrap;
}

.role-main-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  background: transparent;
  border: none;
  border-bottom: 4px solid transparent;
  font-size: 1.125rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  bottom: -3px;
}

.role-main-tab:hover {
  background: rgba(0, 0, 0, 0.02);
  color: #334155;
}

.role-main-tab.active {
  color: #1e293b;
  background: rgba(0, 0, 0, 0.02);
  border-bottom-color: #6366f1;
}

.role-main-tab .tab-icon {
  font-size: 1.5rem;
}

.role-main-tab .tab-label {
  font-size: 1rem;
}

/* Role Tab Panes */
.role-tab-panes {
  position: relative;
  min-height: 400px;
}

.role-pane {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.role-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* ===================================================================
   OVERVIEW TAB STYLES
   =================================================================== */

.role-overview-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 24px 0;
}

.primary-role-badge {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 1.125rem;
  margin: 0 auto 32px auto;
  text-align: center;
  display: block;
  width: fit-content;
}

.primary-role-badge.damage {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
  border: 2px solid #ef4444;
}

.primary-role-badge.tanking {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  border: 2px solid #3b82f6;
}

.primary-role-badge.healing {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border: 2px solid #10b981;
}

/* Role Stats Grid */
.role-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

@media (max-width: 1024px) {
  .role-stats-grid {
    grid-template-columns: 1fr;
  }
}

.role-stat-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.role-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.role-stat-card.damage {
  border-top: 4px solid #ef4444;
}

.role-stat-card.tanking {
  border-top: 4px solid #3b82f6;
}

.role-stat-card.healing {
  border-top: 4px solid #10b981;
}

.role-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f1f5f9;
}

.role-card-icon {
  font-size: 2rem;
}

.role-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.role-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.role-stat {
  text-align: center;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.role-stat-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 4px;
}

.role-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.role-stat-value.positive {
  color: #10b981;
}

.role-stat-value.negative {
  color: #ef4444;
}

.role-card-footer {
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

/* Role Distribution Chart */
.role-distribution-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 32px;
  text-align: center;
}

.role-distribution-card h3 {
  margin: 0 0 24px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.role-distribution-card canvas {
  display: block;
  margin: 0 auto 24px auto;
}

/* Pie Legend */
.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  font-weight: 600;
  color: #334155;
}

.legend-value {
  color: #64748b;
  font-size: 0.875rem;
}

/* Role Insights */
.role-insights {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.role-insights h3 {
  margin: 0 0 20px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.insight-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insight-list li {
  padding: 12px 16px;
  background: #f8fafc;
  border-left: 4px solid #6366f1;
  border-radius: 8px;
  color: #334155;
  line-height: 1.6;
}

.insight-list li strong {
  color: #1e293b;
  font-weight: 700;
}

.insight-list li strong.positive {
  color: #10b981;
}

.insight-list li strong.negative {
  color: #ef4444;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .role-main-tabs {
    gap: 8px;
  }

  .role-main-tab {
    padding: 12px 16px;
    font-size: 0.9375rem;
  }

  .role-main-tab .tab-icon {
    font-size: 1.25rem;
  }

  .role-main-tab .tab-label {
    font-size: 0.875rem;
  }

  .role-overview-title {
    font-size: 1.5rem;
  }

  .primary-role-badge {
    font-size: 1rem;
    padding: 10px 20px;
  }

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

/* ===========================================================================
   STYLE.CSS FIXES - Text Contrast and Visual Improvements
   ========================================================================== */

/* FIX #3: Enhanced Equipment Slot Backgrounds */
.equipment-slot.dark-bg {
  background: linear-gradient(135deg, #111314 0%, #3a4567 100%);
  padding: 8px;
  border-radius: 8px;
}

.equipment-slot.dark-bg .slot-ilvl {
  color: #e0e7ff !important;
  font-weight: 600;
}

/* FIX #1: Enhanced Quick Stats Styling */
.quick-stats-grid.enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.quick-stat.enhanced-stat {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.quick-stat.enhanced-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(36, 86, 165, 0.15);
  border-color: #3182ce;
}

.quick-stat.enhanced-stat .stat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.quick-stat.enhanced-stat .quick-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.quick-stat.enhanced-stat .quick-stat-label {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* FIX #2: Leveling Speed Vertical Bar Chart */
.leveling-speed-chart {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 180px;
  padding: 20px 10px 10px;
  background: linear-gradient(to bottom, #f7fafc 0%, #ffffff 100%);
  border-radius: 8px;
  margin: 16px 0;
}

.speed-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 60px;
}

.speed-bar-container {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.speed-bar {
  width: 70%;
  background: linear-gradient(to top, #3182ce 0%, #60a5fa 100%);
  border-radius: 4px 4px 0 0;
  transition: all 0.3s ease;
  box-shadow: 0 -2px 4px rgba(49, 130, 206, 0.3);
}

.speed-bar:hover {
  background: linear-gradient(to top, #2563eb 0%, #3b82f6 100%);
  box-shadow: 0 -4px 8px rgba(37, 99, 235, 0.4);
}

.speed-bar-label {
  margin-top: 8px;
  font-size: 0.75rem;
  color: #475569;
  font-weight: 600;
  text-align: center;
}

.speed-average {
  text-align: center;
  margin-top: 16px;
  padding: 12px;
  background: #eef4ff;
  border-radius: 6px;
  color: #334155;
  font-size: 0.95rem;
}

.speed-average strong {
  color: #2456a5;
  font-weight: 700;
}

/* FIX #7: Highlights List Icon Alignment */
.highlights-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
}

.highlights-list li {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e6eefb;
}

.highlights-list li:last-child {
  border-bottom: none;
}

.highlights-list .hl-icon {
  font-size: 1.5rem;
  margin-right: 12px;
  min-width: 32px;
  text-align: center;
}

.highlights-list .hl-label {
  color: #64748b;
  margin-right: 8px;
  flex: 1;
}

.highlights-list strong {
  color: #2456a5;
  font-weight: 700;
  margin-left: auto;
}

/* FIX #9, #11, #12, #19, #20: Text Contrast Improvements for Travel Log, Professions, Achievements, Progression, Quests */
.stat-value,
.travel-stat-card .stat-value,
.profession-stat-value,
.achievement-stat-value,
.progression-stat-value,
.quest-stat-value {
  color: #1e40af !important;
  /* Darker blue for better contrast */
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Ensure all stat labels have good contrast */
.stat-label,
.travel-stat-card .stat-label,
.profession-stat-label,
.achievement-stat-label,
.progression-stat-label,
.quest-stat-label {
  color: #475569 !important;
  font-weight: 600 !important;
}

/* Fix for zone percentages and counts in Travel Log */
.zone-percentage,
.zone-bar-count {
  color: #1e40af !important;
  font-weight: 700 !important;
}

/* Fix for any light text on light backgrounds */
.light-bg .text-stat,
.travel-stats-grid .stat-value,
.profession-card .stat-value,
.achievement-card .stat-value,
.progression-card .stat-value,
.quest-card .stat-value {
  color: #1e3a8a !important;
  font-weight: 700 !important;
}

/* Improve readability of all numbers in stats cards */
.stat-number,
.count-display,
.value-display {
  color: #1e40af;
  font-weight: 700;
  font-size: 1.1em;
}

/* Make sure sub-labels are also readable */
.stat-sublabel,
.count-sublabel {
  color: #64748b;
  font-weight: 500;
}

/* Override for Combat/Damage Overview - White text, no shadows */
.combat-overview-card .stat-value,
.combat-overview-card .stat-label {
  color: #ffffff !important;
  text-shadow: none !important;
}

/* Override for Tanking Overview - White text, no shadows */
.tanking-overview-card .stat-value,
.tanking-overview-card .stat-label {
  color: #ffffff !important;
  text-shadow: none !important;
}

/* Override for Healing Overview - White text, no shadows */
.healing-overview-card .stat-value,
.healing-overview-card .stat-label {
  color: #ffffff !important;
  text-shadow: none !important;
}

/* Make trend charts responsive */
.dps-canvas,
.hps-canvas,
.dtps-canvas {
  display: block;
  margin: 20px auto;
}

/* Dashboard Styles - Minimal Enhancement */

/* Quick Stats Grid with Icon Boxes */
.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.quick-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.quick-stat:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.quick-stat-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.quick-stat-content {
  flex: 1;
  min-width: 0;
}

.quick-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}

.quick-stat-label {
  font-size: 13px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Leveling Speed Bar Graph - Increased Size */
.level-speed-bars {
  margin-top: 8px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.level-speed-bar {
  display: grid;
  grid-template-columns: 60px 1fr 80px;
  gap: 12px;
  align-items: center;
}

.level-speed-label {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-align: right;
}

.level-speed-bar-track {
  height: 28px;
  background: transparent;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.level-speed-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1976d2, #42a5f5);
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  min-width: 2px;
}

.level-speed-time {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* Recent Milestones - Smaller, Scrollable */
.milestone-timeline {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Custom scrollbar styling */
.milestone-timeline::-webkit-scrollbar {
  width: 8px;
}

.milestone-timeline::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.milestone-timeline::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.milestone-timeline::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.milestone-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 6px;
  flex-shrink: 0;
}

.milestone-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFA000;
  border-radius: 8px;
}

.milestone-content {
  flex: 1;
  min-width: 0;
}

.milestone-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.milestone-desc {
  font-size: 12px;
  color: #666;
}

/* Highlight important milestones */
.milestone-important .milestone-icon {
  background: #E91E63;
}

/* ===================================================================
   Enhanced Mortality Section Styles
   Styles for confidence badges, death cards, killing blows, etc.
   =================================================================== */

/* 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;
}

.conf-none {
  background: #ef4444;
}

.confidence-score-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 1.1em;
  font-weight: 700;
  color: white;
}

.confidence-score-mini {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 600;
  color: white;
}

/* Confidence Distribution */
.confidence-bars {
  margin: 16px 0;
}

.confidence-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.confidence-bar-label {
  font-size: 0.9em;
  font-weight: 600;
  color: #475569;
  text-transform: capitalize;
}

.confidence-bar-container {
  background: #e2e8f0;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
}

.confidence-bar-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.confidence-bar-value {
  font-size: 0.9em;
  font-weight: 600;
  color: #1e293b;
  text-align: right;
}

.accuracy-summary {
  margin-top: 20px;
  padding: 16px;
  background: #f1f5f9;
  border-radius: 8px;
  text-align: center;
}

.accuracy-score {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 1.1em;
}

.accuracy-label {
  font-weight: 600;
  color: #475569;
}

.accuracy-value {
  font-size: 1.5em;
  font-weight: 700;
  color: #22c55e;
}

/* Detection Methods Table */
.detection-methods-table {
  width: 100%;
  border-collapse: collapse;
}

.detection-methods-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f1f5f9;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #cbd5e1;
}

.detection-methods-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.detection-methods-table tr:hover {
  background: #f8fafc;
}

/* Death Statistics Enhancements */
.death-stats-secondary {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9em;
}

.stat-label {
  color: #64748b;
  font-weight: 500;
}

.stat-value {
  font-weight: 700;
  color: #1e293b;
}

/* Lethal Spell Showcase */
.lethal-spell-showcase {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 12px;
  margin: 16px 0;
}

.spell-icon {
  font-size: 3em;
  margin-bottom: 8px;
}

.spell-name {
  font-size: 1.3em;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 12px;
}

.spell-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
}

.spell-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spell-stat-value {
  font-size: 1.5em;
  font-weight: 700;
  color: #92400e;
}

.spell-stat-label {
  font-size: 0.85em;
  color: #78350f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.additional-stats {
  margin-top: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}

/* Chart Legend */
.chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

/* Interesting Stats */
.interesting-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-item-large {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f1f5f9;
  border-radius: 8px;
}

.stat-icon {
  font-size: 2.5em;
}

.stat-content {
  flex: 1;
}

.stat-value-large {
  font-size: 1.8em;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.stat-label-large {
  font-size: 0.9em;
  color: #64748b;
  margin-top: 4px;
}

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

@media (max-width: 768px) {
  .deaths-grid {
    grid-template-columns: 1fr;
  }
}

/* Death Card */
.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;
}

/* Mortality Header */
.mortality-header {
  text-align: center;
  margin-bottom: 32px;
}

.mortality-header h1 {
  font-size: 2.5em;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.mortality-subtitle {
  font-size: 1.1em;
  color: #64748b;
}

/* Death Subtitle */
.death-subtitle {
  text-align: center;
  font-size: 1.2em;
  font-weight: 600;
  color: #3b82f6;
  margin-bottom: 20px;
}

/* Death Stats Grid */
.death-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 20px 0;
}

@media (max-width: 768px) {
  .death-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.death-stat-item {
  text-align: center;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.death-stat-value {
  font-size: 2em;
  font-weight: 700;
  color: #d32f2f;
  line-height: 1;
}

.death-stat-label {
  font-size: 0.85em;
  color: #64748b;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Arch Nemesis */
.arch-nemesis-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nemesis-main {
  text-align: center;
}

.nemesis-name {
  font-size: 1.8em;
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 4px;
}

.nemesis-subtitle {
  font-size: 0.9em;
  color: #64748b;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nemesis-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.nemesis-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

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

.danger-zone {
  padding: 16px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-radius: 8px;
  text-align: center;
}

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

.danger-zone-name {
  font-size: 1.3em;
  font-weight: 700;
  color: #7f1d1d;
  margin-bottom: 4px;
}

.danger-zone-deaths {
  font-size: 0.9em;
  color: #991b1b;
}

/* Boss Death Table */
.boss-death-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.boss-death-table th {
  text-align: left;
  padding: 12px;
  background: #f1f5f9;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #cbd5e1;
}

.boss-death-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.boss-death-table tr:hover {
  background: #f8fafc;
}

.boss-name {
  font-weight: 700;
  color: #1e293b;
}

/* Hardest Boss Card */
.hardest-boss-card {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 2px solid #fca5a5;
}

.hardest-boss-content {
  text-align: center;
}

.hardest-boss-name {
  font-size: 2em;
  font-weight: 700;
  color: #7f1d1d;
  margin-bottom: 12px;
}

.hardest-boss-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
}

.boss-stat-value {
  font-size: 3em;
  font-weight: 700;
  color: #dc2626;
  line-height: 1;
}

.boss-stat-label {
  font-size: 0.9em;
  color: #991b1b;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.boss-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #fca5a5;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
}

.timeline-label {
  font-weight: 600;
  color: #991b1b;
}

.timeline-value {
  color: #7f1d1d;
}

/* Muted text */
.muted {
  color: #94a3b8;
}

/* Dashboard utilities */
.dashboard-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

.dashboard-section {
  width: 100%;
}

.dash-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dash-card h3 {
  font-size: 1.2em;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .death-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .spell-stats {
    flex-direction: column;
    gap: 12px;
  }

  .confidence-bar-row {
    grid-template-columns: 100px 1fr 80px;
  }
}

/* ============================== Bazaar-Specific Styles ============================== */

/* Bazaar character selector option */
.charselect-item.bazaar-option {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-left: 3px solid #2456a5;
}

.charselect-item.bazaar-option:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.charselect-item.bazaar-option.active {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-left-color: #1e40af;
}

/* Stat cards */
.stat-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.stat-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
}

/* Gold pills */
.gold-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.gold-pill .char-name {
  font-weight: 600;
  color: #334155;
}

.gold-pill .gold-value {
  color: #f59e0b;
  font-weight: 700;
}

/* Quality badges */
.quality-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.quality-poor {
  background: #9d9d9d;
  color: white;
}

.quality-common {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
}

.quality-uncommon {
  background: #1eff00;
  color: #064e3b;
}

.quality-rare {
  background: #0070dd;
  color: white;
}

.quality-epic {
  background: #a335ee;
  color: white;
}

.quality-legendary {
  background: #ff8000;
  color: white;
}

/* Lockout cards */
.lockout-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
}

.lockout-instance {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: #1e293b;
}

.lockout-info {
  display: flex;
  gap: 8px;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.lockout-timer {
  font-size: 0.8rem;
  color: #f59e0b;
  font-weight: 600;
}

/* WhoDAT table styling (if not already in main styles) */
.whodat-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.whodat-table thead {
  background: #f8fafc;
}

.whodat-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
}

.whodat-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.whodat-table tbody tr:hover {
  background: #f8fafc;
}

.whodat-table tbody tr:last-child td {
  border-bottom: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .stat-card {
    padding: 12px;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .gold-pill {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .whodat-table {
    font-size: 0.8rem;
  }

  .whodat-table th,
  .whodat-table td {
    padding: 8px 12px;
  }
}

/* ============================================================================
   SOCIAL SECTION STYLES
   ============================================================================ */

/* Tab System */
.social-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.social-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.social-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.social-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

.social-tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

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

/* Hero Stats - The True Adventure */
.social-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.hero-stat-card {
  background: linear-gradient(135deg, #eef4ff 0%, #ffffff 100%);
  border: 2px solid #d4e3fc;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(36, 86, 165, 0.08);
  transition: all 0.3s;
}

.hero-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(36, 86, 165, 0.15);
}

.hero-stat-card.hero-primary {
  background: linear-gradient(135deg, #fff3cd 0%, #ffffff 100%);
  border-color: #ffc107;
}

.hero-stat-card.hero-secondary {
  background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
  border-color: #2196f3;
}

.hero-stat-card.hero-tertiary {
  background: linear-gradient(135deg, #f3e5f5 0%, #ffffff 100%);
  border-color: #9c27b0;
}

.hero-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.hero-value {
  font-size: 3rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.hero-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.hero-sublabel {
  font-size: 0.9rem;
  color: #6e7f9b;
}

/* Fun Facts Grid */
.social-fun-facts {
  margin-bottom: 40px;
}

.social-fun-facts h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
  text-align: center;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.fact-card {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: all 0.2s;
}

.fact-card:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.fact-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.fact-value {
  font-size: 2rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.fact-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.fact-subtitle {
  font-size: 0.85rem;
  color: #6e7f9b;
}

/* Charts */
.social-chart-section {
  margin-bottom: 40px;
}

.social-chart-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
  text-align: center;
}

.class-pie-chart {
  position: relative;
}

.chart-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  color: #2c3e50;
  font-weight: 500;
}

.legend-value {
  color: #6e7f9b;
  font-weight: 600;
}

/* Size Bar Chart */
.size-bar-chart {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
}

.size-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.size-bar-row:last-child {
  margin-bottom: 0;
}

.size-label {
  font-weight: 600;
  color: #2c3e50;
  text-align: right;
}

.size-bar-container {
  background: #f0f4f8;
  border-radius: 8px;
  height: 32px;
  position: relative;
}

.size-bar {
  background: linear-gradient(90deg, #3182ce 0%, #2456a5 100%);
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  min-width: 80px;
  transition: width 0.3s ease;
}

.size-count {
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Companions List */
.companions-section {
  margin-bottom: 40px;
}

.companions-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
}

.companions-list {
  display: grid;
  gap: 12px;
}

.companion-card {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 16px;
  align-items: center;
  transition: all 0.2s;
}

.companion-card:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.companion-rank {
  font-size: 1.5rem;
  font-weight: 700;
  color: #6e7f9b;
  text-align: center;
}

.companion-info {
  flex: 1;
}

.companion-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.companion-class {
  font-size: 0.9rem;
  color: #6e7f9b;
}

.companion-stats {
  text-align: right;
}

.companion-count {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2456a5;
}

.companion-label {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 4px;
}

.companion-last {
  font-size: 0.8rem;
  color: #999;
}

/* Instance Grid */
.instances-section {
  margin-bottom: 40px;
}

.instances-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
}

.instance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.instance-card {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s;
}

.instance-card:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
  transform: translateY(-2px);
}

.instance-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.instance-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
}

.difficulty-badge {
  display: inline-block;
  background: #ffc107;
  color: #000;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
}

.instance-stats {
  margin-top: 12px;
}

.instance-runs {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 4px;
}

.instance-detail {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 2px;
}

.instance-last {
  font-size: 0.8rem;
  color: #999;
}

/* Friends Section */
.friends-section {
  margin-bottom: 40px;
}

.friends-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
}

.friends-list {
  display: grid;
  gap: 12px;
}

.friend-card {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.friend-card:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.friend-info {
  flex: 1;
}

.friend-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.friend-details {
  font-size: 0.9rem;
  color: #6e7f9b;
}

.friend-time {
  font-size: 0.9rem;
  color: #999;
  text-align: right;
}

/* Activity Heatmap */
.heatmap-section {
  margin-bottom: 40px;
}

.heatmap-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
  text-align: center;
}

.hour-heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 8px;
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
}

.hour-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
}

.hour-cell:hover {
  transform: scale(1.1);
  z-index: 10;
}

.hour-label {
  font-size: 0.7rem;
  margin-bottom: 4px;
}

.hour-count {
  font-size: 1rem;
}

/* Day Chart */
.day-section {
  margin-bottom: 40px;
}

.day-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
  text-align: center;
}

.day-chart {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
}

.day-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.day-bar-row:last-child {
  margin-bottom: 0;
}

.day-label {
  font-weight: 600;
  color: #2c3e50;
  text-align: right;
}

.day-bar-container {
  background: #f0f4f8;
  border-radius: 8px;
  height: 36px;
  position: relative;
}

.day-bar {
  background: linear-gradient(90deg, #9c27b0 0%, #7b1fa2 100%);
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  min-width: 60px;
  transition: width 0.3s ease;
}

.day-count {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Timeline Feed */
.timeline-feed-section {
  margin-bottom: 40px;
}

.timeline-feed-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
}

.timeline-feed {
  display: grid;
  gap: 16px;
}

.timeline-item {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  transition: all 0.2s;
}

.timeline-item:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.timeline-icon {
  font-size: 1.5rem;
  text-align: center;
}

.timeline-content {
  flex: 1;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: #2c3e50;
  font-weight: 600;
}

.timeline-time {
  font-size: 0.85rem;
  color: #999;
  font-weight: 400;
}

.timeline-location {
  font-size: 0.9rem;
  color: #6e7f9b;
  margin-bottom: 8px;
}

.timeline-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #f0f4f8;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* Group Brackets Tab Styles */
.brackets-controls {
  background: linear-gradient(135deg, #eef4ff 0%, #f7fafc 100%);
  border: 1px solid #d4e3fc;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
}

.brackets-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.brackets-search-bar input[type="text"] {
  flex: 2;
  min-width: 250px;
  padding: 10px 16px;
  border: 1px solid #bcd0ee;
  border-radius: 8px;
  font-size: 1rem;
  background: #ffffff;
  margin: 0;
}

.brackets-search-bar input[type="date"] {
  flex: 1;
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid #bcd0ee;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #ffffff;
  margin: 0;
}

.brackets-search-bar button {
  padding: 10px 20px;
  font-size: 0.95rem;
  margin: 0;
}

.brackets-content {
  background: linear-gradient(135deg, #a8d0ff 0%, #86c5ff 100%);
  border-radius: 16px;
  padding: 30px;
  min-height: 400px;
}

.bracket-section {
  margin-bottom: 40px;
}

.bracket-section:last-child {
  margin-bottom: 0;
}

.bracket-section h3 {
  color: #ffffff;
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bracket-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tournament-bracket {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.bracket-main {
  background: #ffffff;
  color: #2456a5;
  border: 2px solid #2456a5;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  min-width: 200px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bracket-connector {
  width: 40px;
  height: 3px;
  background: #ffffff;
  position: relative;
}

.bracket-connector::after {
  content: '';
  position: absolute;
  right: -6px;
  top: -3px;
  width: 0;
  height: 0;
  border-left: 6px solid #ffffff;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.bracket-members {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1;
}

.bracket-member {
  background: #ffffff;
  color: #333333;
  border: 2px solid #2456a5;
  border-radius: 8px;
  padding: 12px;
  min-width: 160px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}

.member-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--class-color, #333333);
}

.member-role {
  font-size: 0.9rem;
  color: #666666;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.member-class-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #999999;
  border-radius: 0 0 6px 6px;
  font-size: 0.75rem;
  color: #ffffff;
  text-align: center;
  line-height: 4px;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.bracket-extra {
  background: #f0f0f0;
  border: 1px solid #cccccc;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.8rem;
  color: #666666;
  margin-top: 6px;
  text-align: center;
}

.bracket-time {
  color: #ffffff;
  font-size: 0.9rem;
  opacity: 0.8;
  text-align: center;
  min-width: 120px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.brackets-loading {
  text-align: center;
  padding: 60px 20px;
  color: #2456a5;
  font-size: 1.2rem;
}

.loading-spinner {
  animation: pulse 2s infinite;
}

.no-results {
  text-align: center;
  color: #ffffff;
  font-size: 1.1rem;
  padding: 40px;
  opacity: 0.8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .social-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .social-tab {
    padding: 10px 16px;
    font-size: 0.9rem;
    white-space: nowrap;
  }

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

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

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

  .companion-card {
    grid-template-columns: 40px 1fr;
    gap: 12px;
  }

  .companion-stats {
    grid-column: 2;
    text-align: left;
    margin-top: 8px;
  }

  .hour-heatmap {
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  }

  .size-bar-row,
  .day-bar-row {
    grid-template-columns: 100px 1fr;
    gap: 12px;
  }

  /* Group Brackets responsive */
  .brackets-search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .brackets-search-bar input[type="text"],
  .brackets-search-bar input[type="date"] {
    min-width: 100%;
    flex: none;
  }

  .tournament-bracket {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .bracket-connector {
    width: 3px;
    height: 20px;
    transform: rotate(90deg);
  }

  .bracket-connector::after {
    right: -3px;
    top: -6px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #ffffff;
    border-bottom: none;
  }

  .bracket-main {
    min-width: 100%;
    order: -1;
  }

  .bracket-members {
    justify-content: center;
  }

  .bracket-member {
    min-width: 140px;
  }

  .bracket-time {
    min-width: 100%;
    order: 1;
  }
}

/* ============================================
   GUILD HALL STYLING
   Single Guild Hall entry in character selector
   ============================================ */

/* Guild Hall specific styling */
.guild-hall-option .char-name {
  color: #654321;
  font-weight: 600;
}

.guild-hall-option .char-emoji {
  filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.6));
}

.guild-hall-option:hover .char-emoji {
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
}

/* Mortality Analysis - Scoped Styles */
#tab-mortality {
  /* All styles are scoped to the mortality tab */
}

/* ==== 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 AREAS ==== */
#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: end;
  height: 120px;
  padding: 1rem 0;
}

#tab-mortality .timeline-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

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

#tab-mortality .timeline-bar .bar-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

/* ==== DEATH CARDS ==== */
#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 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;
}

/* ==== UTILITY CLASSES ==== */
#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;
}

/* ==== RESPONSIVE DESIGN ==== */
@media (max-width: 768px) {
  #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;
  }
}

@media (max-width: 480px) {
  #tab-mortality .stats-grid {
    grid-template-columns: 1fr;
  }

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

  #tab-mortality .stat-value {
    font-size: 2rem;
  }
}
/* === GLOBAL STYLES === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #3a8dde 0%, #1e3c72 100%);
}

.container {
  width: 100%;
  max-width: 1440px;
  margin: 48px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(30, 60, 114, 0.12);
  padding: 40px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.tab-content {
  display: block;
  padding: 2px 12px;
  background: transparent;
  border-radius: 0 0 8px 8px;
  min-height: 24px;
  box-shadow: 0 2px 8px rgba(49, 130, 206, 0.04);
  margin-bottom: 1px;
  margin-top: 0;
  opacity: 1;
  transition: opacity 0.3s;
}

.tab-content.fade-out {
  opacity: 0;
  transition: opacity 0.2s;
}

.tab-content.fade-in {
  opacity: 1;
  transition: opacity 0.3s;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #2456a5;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 18px;
  border: 1px solid #bcd0ee;
  border-radius: 8px;
  font-size: 1.05rem;
  background: #f7fafc;
}

button,
.btn {
  background: linear-gradient(90deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(49, 130, 206, 0.08);
  margin-right: 8px;
  margin-bottom: 8px;
}

button:hover,
.btn:hover {
  background: linear-gradient(90deg, #2456a5 0%, #3182ce 100%);
  box-shadow: 0 4px 16px rgba(49, 130, 206, 0.16);
}

h1 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 32px;
  font-weight: 700;
  color: #2456a5;
}

h2,
h3 {
  color: #2456a5;
}

.muted {
  color: #6e7f9b;
  margin: 8px 0 0 0;
  font-size: 0.95em;
}

a {
  color: #2456a5;
  text-decoration: underline;
  cursor: pointer;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .container {
    width: 98vw;
    padding: 16px 4vw;
  }

  h1 {
    font-size: 1.3rem;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 14px 6px;
  }

  .tab {
    font-size: 0.95rem;
  }
}

/* --- NAV SECTION START --- */
.topbar {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.08);
  padding: 4px 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 10;
  min-height: 38px;
}

.searchbar-wrapper {
  position: relative;
  width: 75%;
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#sectionSearch {
  width: 100%;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid #bcd0ee;
  font-size: 1rem;
  font-family: 'Segoe UI', Arial, sans-serif;
  outline: none;
  background: #f7fafc;
  box-shadow: 0 1px 4px rgba(30, 60, 114, 0.06);
  margin: 0;
  transition: box-shadow 0.2s, border-color 0.2s;
}

#sectionSearch:focus {
  box-shadow: 0 3px 12px rgba(49, 130, 206, 0.15);
  border-color: #3182ce;
}

#sectionSearch::placeholder {
  color: #9ca3af;
}

.dropdown {
  position: absolute;
  top: 48px;
  left: 0;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(30, 60, 114, 0.18);
  border: 1px solid #e2e8f0;
  padding: 8px;
  max-height: 520px;
  overflow-y: auto;
  font-family: 'Segoe UI', Arial, sans-serif;
  z-index: 1000;
}

.dropdown .search-category {
  padding: 8px 12px 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6e7f9b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.dropdown .search-category:first-child {
  margin-top: 0;
}

.dropdown .section-item {
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 8px;
  color: #2456a5;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
}

.dropdown .section-item .item-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  line-height: 1;
}

.dropdown .section-item .item-content {
  flex: 1;
  min-width: 0;
}

.dropdown .section-item .item-title {
  font-weight: 600;
  color: #2456a5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown .section-item .item-description {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 400;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown .section-item:hover,
.dropdown .section-item.active {
  background: linear-gradient(90deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
}

.dropdown .section-item:hover .item-title,
.dropdown .section-item.active .item-title {
  color: #fff;
}

.dropdown .section-item:hover .item-description,
.dropdown .section-item.active .item-description {
  color: rgba(255, 255, 255, 0.85);
}

.dropdown .no-results {
  padding: 24px;
  text-align: center;
  color: #6e7f9b;
  font-size: 0.95rem;
}

.dropdown .search-loading {
  padding: 16px;
  text-align: center;
  color: #6e7f9b;
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .searchbar-wrapper {
    width: 70%;
  }
}

@media (max-width: 900px) {
  .searchbar-wrapper {
    width: 65%;
  }
}

@media (max-width: 600px) {
  .searchbar-wrapper {
    width: 90%;
  }

  .dropdown .section-item {
    padding: 10px 12px;
  }

  .dropdown .section-item .item-icon {
    font-size: 1.25rem;
    width: 28px;
    height: 28px;
  }
}

.hidden {
  display: none;
}

/* --- NAV SECTION END --- */

/* --- FADE TRANSITIONS --- */
.fade-out {
  opacity: 0 !important;
  transition: opacity 0.3s;
}

.fade-in {
  opacity: 1 !important;
  transition: opacity 0.3s;
}

/* === Character Select (top-left in topbar) === */
.charselect-wrapper {
  position: absolute;
  left: 12px;
  top: 6px;
  display: inline-block;
  z-index: 11;
  /* above topbar content */
}

.charselect-trigger {
  /* Text-only button (no visible box) */
  background: transparent;
  border: 0;
  padding: 4px 0;
  color: #2456a5;
  /* deep blue from your theme */
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  outline: none;
}

.charselect-trigger:focus-visible {
  outline: 2px solid #3182ce;
  border-radius: 6px;
}

.charselect-trigger:hover .charselect-label,
.charselect-trigger:hover .charselect-icon {
  text-decoration: underline;
}

.charselect-icon {
  font-size: 1.05rem;
  /* emoji size */
}

.charselect-caret {
  font-size: 0.9rem;
  color: #6e7f9b;
}

/* Dropdown (white card look, like your .dropdown) */
.charselect-menu {
  position: absolute;
  top: 28px;
  left: 0;
  min-width: 240px;
  max-width: 320px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(30, 60, 114, 0.12);
  border: 1px solid #bcd0ee;
  /* soft blue border to match cards */
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 6px;
  z-index: 100;
}

.charselect-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  color: #2456a5;
  transition: background 0.2s, color 0.2s;
  font-weight: 500;
  user-select: none;
}

.charselect-item:hover,
.charselect-item.active {
  background: linear-gradient(90deg, #2efff5 0%, #fff 100%);
  color: #fff;
}

.charselect-item .char-emoji {
  font-size: 1.1rem;
}

.charselect-item .char-name {
  font-size: 1.02rem;
  font-weight: 600;
}

.charselect-item .char-meta {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 400;
}

.hidden {
  display: none !important;
}

/* Responsive: keep menu usable on mobile */
@media (max-width: 600px) {
  .charselect-menu {
    min-width: 90vw;
    left: 0;
    right: 0;
    margin: 0 auto;
  }
}

/* === WhoDASH dashboard components === */
.dash-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid #bcd0ee;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  margin: 14px 0;
}

.dash-portrait {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e7eef8, #c8d9f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2456a5;
  font-weight: 700;
}

.dash-main {
  display: flex;
  flex-direction: column;
}

.dash-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2456a5;
}

.dash-meta {
  margin-top: 4px;
  color: #6e7f9b;
  font-size: 0.95rem;
}

.dash-gold {
  margin-top: 6px;
  font-weight: 600;
  color: #2456a5;
}

.dash-actions {
  text-align: right;
}

.dash-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2456a5;
  margin-top: 10px;
}

@media (max-width: 700px) {
  .dash-card {
    grid-template-columns: 100%;
  }

  .dash-actions {
    justify-self: end;
  }

  .dash-portrait {
    width: 100%;
    height: 160px;
  }
}

/* Coin badges */
.coin {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  margin-right: 6px;
}

.coin-gold {
  color: #9c6b00;
  background: #fff7e0;
  border: 1px solid #f1d38a;
}

.coin-silver {
  color: #5b6a7a;
  background: #eef2f7;
  border: 1px solid #cfd8e3;
}

.coin-copper {
  color: #7a3b1a;
  background: #f5e9e4;
  border: 1px solid #ddb7a4;
}

/* Tooltip for charts */
.whodat-tip {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  background: #111;
  color: #fff;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 12px;
  line-height: 1.25;
  transform: translate(-50%, -120%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  opacity: 0;
  transition: opacity .08s ease;
}

/* === Travel Log (fragment) === */
.segmented {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  background: #eef4ff;
  border-radius: 10px;
  border: 1px solid #d7e3fb;
}

.segmented-btn {
  padding: 8px 14px;
  border-radius: 8px;
  background: #f7fafc;
  color: #2456a5;
  border: 1px solid #cfe0fb;
  cursor: pointer;
}

.segmented-btn.is-active {
  background: #2456a5;
  color: #fff;
  border-color: #2456a5;
}

.panel.hidden {
  display: none;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card {
  background: #ffffff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 12px;
}

.card-title {
  margin: 0 0 8px 0;
  color: #2456a5;
  font-weight: 600;
}

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead th {
  text-align: left;
  background: #f0f5ff;
  color: #2456a5;
  font-weight: 600;
  padding: 8px;
  border-bottom: 1px solid #d7e3fb;
  cursor: pointer;
}

.table tbody td {
  padding: 8px;
  border-bottom: 1px solid #eef2f9;
}

.table.compact tbody td,
.table.compact thead th {
  padding: 6px;
}

.table.sticky thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.table thead th.sort-asc::after {
  content: " â–²";
  /* or "\25B2" */
}

.table thead th.sort-desc::after {
  content: " â–¼";
  /* or "\25BC" */
}

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

.bar-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: center;
  gap: 8px;
}

.bar-label {
  color: #334e88;
}

.bar {
  --w: 0%;
  position: relative;
  height: 22px;
  border-radius: 10px;
  background: linear-gradient(90deg, #cfe0fb var(--w), #eef4ff var(--w));
  border: 1px solid #d7e3fb;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  color: #2456a5;
  font-weight: 600;
}

/* Travel Log date range layout (optional) */
.date-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

.date-range input[type="datetime-local"] {
  padding: 6px 10px;
  border: 1px solid #bcd0ee;
  border-radius: 8px;
  background: #f7fafc;
  color: #2456a5;
}

/* Icon placeholder cell */
.cell-icon {
  width: 28px;
}

.icon-placeholder {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #eef4ff;
  border: 1px solid #d7e3fb;
}

/* Quality badge pills (Q0ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â€šÂ¬Ã…â€œQ5 typical) */
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid transparent;
}

.pill.q-0 {
  color: #666;
  background: #f2f2f2;
  border-color: #ddd;
}

/* Poor */
.pill.q-1 {
  color: #2456a5;
  background: #eef4ff;
  border-color: #cfe0fb;
}

/* Common */
.pill.q-2 {
  color: #0a7a34;
  background: #e6f6ea;
  border-color: #bfe8ca;
}

/* Uncommon (green) */
.pill.q-3 {
  color: #3a2b96;
  background: #eceaff;
  border-color: #cfc9ff;
}

/* Rare (blue/purple mix) */
.pill.q-4 {
  color: #9c6b00;
  background: #fff7e0;
  border-color: #f1d38a;
}

/* Epic-ish */
.pill.q-5 {
  color: #7a3b1a;
  background: #f5e9e4;
  border-color: #ddb7a4;
}

.q-badge {
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.6;
  display: inline-block;
}

.q-poor {
  background: #6b6b6b;
  color: #fff;
}

.q-common {
  background: #dfe7df;
  color: #2e5b2e;
}

.q-uncommon {
  background: #1eff00;
  color: #033600;
}

.q-rare {
  background: #0070dd;
  color: #fff;
}

.q-epic {
  background: #a335ee;
  color: #fff;
}

.q-legendary {
  background: #ff8000;
  color: #231300;
}

.vault-bars-row {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.vault-bar-block {
  flex: 1 1 0;
  min-width: 220px;
}

.vault-bar-block h4 {
  margin-top: 250;
  margin-bottom: 8px;
}

/* === Achievements (minimal additions) === */

/* Canvas container */
.chart-canvas {
  width: 100%;
  /* height is set via the canvas attribute and scaled by JS DPR */
  display: block;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(30, 60, 114, 0.06);
  margin-bottom: 8px;
}

/* KPI chips (color tokens consistent with theme) */
.chip {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.chip-blue {
  background: #2456a5;
}

.chip-gray {
  background: #6e7f9b;
}

.chip-gold {
  background: #f1d38a;
}

.mini-kpi {
  color: #2456a5;
  font-weight: 600;
  margin: 4px 0;
}

/* Latest 5 list */
.ach-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.ach-item {
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
}

.ach-item .ach-name {
  font-weight: 700;
  color: #2456a5;
}

.ach-item .ach-meta {
  margin-top: 4px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.ach-item .ach-desc {
  margin-top: 6px;
  color: #334e88;
}

/* Reputation vertical column */
.rep-vbar {
  width: 100%;
  height: 0%;
  border-radius: 6px;
  transition: height 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Rainbow-ready reputation styling */
.rep-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}

.rep-name {
  flex: 0 0 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #222;
}

.rep-value {
  flex: 0 0 auto;
  min-width: 64px;
  text-align: right;
  color: #7a7a7a;
  font-variant-numeric: tabular-nums;
}

.rep-bar {
  flex: 1 1 auto;
  height: 16px;
  background: #101314;
  border-radius: 999px;
  overflow: hidden;
}

.rep-fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
}

/* container only */
.rep-fill-inner {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  will-change: width;
}

/* ============================================================================
   DASHBOARD SUMMARY STYLES
   ============================================================================ */

/* Dashboard Sections */
.dashboard-section {
  margin-bottom: 24px;
}

.dashboard-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dashboard-row-three {
  grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 1200px) {
  .dashboard-row-three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   TIPS CARD
   ============================================================================ */
.tips-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.tips-card h3 {
  margin: 0 0 12px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.tips-subtitle {
  color: #6e7f9b;
  font-size: 0.9rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e6eefb;
}

.tips-section-title {
  margin: 16px 0 10px 0;
  color: #2456a5;
  font-size: 0.95rem;
  font-weight: 600;
}

.tips-zones-list,
.tips-notes-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}

.tips-zones-list li {
  padding: 6px 12px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #eef4ff 0%, #f7fafc 100%);
  border-left: 3px solid #3182ce;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #2c5282;
}

.tips-notes-list li {
  padding: 8px 0 8px 20px;
  margin-bottom: 8px;
  position: relative;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #4a5568;
}

.tips-notes-list li:before {
  content: "✱";
  /* or "\2022" for Unicode escape */
  position: absolute;
  left: 6px;
  color: #3182ce;
  font-weight: bold;
}

.tips-card .muted {
  color: #9ca3af;
  font-style: italic;
  text-align: center;
  padding: 20px;
}


/* ============================================================================
   HERO STATS GRID
   ============================================================================ */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.hero-stat {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(30, 60, 114, 0.12);
}

.hero-stat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.hero-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.hero-stat-label {
  font-size: 0.95rem;
  color: #6e7f9b;
  font-weight: 500;
  margin-bottom: 4px;
}

.hero-stat-tier {
  font-size: 0.85rem;
  color: #3182ce;
  font-weight: 600;
  margin-top: 6px;
}

.hero-stat-subtitle {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-top: 4px;
}

/* ============================================================================
   HIGHLIGHTS CARD
   ============================================================================ */
.highlights-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.highlights-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.highlights-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.highlights-list li {
  padding: 14px 0;
  /* Changed from 10px to 14px */
  border-bottom: 1px solid #eef4ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Extended highlights list with more spacing */
.highlights-list-extended li {
  padding: 16px 0;
}

.highlights-list li:last-child {
  border-bottom: none;
}

.hl-icon {
  font-size: 1.1rem;
  margin-right: 8px;
  display: inline-block;
  min-width: 24px;
}

.hl-label {
  color: #6e7f9b;
  font-weight: 500;
}

.highlights-list strong {
  color: #2456a5;
  font-weight: 700;
}

/* ============================================================================
   ACTIVITY HEATMAP
   ============================================================================ */
.activity-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.activity-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.activity-heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16px, 1fr));
  /* Changed from 12px */
  gap: 5px;
  /* Changed from 3px */
  max-width: 100%;
}

.heatmap-cell {
  width: 16px;
  /* Changed from 12px */
  height: 16px;
  /* Changed from 12px */
  border-radius: 3px;
  /* Changed from 2px */
  background: #eef4ff;
  border: 1px solid #d7e3fb;
  transition: all 0.2s;
}

.heatmap-cell[data-intensity="0"] {
  background: #eef4ff;
  border-color: #d7e3fb;
}

.heatmap-cell[data-intensity="1"] {
  background: #c8d9f1;
  border-color: #b8c9e1;
}

.heatmap-cell[data-intensity="2"] {
  background: #9ab8e5;
  border-color: #8aa8d5;
}

.heatmap-cell[data-intensity="3"] {
  background: #5a92d6;
  border-color: #4a82c6;
}

.heatmap-cell[data-intensity="4"] {
  background: #3182ce;
  border-color: #2456a5;
}

.heatmap-cell:hover {
  transform: scale(1.4);
  /* Changed from 1.3 */
  z-index: 10;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  /* Enhanced shadow */
}

/* ============================================================================
   TOP LOOT WIDGET
   ============================================================================ */
.top-loot-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.top-loot-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.top-loot-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-loot-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.top-loot-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.loot-rank {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(49, 130, 206, 0.2);
}

.loot-name {
  color: #334e88;
  font-weight: 600;
  font-size: 0.95rem;
}

.loot-count {
  color: #2456a5;
  font-weight: 700;
  font-size: 1rem;
  background: #eef4ff;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #d7e3fb;
}

/* ============================================================================
   SPARKLINE CHART
   ============================================================================ */
.sparkline-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.sparkline-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.sparkline-canvas {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  background: #f7fafc;
}

.sparkline-info {
  margin-top: 12px;
  padding: 12px;
  background: #eef4ff;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #334e88;
  font-weight: 500;
  text-align: center;
}

.sparkline-tooltip {
  position: absolute;
  display: none;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   ACTIVITY FEED
   ============================================================================ */
.activity-feed-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 600px;
  overflow-y: auto;
}

.activity-feed-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 12px;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.activity-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.activity-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #d7e3fb;
}

.activity-icon-img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid #d7e3fb;
  display: block;
  background: #fff;
}

.activity-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.activity-desc {
  color: #334e88;
  font-size: 0.95rem;
  line-height: 1.4;
}

.activity-desc strong {
  color: #2456a5;
  font-weight: 600;
}

.activity-time {
  color: #6e7f9b;
  font-size: 0.85rem;
}

/* ============================================================================
   REPUTATION LIST (Animated)
   ============================================================================ */
.reputation-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 600px;
  overflow-y: auto;
}

.reputation-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.rep-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f7fafc;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #334e88;
}

.rep-legend .chip {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.rep-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rep-row {
  display: grid;
  grid-template-columns: 150px 1fr 80px;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}

.rep-name {
  color: #2456a5;
  font-weight: 600;
  font-size: 0.95rem;
}

.rep-bar {
  position: relative;
  height: 22px;
  background: #eef4ff;
  border-radius: 11px;
  border: 1px solid #d7e3fb;
  overflow: hidden;
}

.rep-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 11px;
  transition: width 0.5s ease-out;
}

.rep-value {
  text-align: right;
  color: #334e88;
  font-weight: 600;
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .rep-row {
    grid-template-columns: 100%;
    gap: 6px;
  }

  .rep-value {
    text-align: left;
    font-size: 0.85rem;
  }
}

/* ============================================================================
   COIN DISPLAY (from original)
   ============================================================================ */
.coin {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  margin-right: 4px;
  font-size: 0.9rem;
}

.coin-gold {
  color: #9c6b00;
  background: #fff7e0;
  border: 1px solid #f1d38a;
}

.coin-silver {
  color: #5b6a7a;
  background: #eef2f7;
  border: 1px solid #cfd8e3;
}

.coin-copper {
  color: #7a3b1a;
  background: #f5e9e4;
  border: 1px solid #ddb7a4;
}

/* ============================================================================
   UTILITIES
   ============================================================================ */
.muted {
  color: #6e7f9b;
  font-size: 0.95rem;
  font-style: italic;
}

/* ============================================================================
   CHARACTER DASHBOARD STYLES
   ============================================================================ */

/* Character Profile Card */
.char-profile-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.char-header {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e6eefb;
}

.char-avatar {
  flex-shrink: 0;
}

.char-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.char-info {
  flex: 1;
}

.char-name {
  margin: 0 0 8px 0;
  font-size: 2rem;
  font-weight: 700;
  color: #2456a5;
}

.char-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.char-identity {
  font-size: 1rem;
  color: #334e88;
  font-weight: 500;
  line-height: 1.5;
}

.char-level,
.char-class,
.char-race {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.char-level {
  background: #eef4ff;
  color: #2456a5;
  border: 1px solid #d7e3fb;
}

.char-class {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.char-race {
  background: #f5f3ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.char-guild {
  color: #6e7f9b;
  font-size: 0.95rem;
  font-weight: 500;
}

.char-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.char-stat-item {
  text-align: center;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e6eefb;
}

.stat-label {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

/* Stats Dashboard */
.stats-dashboard-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.stats-dashboard-card h3 {
  margin: 0 0 20px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-bar-item {
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border: 1px solid #e6eefb;
}

.stat-bar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.stat-icon {
  font-size: 1.3rem;
}

.stat-name {
  flex: 1;
  font-weight: 600;
  color: #334e88;
  font-size: 0.95rem;
}

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

.stat-bar {
  height: 8px;
  background: #e6eefb;
  border-radius: 4px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, #3182ce 0%, #2456a5 100%);
  transition: width 0.5s ease-out;
  border-radius: 4px;
}

/* Progression Card */
.progression-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.progression-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.progression-canvas {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  background: #f7fafc;
}

.progression-info {
  margin-top: 12px;
  padding: 12px;
  background: #eef4ff;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #334e88;
  text-align: center;
}

/* Leveling Speed Card */
.speed-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.speed-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.speed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.speed-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.speed-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.speed-level {
  font-weight: 700;
  color: #2456a5;
  font-size: 0.95rem;
}

.speed-time {
  color: #334e88;
  font-weight: 500;
  font-size: 0.9rem;
}

.speed-rate {
  background: #eef4ff;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  color: #2456a5;
  font-size: 0.85rem;
  border: 1px solid #d7e3fb;
}

.speed-average {
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #eef4ff 0%, #d7e3fb 100%);
  border-radius: 10px;
  text-align: center;
  color: #334e88;
  font-size: 1rem;
  border: 1px solid #d7e3fb;
}

.speed-average strong {
  color: #2456a5;
  font-size: 1.1rem;
}

/* Milestones Card */
.milestones-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.milestones-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.milestone-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.milestone-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  padding: 14px;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.milestone-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.milestone-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #3182ce 0%, #2456a5 100%);
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(49, 130, 206, 0.2);
}

.milestone-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.milestone-title {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
}

.milestone-desc {
  color: #6e7f9b;
  font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .char-header {
    flex-direction: column;
    text-align: center;
  }

  .char-meta {
    justify-content: center;
  }

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

/* ============================================================================
   CURRENCIES / ECONOMY STYLES
   ============================================================================ */
/* Enhanced Auction Analytics Styles */

/* Analytics Grid Layout */
.analytics-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

.analytics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.analytics-row.full-width {
  grid-template-columns: 1fr;
}

.auction-analytics-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.auction-analytics-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auction-analytics-card h4 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 500;
  color: #475569;
}

/* Sell-Through by Duration */
.sell-through-chart {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.duration-bar-item {
  display: grid;
  grid-template-columns: 60px 1fr 140px;
  gap: 12px;
  align-items: center;
}

.duration-label {
  font-weight: 600;
  color: #334155;
  text-align: right;
}

.duration-bar-bg {
  height: 32px;
  background: #f1f5f9;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.duration-bar-fill {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  transition: width 0.3s ease;
  border-radius: 6px;
}

.duration-bar-text {
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.duration-stats {
  font-size: 0.85rem;
  color: #64748b;
  text-align: right;
}

/* Market Seasonality Heatmaps */
.seasonality-container {
  display: flex;
  gap: 32px;
}

.seasonality-section {
  flex: 1;
}

.day-heatmap,
.hour-heatmap {
  display: grid;
  gap: 8px;
}

.day-heatmap {
  grid-template-columns: repeat(7, 1fr);
}

.hour-heatmap {
  grid-template-columns: repeat(3, 1fr);
}

.heat-cell {
  padding: 16px 12px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s;
}

.heat-cell:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.heat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.heat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

/* Scatter Plot */
.scatter-plot-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scatter-canvas {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.scatter-legend {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #475569;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* Price History Charts */
.price-history-charts {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.price-history-item {
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.price-history-item h4 {
  color: #1e293b;
  font-size: 1rem;
  font-weight: 600;
}

.price-history-item canvas {
  margin-top: 12px;
  display: block;
}

/* Undercut Ladder */
.undercut-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.undercut-item {
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.undercut-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

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

.position-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.position-badge.competitive {
  background: #dcfce7;
  color: #166534;
}

.position-badge.overpriced {
  background: #fef3c7;
  color: #92400e;
}

.undercut-pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-label {
  font-size: 0.85rem;
  color: #64748b;
}

.price-value {
  font-weight: 600;
  color: #1e293b;
}

.undercut-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.undercut-option {
  background: white;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.undercut-option span {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 4px;
}

.undercut-option strong {
  display: block;
  color: #1e293b;
  font-size: 0.9rem;
}

/* Profit Calculator */
.profit-calculator .calculator-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calc-input-group {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  align-items: center;
}

.calc-input-group label {
  font-size: 0.9rem;
  color: #475569;
  font-weight: 500;
}

.calc-input-group input,
.calc-input-group select {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
}

.calc-input-group input:focus,
.calc-input-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.calc-results {
  margin-top: 8px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.calc-result-row:not(:last-child) {
  border-bottom: 1px solid #e2e8f0;
}

.calc-result-row span {
  font-size: 0.9rem;
  color: #64748b;
}

.calc-result-row strong {
  font-size: 1rem;
  font-weight: 600;
}

.calc-total {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 2px solid #cbd5e1 !important;
}

.calc-total span {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

.calc-total strong {
  font-size: 1.25rem;
}

.profit-value.positive {
  color: #16a34a;
}

.profit-value.negative {
  color: #dc2626;
}

/* Performance Table */
.performance-table-container {
  overflow-x: auto;
}

.performance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.performance-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.performance-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.performance-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.performance-table tbody tr:hover {
  background: #f8fafc;
}

.performance-table .item-name {
  font-weight: 600;
  color: #1e293b;
}

.performance-table .success-rate {
  font-weight: 600;
}

.performance-table .success-rate.excellent {
  color: #16a34a;
}

.performance-table .success-rate.good {
  color: #f59e0b;
}

.performance-table .success-rate.poor {
  color: #dc2626;
}

/* Competitor Analysis */
.competitor-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.competitor-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.competitor-rank {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  font-weight: 700;
  border-radius: 8px;
  font-size: 1rem;
}

.competitor-info {
  flex: 1;
}

.competitor-name {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.competitor-stats {
  font-size: 0.85rem;
  color: #64748b;
}

/* Repost Tracker */
.repost-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.repost-item {
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.repost-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.repost-name {
  font-weight: 600;
  color: #1e293b;
}

.repost-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.repost-badge.sold {
  background: #dcfce7;
  color: #166534;
}

.repost-badge.expired {
  background: #fee2e2;
  color: #991b1b;
}

.repost-stats {
  font-size: 0.85rem;
  color: #64748b;
}

/* Utility Classes */
.positive {
  color: #16a34a;
}

.negative {
  color: #dc2626;
}

.muted {
  color: #94a3b8;
  font-style: italic;
}

/* Existing styles compatibility */
.coin {
  font-weight: 600;
  white-space: nowrap;
}

.coin-gold {
  color: #f59e0b;
}

.coin-silver {
  color: #94a3b8;
}

.coin-copper {
  color: #a16207;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .analytics-row {
    grid-template-columns: 1fr;
  }

  .seasonality-container {
    flex-direction: column;
  }

  .undercut-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .auction-analytics-card {
    padding: 16px;
  }

  .duration-bar-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .duration-label {
    text-align: left;
  }

  .duration-stats {
    text-align: left;
  }

  .calc-input-group {
    grid-template-columns: 1fr;
  }

  .undercut-pricing {
    grid-template-columns: 1fr;
  }

  .performance-table {
    font-size: 0.8rem;
  }

  .performance-table th,
  .performance-table td {
    padding: 8px;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.auction-analytics-card {
  animation: fadeIn 0.3s ease-out;
}

.analytics-row:nth-child(1) .auction-analytics-card {
  animation-delay: 0.05s;
}

.analytics-row:nth-child(2) .auction-analytics-card {
  animation-delay: 0.1s;
}

.analytics-row:nth-child(3) .auction-analytics-card {
  animation-delay: 0.15s;
}

.analytics-row:nth-child(4) .auction-analytics-card {
  animation-delay: 0.2s;
}

.analytics-row:nth-child(5) .auction-analytics-card {
  animation-delay: 0.25s;
}

/* Loading state */
.auction-analytics-card.loading {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

/* Empty state */
.auction-analytics-card .muted {
  text-align: center;
  padding: 40px 20px;
  font-size: 0.9rem;
}

/* ===== G/S/C Input Styles ===== */
.gsc-input {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gsc-input input[type="number"] {
  width: 60px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.95rem;
}

.gsc-input .coin-label {
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 15px;
}

.coin-label.coin-gold {
  color: #f59e0b;
}

.coin-label.coin-silver {
  color: #9ca3af;
}

.coin-label.coin-copper {
  color: #b45309;
}

/* ===== Price History Legend ===== */
.price-legend {
  display: flex;
  gap: 16px;
  margin: 12px 0;
  padding: 8px;
  background: #f9fafb;
  border-radius: 4px;
  font-size: 0.85rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* ===== Enhanced Competitor Analysis ===== */
.competitor-analysis-card .competitor-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fafafa;
}

.competitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.competitor-card {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.competitor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
}

.competitor-rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.competitor-name-lg {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
  padding-right: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.competitor-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.competitor-stat {
  text-align: center;
}

.competitor-stat .stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #059669;
  margin-bottom: 2px;
}

.competitor-stat .stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.competitor-items-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.competitor-item-mini {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: white;
  border-radius: 6px;
  font-size: 0.85rem;
  border: 1px solid #f3f4f6;
}

.item-name-mini {
  color: #374151;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 8px;
}

.item-price-mini {
  color: #059669;
  font-weight: 600;
  white-space: nowrap;
}

.competitor-more-mini {
  color: #6b7280;
  font-size: 0.8rem;
  font-style: italic;
  text-align: center;
  padding: 4px 8px;
}

.competitor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.competitor-summary {
  color: #6b7280;
  font-size: 0.85rem;
  margin-left: auto;
}

.competitor-items {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.competitor-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: white;
  border-radius: 4px;
  font-size: 0.9rem;
}

.competitor-item-row .item-name {
  color: #374151;
  font-weight: 500;
}

.competitor-item-row .item-price {
  color: #059669;
  font-weight: 600;
}

.competitor-more {
  color: #6b7280;
  font-size: 0.85rem;
  font-style: italic;
  padding: 4px 8px;
  text-align: center;
}

/* ===== Responsive Updates ===== */
@media (max-width: 640px) {
  .gsc-input {
    flex-direction: column;
    align-items: stretch;
  }

  .gsc-input input[type="number"] {
    width: 100%;
  }

  .price-legend {
    flex-direction: column;
    gap: 8px;
  }

  .competitor-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .competitor-summary {
    margin-left: 0;
  }

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

/* ===== Auction History Table ===== */
.auction-history-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auction-history-card h2 {
  margin: 0 0 20px 0;
  color: #1e3a8a;
  font-size: 1.5rem;
}

.history-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

.history-search {
  flex: 1;
  min-width: 250px;
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.history-search:focus {
  outline: none;
  border-color: #3b82f6;
}

.history-stats {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
}

.history-stats span {
  color: #6b7280;
}

.history-stats strong {
  color: #111827;
  font-weight: 600;
}

.table-container {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 20px;
}

.auction-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.auction-history-table thead {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
}

.auction-history-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  position: relative;
  white-space: nowrap;
}

.auction-history-table th:hover {
  background: rgba(255, 255, 255, 0.1);
}

.auction-history-table th.sorted {
  background: rgba(255, 255, 255, 0.15);
}

.sort-arrow {
  margin-left: 4px;
  font-size: 0.8em;
  opacity: 0.7;
}

.auction-history-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s;
}

.auction-history-table tbody tr:hover {
  background-color: #f9fafb;
}

.auction-history-table tbody tr:last-child {
  border-bottom: none;
}

.auction-history-table td {
  padding: 12px 16px;
  color: #374151;
}

.item-name-cell {
  font-weight: 500;
  color: #1e3a8a;
}

.auction-history-table td.center {
  text-align: center;
}

.history-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.page-btn {
  padding: 8px 16px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.page-btn:hover:not(:disabled) {
  background: #2563eb;
}

.page-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

#pageInfo {
  color: #6b7280;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .history-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .history-search {
    min-width: 100%;
  }

  .history-stats {
    flex-direction: column;
    gap: 8px;
  }

  .auction-history-table {
    font-size: 0.8rem;
  }

  .auction-history-table th,
  .auction-history-table td {
    padding: 8px 12px;
  }
}

/* ===== Profit/Loss Display with Arrows ===== */
.profit-gain {
  color: #059669;
  font-weight: 600;
}

.profit-loss {
  color: #dc2626;
  font-weight: 600;
}

.profit-gain::before,
.profit-loss::before {
  font-weight: 700;
  margin-right: 2px;
}

/* Tab Navigation */
.currency-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.currency-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.currency-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.currency-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

/* Financial Health Card */
.finance-health-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.finance-title {
  margin: 0 0 24px 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #2456a5;
}

.finance-stats-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 20px;
}

.finance-stat-main {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff !important;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.finance-stat-main .stat-label {
  font-size: 1.3rem;
  color: #fff !important;
  opacity: 0.95;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value-huge {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff !important;
}

/* Make coins more readable on green background */
.stat-value-huge .coin-gold {
  color: #fef3c7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.stat-value-huge .coin-silver {
  color: #f3f4f6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.stat-value-huge .coin-copper {
  color: #fed7aa;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.finance-stat {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  text-align: center;
}

.finance-stat .stat-label {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.finance-stat .stat-value {
  font-size: 1.3rem;
  font-weight: 700;
}

.stat-value.positive {
  color: #10b981;
}

.stat-value.negative {
  color: #ef4444;
}

/* Coin Styles */
.coin {
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
  margin: 0 2px;
}

.coin-gold {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
}

.coin-silver {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #9ca3af;
}

.coin-copper {
  background: #fed7aa;
  color: #7c2d12;
  border: 1px solid #f97316;
}

/* Prevent coin wrapping in stat displays */
.stat-value-huge,
.stat-value,
.gph-value,
.calc-text {
  white-space: nowrap;
}

/* Override for green background - white coins with subtle backgrounds */
.stat-value-huge .coin-gold {
  background: rgba(254, 243, 199, 0.25);
  color: #fef3c7;
  border: 1px solid rgba(251, 191, 36, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.stat-value-huge .coin-silver {
  background: rgba(243, 244, 246, 0.25);
  color: #f3f4f6;
  border: 1px solid rgba(156, 163, 175, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.stat-value-huge .coin-copper {
  background: rgba(254, 215, 170, 0.25);
  color: #fed7aa;
  border: 1px solid rgba(249, 115, 22, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Net Worth Chart */
.networth-chart-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.networth-chart-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.networth-canvas {
  width: 100%;
  height: 300px;
  /* Increased from 200px for full-width display */
  border-radius: 8px;
  background: #f7fafc;
}

/* Gold Per Hour Table */
.gph-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 800px;
  /* Increased from 500px for full-width display with 20 rows */
  overflow-y: auto;
}

.gph-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.gph-table {
  width: 100%;
  border-collapse: collapse;
}

.gph-table thead {
  background: #f7fafc;
  position: sticky;
  top: 50px;
  z-index: 1;
}

.gph-table th {
  text-align: left;
  padding: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6e7f9b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e6eefb;
}

.gph-table td {
  padding: 12px;
  border-bottom: 1px solid #f0f4f8;
  color: #334e88;
  font-size: 0.95rem;
}

.gph-table tbody tr:hover {
  background: #f7fafc;
}

.gph-value {
  font-weight: 700;
  color: #10b981;
}

.gph-average {
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #eef4ff 0%, #d7e3fb 100%);
  border-radius: 10px;
  text-align: center;
  color: #334e88;
  font-size: 1rem;
  border: 1px solid #d7e3fb;
}

.gph-average strong {
  color: #10b981;
  font-size: 1.1rem;
}

/* Milestones */
.milestones-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.milestones-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.milestone-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.milestone-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  padding: 14px;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.milestone-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.milestone-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(251, 191, 36, 0.3);
}

.milestone-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.milestone-title {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
}

.milestone-desc {
  color: #6e7f9b;
  font-size: 0.85rem;
}

/* Epic Flying Calculator */
.epic-flying-calc {
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
  border-radius: 12px;
  border: 2px solid #fb923c;
}

.calc-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #c2410c;
  margin-bottom: 12px;
  text-align: center;
}

.calc-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-bar {
  height: 24px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #fb923c;
}

.calc-fill {
  height: 100%;
  background: linear-gradient(90deg, #fb923c 0%, #f97316 100%);
  transition: width 0.5s ease-out;
}

.calc-text {
  text-align: center;
  font-weight: 600;
  color: #c2410c;
  font-size: 0.95rem;
}

/* Recent Loot */
.recent-loot-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.recent-loot-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.loot-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.loot-item {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border-radius: 10px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.loot-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.loot-name {
  font-weight: 600;
  font-size: 0.95rem;
}

/* WoW Item Quality Colors */
.quality-poor {
  color: #9d9d9d;
}

.quality-common {
  color: #334e88;
}

.quality-uncommon {
  color: #1eff00;
  font-weight: 700;
}

.quality-rare {
  color: #0070dd;
  font-weight: 700;
}

.quality-epic {
  color: #a335ee;
  font-weight: 700;
}

.quality-legendary {
  color: #ff8000;
  font-weight: 700;
}

.loot-source {
  color: #6e7f9b;
  font-size: 0.85rem;
}

.loot-time {
  color: #6e7f9b;
  font-size: 0.85rem;
  font-style: italic;
}

/* Responsive */
@media (max-width: 1200px) {
  .finance-stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .gph-table {
    font-size: 0.85rem;
  }

  .gph-table th,
  .gph-table td {
    padding: 8px;
  }
}

/* ============================================================================
   AUCTION HOUSE STYLES
   ============================================================================ */

/* Auction Performance Card */
.auction-performance-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.auction-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.auction-stat {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  text-align: center;
}

/* Active Auctions */
.active-auctions-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.active-auctions-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.auction-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auction-item {
  display: grid;
  grid-template-columns: 2fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.auction-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.auction-name {
  font-weight: 600;
  color: #2456a5;
  font-size: 0.95rem;
}

.auction-price {
  font-weight: 700;
  color: #10b981;
  font-size: 0.95rem;
}

.auction-time {
  color: #6e7f9b;
  font-size: 0.85rem;
  font-style: italic;
}

/* Success Rate Card */
.success-rate-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.success-rate-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.success-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.success-circle {
  display: flex;
  justify-content: center;
  align-items: center;
  /* This ensures the SVG fills available space */
  width: 100%;
  max-width: 280px;
}

.success-circle svg {
  width: 100%;
  height: auto;
  /* This prevents any layout shift */
  display: block;
}

.success-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  width: 100%;
}

.success-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.success-label {
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.success-value {
  font-size: 1.75rem;
  font-weight: 700;
}

.success-value.sold {
  color: #10b981;
}

.success-value.expired {
  color: #ef4444;
}

/* Responsive adjustment for smaller screens */
@media (max-width: 768px) {
  .success-circle {
    max-width: 240px;
  }

  .success-circle svg {
    width: 100%;
    height: auto;
  }

  .success-stats {
    gap: 24px;
  }

  .success-value {
    font-size: 1.5rem;
  }
}

/* Best Sellers Table */
.best-sellers-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.best-sellers-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.best-sellers-table {
  width: 100%;
  border-collapse: collapse;
}

.best-sellers-table thead {
  background: #f7fafc;
}

.best-sellers-table th {
  text-align: left;
  padding: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6e7f9b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e6eefb;
}

.best-sellers-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #f0f4f8;
  color: #334e88;
  font-size: 0.95rem;
}

.best-sellers-table tbody tr:hover {
  background: #f7fafc;
}

.best-sellers-table .rank {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
  border-radius: 8px;
  text-align: center;
  line-height: 32px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 12px;
}

@media (max-width: 1200px) {
  .auction-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .currency-tabs {
    flex-direction: column;
  }

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

/* Configuration Upload Progress Bar */

.upload-progress-container {
  max-width: 600px;
  margin: 40px auto;
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.progress-bar-wrapper {
  margin: 24px 0;
}

.progress-bar-container {
  height: 40px;
  background: #e6eefb;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(45deg,
      #2456a5 25%,
      #ffffff 25%,
      #ffffff 50%,
      #2456a5 50%,
      #2456a5 75%,
      #ffffff 75%,
      #ffffff);
  background-size: 40px 40px;
  border-radius: 20px;
  transition: width 0.3s ease;
  animation: candy-cane 1s linear infinite;
  box-shadow: 0 2px 8px rgba(36, 86, 165, 0.3);
}

@keyframes candy-cane {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 40px 40px;
  }
}

.progress-text {
  text-align: center;
  margin-top: 16px;
  font-size: 1rem;
  color: #2456a5;
  font-weight: 600;
  min-height: 24px;
}

.progress-message {
  text-align: center;
  margin-top: 8px;
  font-size: 0.9rem;
  color: #6e7f9b;
  font-style: italic;
  min-height: 20px;
}

/* ============================================================================
   TRAVEL LOG STYLES (Matching Currencies Design)
   ============================================================================ */

/* Container */
.travel-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation (Reusing currencies style) */
.travel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.travel-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.travel-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.travel-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

/* Tab Content */
.travel-tab-content {
  display: none;
}

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

.travel-content-wrapper {
  margin-top: 24px;
}

/* ===== Journal Tab (Overview Stats) ===== */

.travel-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.travel-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.travel-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

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

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

.stat-label {
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-sublabel {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 4px;
}

/* Favorite Zone Card */
.favorite-zone-card {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #fbbf24;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
  margin-bottom: 24px;
}

.favorite-zone-card h3 {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  color: #92400e;
}

.favorite-zone-name {
  font-size: 2rem;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 12px;
}

.favorite-zone-stats {
  font-size: 1rem;
  color: #92400e;
  font-weight: 600;
}

/* Zone Timeline Graph */
.zone-timeline-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  margin-bottom: 24px;
}

.zone-timeline-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.zone-timeline-canvas {
  width: 100%;
  height: auto;
  max-width: 1000px;
  display: block;
}

/* ===== Log Tab (Searchable Table) ===== */

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.log-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.log-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.zone-search-input,
.date-input {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.zone-search-input {
  min-width: 200px;
}

.date-input {
  min-width: 140px;
}

.zone-search-input:focus,
.date-input:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.clear-filters-btn {
  padding: 8px 16px;
  background: #f0f4f8;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  color: #2456a5;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-filters-btn:hover {
  background: #e6eefb;
  border-color: #2456a5;
}

.log-table-container {
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  margin-bottom: 12px;
}

.pagination-info {
  text-align: right;
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
}

.travel-log-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.travel-log-table thead {
  background: linear-gradient(135deg, #2456a5 0%, #1e4a8f 100%);
  color: #fff;
}

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

.travel-log-table tbody tr {
  border-bottom: 1px solid #e6eefb;
  transition: background 0.15s;
}

.travel-log-table tbody tr:hover {
  background: #f7fafc;
}

.travel-log-table tbody tr:last-child {
  border-bottom: none;
}

.travel-log-table td {
  padding: 12px 16px;
  color: #374151;
}

.travel-log-table td.muted {
  color: #9ca3af;
  font-size: 0.9rem;
}

/* ===== Heatmap Tab ===== */

.heatmap-section,
.transitions-section,
.subzone-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.heatmap-section h3,
.transitions-section h3,
.subzone-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

/* Heatmap Bars */
.heatmap-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.heatmap-bar-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.heatmap-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.zone-name {
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.zone-percentage {
  font-weight: 700;
  color: #2456a5;
  font-size: 0.9rem;
}

.heatmap-bar-track {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.heatmap-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.5s ease-out;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.heatmap-stats {
  font-size: 0.85rem;
  color: #6e7f9b;
}

/* Zone Transitions */
.transitions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transition-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e6eefb;
}

.transition-route {
  display: flex;
  align-items: center;
  gap: 12px;
}

.from-zone,
.to-zone {
  font-weight: 600;
  color: #374151;
}

.transition-arrow {
  color: #2456a5;
  font-size: 1.2rem;
}

.transition-count {
  font-weight: 600;
  color: #2456a5;
  font-size: 0.9rem;
  background: #eef4ff;
  padding: 4px 12px;
  border-radius: 12px;
}

/* Subzone Table */
.subzone-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.subzone-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.subzone-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.subzone-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.subzone-table tbody tr:hover {
  background: #f7fafc;
}

.subzone-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
  .travel-stats-grid {
    grid-template-columns: 1fr;
  }

  .travel-tabs {
    flex-wrap: wrap;
  }

  .travel-tab {
    flex: 1;
    min-width: 100px;
  }
}

/* ============================================================================
   PROGRESSION / RAIDS STYLES
   ============================================================================ */

/* Container */
.prog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation */
.prog-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.prog-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.prog-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.prog-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

.prog-content-wrapper {
  margin-top: 24px;
}

/* ===== Overview Tab ===== */

.prog-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.prog-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.prog-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

/* Raid Progression */
.raid-progression-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.raid-progression-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.raid-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.raid-card:last-child {
  margin-bottom: 0;
}

.raid-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 12px;
}

.raid-difficulty-row {
  display: grid;
  grid-template-columns: 120px 1fr 80px;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.raid-difficulty-row:last-child {
  margin-bottom: 0;
}

.diff-name {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.raid-progress-bar {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.raid-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  transition: width 0.5s ease-out;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.raid-progress-text {
  font-weight: 700;
  color: #2456a5;
  font-size: 0.9rem;
  text-align: right;
}

/* Difficulty Breakdown */
.difficulty-breakdown-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.difficulty-breakdown-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
  align-self: flex-start;
}

.difficulty-pie-chart {
  margin-bottom: 20px;
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 400px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  font-weight: 600;
  color: #374151;
}

.legend-value {
  color: #6e7f9b;
  font-weight: 600;
}

/* ===== Boss Kills Tab ===== */

.boss-kills-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.boss-kills-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.boss-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.boss-search-input,
.difficulty-filter {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.boss-search-input {
  min-width: 220px;
}

.difficulty-filter {
  min-width: 160px;
}

.boss-search-input:focus,
.difficulty-filter:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.boss-kills-table-container {
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  margin-bottom: 12px;
}

.boss-kills-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.boss-kills-table thead {
  background: linear-gradient(135deg, #2456a5 0%, #1e4a8f 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.boss-kills-table tbody tr {
  border-bottom: 1px solid #e6eefb;
  transition: background 0.15s;
}

.boss-kills-table tbody tr:hover {
  background: #f7fafc;
}

.boss-kills-table td {
  padding: 12px 16px;
  color: #374151;
}

.difficulty-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.diff-normal {
  background: #e0f2fe;
  color: #0369a1;
}

.diff-heroic {
  background: #fef3c7;
  color: #92400e;
}

.diff-mythic {
  background: #fce7f3;
  color: #9f1239;
}

/* ===== Lockouts Tab ===== */

.lockouts-section,
.lockout-history-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.lockouts-section h3,
.lockout-history-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.lockouts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.lockout-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
}

.lockout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.lockout-instance {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
}

.lockout-difficulty {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6e7f9b;
  background: #e6eefb;
  padding: 4px 8px;
  border-radius: 4px;
}

.lockout-progress {
  margin-bottom: 12px;
}

.lockout-progress-bar {
  height: 20px;
  background: #e6eefb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
}

.lockout-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-radius: 10px;
  transition: width 0.5s ease-out;
}

.lockout-progress-text {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 600;
}

.lockout-reset {
  font-size: 0.9rem;
  color: #374151;
  font-weight: 600;
}

.extended-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Lockout History Table */
.lockout-history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.lockout-history-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.lockout-history-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.lockout-history-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.lockout-history-table tbody tr:hover {
  background: #f7fafc;
}

.lockout-history-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
  .prog-stats-grid {
    grid-template-columns: 1fr;
  }

  .prog-tabs {
    flex-wrap: wrap;
  }

  .prog-tab {
    flex: 1;
    min-width: 100px;
  }

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

/* ============================================================================
   QUESTS STYLES
   ============================================================================ */

/* Container */
.quest-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation */
.quest-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.quest-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.quest-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.quest-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

.quest-content-wrapper {
  margin-top: 24px;
}

/* ===== Overview Tab ===== */

.quest-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.quest-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.quest-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

/* Most Rewarding Quest Card */
.most-rewarding-quest-card {
  background: linear-gradient(135deg, #ffe064 0%, #775f00 100%);
  border: 2px solid #fbbf24;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
  margin-bottom: 24px;
}

.most-rewarding-quest-card h3 {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  color: #92400e;
}

.rewarding-quest-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 12px;
}

.rewarding-quest-details {
  display: flex;
  gap: 20px;
  justify-content: center;
  font-size: 1.1rem;
  color: #92400e;
  font-weight: 600;
}

/* Quest Trends */
.quest-trends-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.quest-trends-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.quest-trends-canvas {
  width: 100%;
  height: auto;
  max-width: 1000px;
  display: block;
}

/* Quests by Zone */
.quests-by-zone-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.quests-by-zone-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.zone-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zone-bar-container {
  display: grid;
  grid-template-columns: 200px 1fr 60px;
  align-items: center;
  gap: 12px;
}

.zone-bar-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.zone-bar-track {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
}

.zone-bar-fill {
  height: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  transition: width 0.5s ease-out;
}

.zone-bar-count {
  font-weight: 700;
  color: #2456a5;
  text-align: right;
}

/* ===== Quest Log Tab ===== */

.quest-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.quest-log-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.quest-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.quest-search-input,
.level-input {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.quest-search-input {
  min-width: 220px;
}

.level-input {
  width: 90px;
}

.quest-search-input:focus,
.level-input:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.quest-log-table-container {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  margin-bottom: 24px;
}

.quest-log-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.quest-log-table thead {
  background: linear-gradient(135deg, #2456a5 0%, #1e4a8f 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.quest-log-table tbody tr {
  border-bottom: 1px solid #e6eefb;
  transition: background 0.15s;
}

.quest-log-table tbody tr:hover {
  background: #f7fafc;
}

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

/* Notable Quests */
.notable-quests-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.notable-quests-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.notable-quests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.notable-quest-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
}

.notable-quest-card h4 {
  margin: 0 0 12px 0;
  color: #2456a5;
  font-size: 1rem;
}

.notable-quest-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notable-quest-card li {
  padding: 6px 0;
  color: #374151;
  font-size: 0.9rem;
  border-bottom: 1px solid #e6eefb;
}

.notable-quest-card li:last-child {
  border-bottom: none;
}

/* ===== Rewards Tab ===== */

.reward-quality-section,
.reward-slot-section,
.top-rewards-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.reward-quality-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reward-quality-section h3,
.reward-slot-section h3,
.top-rewards-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
  align-self: flex-start;
}

.quality-pie-chart {
  margin-bottom: 20px;
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 400px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  font-weight: 600;
  color: #374151;
}

.legend-value {
  color: #6e7f9b;
  font-weight: 600;
}

/* Slot Distribution */
.slot-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slot-bar-container {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  align-items: center;
  gap: 12px;
}

.slot-bar-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.slot-bar-track {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
}

.slot-bar-fill {
  height: 100%;
  background: linear-gradient(135deg, #3182ce 0%, #1e4a8f 100%);
  border-radius: 12px;
  transition: width 0.5s ease-out;
}

.slot-bar-count {
  font-weight: 700;
  color: #2456a5;
  text-align: right;
}

/* Top Rewards Gallery */
.reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.reward-card {
  background: linear-gradient(135deg, #262b33 0%, #1e5275 100%);
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 12px;
}

.reward-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.reward-count {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .quest-stats-grid {
    grid-template-columns: 1fr;
  }

  .quest-tabs {
    flex-wrap: wrap;
  }

  .quest-tab {
    flex: 1;
    min-width: 100px;
  }

  .zone-bar-container,
  .slot-bar-container {
    grid-template-columns: 150px 1fr 50px;
  }

  .notable-quests-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   PROFESSIONS / SKILLS STYLES
   ============================================================================ */

/* Container */
.prof-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation */
.prof-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.prof-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.prof-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.prof-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

.prof-content-wrapper {
  margin-top: 24px;
}

/* ===== Overview Tab ===== */

.prof-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.prof-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.prof-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

/* Professions Section */
.professions-section,
.secondary-section,
.recipe-counts-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.professions-section h3,
.secondary-section h3,
.recipe-counts-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.profession-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.profession-card {
  background: linear-gradient(135deg, #f7fafc 0%, #eef4ff 100%);
  border: 1px solid #d7e3fb;
  border-radius: 8px;
  padding: 16px;
}

.profession-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.profession-name {
  font-weight: 700;
  color: #2456a5;
  font-size: 1.1rem;
}

.profession-rank {
  font-weight: 600;
  color: #6e7f9b;
  font-size: 0.95rem;
}

.profession-progress-bar {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}

.profession-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  transition: width 0.5s ease-out;
}

.profession-stats {
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
}

/* Secondary Skills */
.secondary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.secondary-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
}

.secondary-name {
  font-weight: 700;
  color: #374151;
  margin-bottom: 12px;
  font-size: 1rem;
}

.secondary-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.secondary-progress-bar {
  flex: 1;
  height: 20px;
  background: #e6eefb;
  border-radius: 10px;
  overflow: hidden;
}

.secondary-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #3182ce 0%, #1e4a8f 100%);
  border-radius: 10px;
  transition: width 0.5s ease-out;
}

.secondary-rank {
  font-weight: 600;
  color: #2456a5;
  font-size: 0.9rem;
  min-width: 60px;
  text-align: right;
}

/* Recipe Counts Table */
.recipe-counts-table {
  width: 100%;
  border-collapse: collapse;
}

.recipe-counts-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.recipe-counts-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.recipe-counts-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.recipe-counts-table tbody tr:hover {
  background: #f7fafc;
}

.recipe-counts-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

/* ===== Recipes Tab ===== */

.recipes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.recipes-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.recipe-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.recipe-search-input,
.profession-filter {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.recipe-search-input {
  min-width: 220px;
}

.profession-filter {
  min-width: 160px;
}

.recipe-search-input:focus,
.profession-filter:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.recipe-cards-container {
  margin-bottom: 24px;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.recipe-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

.recipe-card-name {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
  margin-bottom: 8px;
}

.recipe-card-profession {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 600;
  margin-bottom: 6px;
}

.recipe-card-type {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 4px;
}

.recipe-card-cooldown {
  font-size: 0.85rem;
  color: #f59e0b;
  font-weight: 600;
  margin-top: 8px;
}

/* Notable Recipes */
.notable-recipes-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.notable-recipe-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.notable-recipe-card h4 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.1rem;
}

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

.notable-recipe-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f7fafc;
  border-radius: 6px;
  border: 1px solid #e6eefb;
}

.recipe-name {
  font-weight: 600;
  color: #374151;
  flex: 1;
}

.recipe-prof,
.recipe-cooldown {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .prof-stats-grid {
    grid-template-columns: 1fr;
  }

  .prof-tabs {
    flex-wrap: wrap;
  }

  .prof-tab {
    flex: 1;
    min-width: 100px;
  }

  .profession-cards,
  .secondary-cards,
  .recipe-grid {
    grid-template-columns: 1fr;
  }

  .notable-recipes-section {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   ACHIEVEMENTS STYLES
   ============================================================================ */

/* Container */
.ach-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation */
.ach-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.ach-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.ach-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.ach-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

.ach-content-wrapper {
  margin-top: 24px;
}

/* ===== Overview Tab ===== */

.ach-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.ach-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ach-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

/* Categories */
.category-section,
.recent-achievements-section,
.highest-achievements-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.category-section h3,
.recent-achievements-section h3,
.highest-achievements-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.category-card {
  background: linear-gradient(135deg, #f7fafc 0%, #eef4ff 100%);
  border: 1px solid #d7e3fb;
  border-radius: 8px;
  padding: 16px;
}

.category-name {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
  margin-bottom: 12px;
}

.category-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
}

/* Recent Achievements */
.recent-achievements-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-achievement-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  gap: 16px;
}

.achievement-content {
  flex: 1;
}

.achievement-name {
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 4px;
}

.achievement-desc {
  font-size: 0.85rem;
  color: #6e7f9b;
}

.achievement-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.achievement-points {
  font-weight: 700;
  color: #f59e0b;
  font-size: 0.95rem;
}

.achievement-date {
  font-size: 0.85rem;
  color: #9ca3af;
}

/* Highest Achievements Table */
.highest-achievements-table {
  width: 100%;
  border-collapse: collapse;
}

.highest-achievements-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.highest-achievements-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.highest-achievements-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.highest-achievements-table tbody tr:hover {
  background: #f7fafc;
}

.highest-achievements-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

.points-cell {
  color: #f59e0b;
  font-weight: 700;
}

/* ===== Collections Tab ===== */

.mounts-section,
.pets-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.mounts-section h3,
.pets-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.collection-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.collection-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

.collection-card.active-mount,
.collection-card.active-pet {
  border: 2px solid #10b981;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.collection-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
}

.collection-icon-placeholder {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: #e6eefb;
  border-radius: 8px;
}

.collection-name {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.active-badge {
  margin-top: 8px;
  padding: 4px 8px;
  background: #10b981;
  color: #fff;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ===== Timeline Tab ===== */

.spam-days-section,
.monthly-graph-section,
.timeline-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.spam-days-section h3,
.monthly-graph-section h3,
.timeline-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

/* Spam Days */
.spam-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.spam-day-card {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #fbbf24;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.spam-day-date {
  font-weight: 700;
  color: #92400e;
  font-size: 1rem;
  margin-bottom: 8px;
}

.spam-day-stats {
  font-size: 0.9rem;
  color: #78350f;
  font-weight: 600;
}

.spam-day-count {
  margin-bottom: 4px;
}

/* Monthly Graph */
.monthly-graph-canvas {
  width: 100%;
  height: auto;
  max-width: 1000px;
  display: block;
}

/* Timeline */
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.timeline-search {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  min-width: 250px;
  transition: border-color 0.2s;
}

.timeline-search:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 600px;
  overflow-y: auto;
}

.timeline-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
}

.timeline-date {
  min-width: 120px;
  font-weight: 600;
  color: #6e7f9b;
  font-size: 0.9rem;
}

.timeline-achievement {
  flex: 1;
}

.timeline-name {
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 6px;
}

.timeline-points {
  font-size: 0.85rem;
  color: #f59e0b;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .ach-stats-grid {
    grid-template-columns: 1fr;
  }

  .ach-tabs {
    flex-wrap: wrap;
  }

  .ach-tab {
    flex: 1;
    min-width: 100px;
  }

  .category-grid,
  .collection-grid,
  .spam-days-grid {
    grid-template-columns: 1fr;
  }

  .recent-achievement-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .achievement-meta {
    align-items: flex-start;
  }

  .timeline-item {
    flex-direction: column;
    gap: 8px;
  }

  .timeline-date {
    min-width: auto;
  }
}

/* ===== ITEMS PAGE STYLES - CONSOLIDATED & FIXED ===== */

/* Tab styling */
.items-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 8px;
}

.items-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 500;
  font-size: 1rem;
  color: #6b7280;
  transition: all 0.2s;
}

.items-tab:hover {
  color: #1e3a8a;
  background: #f3f4f6;
  border-radius: 8px 8px 0 0;
}

.items-tab.active {
  color: #1e3a8a;
  border-bottom-color: #1e3a8a;
  font-weight: 600;
}

.items-tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

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

/* Vault Overview */
.vault-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.vault-stat-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
  padding: 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vault-stat-icon {
  font-size: 3rem;
  opacity: 0.9;
}

.vault-stat-content {
  flex: 1;
}

.vault-stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 4px;
}

.vault-stat-value {
  font-size: 2rem;
  font-weight: 700;
}

/* Vault Sections */
.vault-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.vault-section h3 {
  margin: 0 0 20px 0;
  color: #1e3a8a;
  font-size: 1.3rem;
}

/* Quality Chart */
.quality-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quality-bar {
  display: grid;
  grid-template-columns: 120px 1fr 80px;
  align-items: center;
  gap: 12px;
}

.quality-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.quality-bar-fill {
  height: 24px;
  border-radius: 4px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.quality-bar:hover .quality-bar-fill {
  opacity: 1;
}

.quality-count {
  text-align: right;
  font-weight: 700;
  color: #111827;
}

/* Vault Items List */
.vault-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vault-item-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  transition: background 0.2s;
}

.vault-item-row:hover {
  background: #f3f4f6;
}

.vault-item-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.vault-item-ilvl {
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 600;
}

.vault-item-location {
  color: #6b7280;
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 500;
}

/* Bags/Bank/Mail - Grid Display */
.bag-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bag-container h3 {
  margin: 0 0 20px 0;
  color: #1e3a8a;
  font-size: 1.2rem;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.item-card {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.item-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.item-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  border: 2px solid #d1d5db;
}

/* Item card text - DARK version (used in bags/bank/mail) */
.item-name-dark {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  /* Quality color applied via inline style - NO text shadow needed */
}

.item-count-dark {
  font-size: 1rem;
  color: #111827;
  font-weight: 700;
}

.item-ilvl-dark {
  font-size: 0.85rem;
  color: #374151;
  margin-top: 4px;
  font-weight: 600;
}

.item-sender-dark {
  font-size: 0.8rem;
  color: #374151;
  margin-top: 4px;
  font-style: italic;
  font-weight: 500;
}

/* Combined Tab */
.combined-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.combined-container h3 {
  margin: 0 0 20px 0;
  color: #1e3a8a;
  font-size: 1.3rem;
}

.combined-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

.combined-search {
  flex: 1;
  min-width: 250px;
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.combined-search:focus {
  outline: none;
  border-color: #3b82f6;
}

.combined-count {
  color: #6b7280;
  font-size: 0.95rem;
}

.combined-count strong {
  color: #111827;
  font-weight: 600;
}

.combined-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.combined-table thead {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
}

.combined-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.combined-table th:hover {
  background: rgba(255, 255, 255, 0.1);
}

.combined-table th.sorted {
  background: rgba(255, 255, 255, 0.15);
}

.sort-arrow {
  margin-left: 4px;
  font-size: 0.8em;
  opacity: 0.7;
}

.combined-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s;
}

.combined-table tbody tr:hover {
  background-color: #f9fafb;
}

.combined-table tbody td {
  padding: 12px 16px;
  color: #111827;
}

.combined-table tbody td strong {
  font-weight: 700;
}

.combined-table td.center {
  text-align: center;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .vault-overview {
    grid-template-columns: 1fr;
  }

  .vault-item-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
  }

  .item-icon {
    width: 48px;
    height: 48px;
  }

  .combined-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .combined-search {
    min-width: 100%;
  }

  .combined-table {
    font-size: 0.8rem;
  }

  .combined-table th,
  .combined-table td {
    padding: 8px 12px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.muted {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Dashboard Tabs */
.dashboard-tabs {
  display: flex;
  gap: 8px;
  margin: 24px 0;
  border-bottom: 2px solid #e2e8f0;
  padding: 0 20px;
}

.dashboard-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #64748b;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: -2px;
}

.dashboard-tab:hover {
  color: #2456a5;
  background: #f8fafc;
}

.dashboard-tab.active {
  color: #2456a5;
  border-bottom-color: #2456a5;
  background: #f8fafc;
}

.dashboard-content-wrapper {
  padding: 20px;
}

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

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

/* Gear Tab - Paper Doll */
.paperdoll-card {
  min-height: auto;
  margin-bottom: 20px;
}

.upgrade-opportunities-card {
  width: 100%;
}

.paperdoll {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  margin-top: 20px;
}

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

.paperdoll-center {
  justify-content: center;
  gap: 20px;
}

.equipment-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: #001933;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.equipment-slot:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.equipment-slot.empty {
  opacity: 0.6;
}

.equipment-slot.needs-upgrade {
  border-color: #ff0000;
  background: #370000;
}

.slot-icon {
  width: 40px;
  height: 40px;
  border: 2px solid #9d9d9d;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: #1e293b;
  flex-shrink: 0;
  position: relative;
}

.slot-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.slot-icon.empty-slot {
  background: #e2e8f0;
  color: #94a3b8;
  border-color: #cbd5e1;
}

.slot-info {
  flex: 1;
  min-width: 0;
}

.slot-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-ilvl {
  font-size: 0.85rem;
  color: #64748b;
}

.slot-empty {
  font-size: 0.85rem;
  color: #94a3b8;
  font-style: italic;
}

.upgrade-flag {
  font-size: 0.75rem;
  color: #f59e0b;
  font-weight: 600;
}

/* Upgrade Opportunities */
.upgrade-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.upgrade-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #181400;
  border: 2px solid #ffdd00;
  border-radius: 8px;
}

.upgrade-slot {
  font-weight: 700;
  color: #92400e;
  min-width: 80px;
}

.upgrade-info {
  flex: 1;
}

.upgrade-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.upgrade-deficit {
  font-size: 0.85rem;
  color: #78350f;
  margin-top: 4px;
}

.deficit-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #dc2626;
  color: white;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
  margin-left: 8px;
}

.success-message {
  color: #16a34a;
  font-weight: 600;
  padding: 20px;
  text-align: center;
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  border-radius: 8px;
  margin-top: 16px;
}

/* Stats Tab */
.stats-bars-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.stat-bar-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-bar-label {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
}

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

.stat-bar-container {
  width: 100%;
  height: 24px;
  background: #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.3s ease;
  position: relative;
}

.stat-bar-fill.health {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

.stat-bar-fill.mana {
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
}

.stat-bar-fill.ilvl {
  background: linear-gradient(90deg, #7c3aed 0%, #a855f7 100%);
}

/* Stat Trends */
.trends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.trend-item {
  padding: 16px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  text-align: center;
}

.trend-label {
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.trend-indicator {
  font-size: 1.3rem;
  font-weight: 700;
}

.trend-indicator.up {
  color: #16a34a;
}

.trend-indicator.down {
  color: #dc2626;
}

.trend-indicator.neutral {
  color: #64748b;
}

/* Talent Points Tab */
.talents-card {
  max-width: 100%;
}

.talent-trees-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.talent-tree-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
}

.talent-tree-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.talent-tree-header h4 {
  margin: 0;
  color: #1e293b;
  font-size: 1.1rem;
}

.talent-tree-points {
  font-weight: 700;
  color: #2456a5;
  font-size: 1.1rem;
}

.talent-tree-bar-container {
  width: 100%;
  height: 20px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.talent-tree-bar {
  height: 100%;
  background: linear-gradient(90deg, #2456a5 0%, #3b6fd9 100%);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.talent-tree-percentage {
  text-align: center;
  font-weight: 600;
  color: #64748b;
  font-size: 0.9rem;
}

.talents-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.talent-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.talent-item:hover {
  border-color: #2456a5;
  box-shadow: 0 2px 8px rgba(36, 86, 165, 0.1);
}

.talent-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  position: relative;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  font-size: 1.2rem;
}

.talent-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.talent-rank {
  position: absolute;
  bottom: -6px;
  right: -6px;
  background: #2456a5;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 2px solid white;
}

.talent-info {
  flex: 1;
  min-width: 0;
}

.talent-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.talent-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .paperdoll {
    grid-template-columns: 1fr;
  }

  .paperdoll-center {
    flex-direction: row;
    justify-content: space-around;
  }

  .talent-trees-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-tabs {
    overflow-x: auto;
    padding: 0 10px;
  }

  .dashboard-tab {
    padding: 10px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
  }
}

/* ========================================
   MORTALITY SECTION STYLES - Light Theme
   ======================================== */

/* Mortality Header */
.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;
}

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

/* Death Subtitle */
.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 */
.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 */
.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 */
.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 Chart */
.death-trend-chart {
  grid-column: 1 / -1;
  width: 100%;
  height: 250px;
  margin-top: 15px;
  background: #f8fafc;
  border-radius: 8px;
}

/* Interesting Stats Grid */
.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 */
.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 */
.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 */
.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;
}

.muted {
  color: #94a3b8;
  font-style: italic;
}

/* Override dash-card for mortality to allow proper 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;
}

/* Tab content visibility */
.mortality-tab-content {
  display: none;
}

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

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

/* Responsive adjustments */
@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 some 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;
  }
}

@media (max-width: 480px) {

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

/* ==========================================================================
   WhoDASH Quests - Enhanced Styles for Quest Events & Timeline
   Add this to your existing CSS file or include it separately
   ========================================================================== */

/* Current Quest Log Section */
.current-quest-log-section {
  margin-bottom: 2rem;
}

.current-quest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.current-quest-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s;
}

.current-quest-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.current-quest-card.quest-complete {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #22c55e;
}

.quest-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.quest-card-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: #1f2937;
  flex: 1;
}

.quest-complete-badge {
  background: #22c55e;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.quest-objectives {
  margin: 0.75rem 0;
}

.objective-item {
  padding: 0.5rem;
  margin: 0.25rem 0;
  background: #f9fafb;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #4b5563;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.objective-item.objective-complete {
  background: #d1fae5;
  color: #065f46;
  text-decoration: line-through;
}

.objective-progress {
  margin-left: auto;
  font-weight: 600;
  color: #6366f1;
}

.quest-card-footer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.85rem;
}

/* Quest Event History Section */
.quest-event-history-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
}

.quest-event-timeline {
  max-height: 600px;
  overflow-y: auto;
  margin-top: 1rem;
  padding-right: 0.5rem;
}

.quest-event-timeline::-webkit-scrollbar {
  width: 8px;
}

.quest-event-timeline::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.quest-event-timeline::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.quest-event-timeline::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.quest-event-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #cbd5e1;
  transition: all 0.2s;
}

.quest-event-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.event-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 50%;
}

.event-content {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.event-kind {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: #e5e7eb;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #4b5563;
  margin-bottom: 0.25rem;
}

.event-detail {
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: #f3f4f6;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #6b7280;
}

.event-time {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Success stat card highlight */
.stat-card-success {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #22c55e !important;
}

.stat-card-success .stat-value {
  color: #16a34a;
}

/* Quest Level Distribution */
.quest-level-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.level-bars {
  margin-top: 1rem;
}

.level-bar-container {
  display: grid;
  grid-template-columns: 80px 1fr 60px;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.level-bar-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4b5563;
}

.level-bar-track {
  height: 28px;
  background: #f1f5f9;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.level-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 14px;
  transition: width 0.5s ease;
}

.level-bar-count {
  text-align: right;
  font-weight: 600;
  color: #6366f1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .current-quest-grid {
    grid-template-columns: 1fr;
  }

  .quest-event-item {
    flex-direction: column;
    gap: 0.75rem;
  }

  .event-icon {
    width: 100%;
    height: 48px;
  }

  .level-bar-container {
    grid-template-columns: 60px 1fr 50px;
    gap: 0.75rem;
  }
}

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

.quest-stat-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s;
}

.quest-stat-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 500;
}

.stat-sublabel {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

/* Canvas containers */
.quest-trends-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.quest-trends-canvas,
.quest-timeline-canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

/* ===================================================================
   Combat Analytics Styles
   =================================================================== */

/* Tab Navigation */
.combat-tabs-container {
  margin-bottom: 32px;
}

.combat-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
}

.combat-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  bottom: -2px;
}

.combat-tab:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.combat-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.combat-tab-content {
  position: relative;
}

.combat-tab-pane {
  display: none;
}

.combat-tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* Combat Overview Card */
.combat-overview-card {
  background: linear-gradient(135deg, #991b1b 0%, #450a0a 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.combat-title {
  color: #f1f5f9;
  font-size: 1.75rem;
  margin: 0 0 24px 0;
  font-weight: 600;
}

.combat-stats-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .combat-stats-grid {
    grid-template-columns: 1fr;
  }
}

.combat-stat-main {
  grid-column: span 1;
  text-align: center;
  padding: 24px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 12px;
  border: 2px solid rgba(239, 68, 68, 0.3);
}

.combat-stat {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.stat-value-huge {
  font-size: 3rem;
  font-weight: 700;
  color: #ef4444;
  margin: 8px 0;
  text-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 8px 0;
}

.stat-value.highlight {
  color: #fbbf24;
}

.stat-label {
  font-size: 0.875rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.stat-sublabel {
  font-size: 0.875rem;
  color: #cbd5e1;
  margin-top: 4px;
}

/* Chart Cards */
.dps-chart-card,
.combat-breakdown-card,
.instance-performance-card,
.dps-distribution-card,
.role-performance-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.dps-chart-card h3,
.combat-breakdown-card h3,
.instance-performance-card h3,
.dps-distribution-card h3,
.role-performance-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.dps-canvas,
.combat-breakdown-card canvas,
.instance-performance-card canvas,
.dps-distribution-card canvas {
  display: block;
  margin: 20px auto;
}

/* Pie Chart Legend */
.pie-legend {
  margin-top: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px;
  background: #f8fafc;
  border-radius: 6px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.legend-label {
  flex: 1;
  color: #475569;
  font-weight: 500;
}

.legend-value {
  color: #64748b;
  font-weight: 600;
}

/* Boss Encounters Table */
.boss-table-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.boss-table-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.boss-table-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.filter-buttons {
  display: flex;
  gap: 8px;
}

.filter-btn {
  padding: 8px 16px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.filter-btn.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.table-wrapper {
  overflow-x: auto;
  margin-bottom: 16px;
}

.boss-encounters-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.boss-encounters-table thead {
  background: #f8fafc;
}

.boss-encounters-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.boss-encounters-table th:hover {
  background: #f1f5f9;
}

.boss-encounters-table th.sorted {
  background: #e0e7ff;
  color: #3b82f6;
}

.sort-arrow {
  margin-left: 4px;
  font-size: 12px;
  color: #94a3b8;
}

.boss-encounters-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s;
}

.boss-encounters-table tbody tr:hover {
  background: #f8fafc;
}

.boss-encounters-table td {
  padding: 12px 16px;
  color: #334155;
}

.boss-name {
  font-weight: 600;
  color: #1e293b;
}

.dps-value {
  font-weight: 600;
  color: #64748b;
}

.dps-value.high-dps {
  color: #10b981;
}

.table-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.page-btn {
  padding: 8px 16px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  border-color: #3b82f6;
  color: #3b82f6;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* DPS Distribution */
.percentiles-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .percentiles-info {
    grid-template-columns: 1fr;
  }
}

.percentile-item {
  text-align: center;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
}

.percentile-label {
  display: block;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.percentile-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: #06b6d4;
}

/* Role Performance */
.role-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .role-stats-grid {
    grid-template-columns: 1fr;
  }
}

.role-stat {
  text-align: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
}

/* Section styling */
.combat-section {
  margin-bottom: 48px;
}

.section-title {
  color: #1e293b;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 3px solid #e2e8f0;
}

/* Utility classes */
.muted {
  color: #94a3b8;
  text-align: center;
  padding: 20px;
}

.positive {
  color: #10b981;
}

.negative {
  color: #ef4444;
}

/* ===================================================================
   NEW DPS-SPECIFIC COMPONENTS
   =================================================================== */

/* Burst vs Sustained Analysis */
.burst-analysis-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.burst-analysis-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.burst-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .burst-comparison {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .burst-divider {
    display: none;
  }
}

.burst-item {
  text-align: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
}

.burst-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}

.burst-desc {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 12px;
}

.burst-value {
  font-size: 2rem;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 8px;
}

.burst-value.highlight {
  color: #dc2626;
}

.burst-count {
  font-size: 0.875rem;
  color: #64748b;
}

.burst-divider {
  font-size: 1.5rem;
  font-weight: 700;
  color: #cbd5e1;
}

.burst-insight {
  padding: 16px;
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #1e40af;
}

/* Target Type Analysis */
.target-analysis-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.target-analysis-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.target-comparison {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .target-comparison {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .target-divider {
    display: none;
  }
}

.target-item {
  text-align: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
}

.target-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 12px;
}

.target-value {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.target-value.boss {
  color: #7c3aed;
}

.target-value.adds {
  color: #f97316;
}

.target-detail {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.target-count {
  font-size: 0.875rem;
  color: #94a3b8;
}

.target-divider {
  background: linear-gradient(to bottom, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
}

.target-insight {
  padding: 16px;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #92400e;
}

/* Consistency Metrics */
.consistency-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.consistency-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.consistency-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 968px) {
  .consistency-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .consistency-grid {
    grid-template-columns: 1fr;
  }
}

.consistency-item {
  text-align: center;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.consistency-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.consistency-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #334155;
}

.consistency-rating {
  font-size: 1.25rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  display: inline-block;
}

.consistency-rating.excellent {
  background: #d1fae5;
  color: #065f46;
}

.consistency-rating.good {
  background: #dbeafe;
  color: #1e40af;
}

.consistency-rating.average {
  background: #fef3c7;
  color: #92400e;
}

.consistency-rating.poor {
  background: #fee2e2;
  color: #991b1b;
}

.consistency-insight {
  padding: 16px;
  background: #f0f9ff;
  border-left: 4px solid #0ea5e9;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #075985;
}

/* ===================================================================
   Healing Analytics Styles (Green Theme for Healers)
   =================================================================== */

/* Tab Navigation */
.healing-tabs-container {
  margin-bottom: 32px;
}

.healing-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
}

.healing-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  bottom: -2px;
}

.healing-tab:hover {
  color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.healing-tab.active {
  color: #10b981;
  border-bottom-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.healing-tab-content {
  position: relative;
}

.healing-tab-pane {
  display: none;
}

.healing-tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

/* Healing Overview Card */
.healing-overview-card {
  background: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.healing-title {
  color: #f1f5f9;
  font-size: 1.75rem;
  margin: 0 0 24px 0;
  font-weight: 600;
}

.healing-stats-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .healing-stats-grid {
    grid-template-columns: 1fr;
  }
}

.healing-stat-main {
  grid-column: span 1;
  text-align: center;
  padding: 24px;
  background: rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  border: 2px solid rgba(16, 185, 129, 0.4);
}

.healing-stat {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

/* Chart Cards */
.hps-chart-card,
.healing-breakdown-card,
.instance-performance-card,
.hps-distribution-card,
.overheal-analysis-card,
.efficiency-metrics-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.hps-chart-card h3,
.healing-breakdown-card h3,
.instance-performance-card h3,
.hps-distribution-card h3,
.overheal-analysis-card h3,
.efficiency-metrics-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.hps-canvas,
.healing-breakdown-card canvas,
.instance-performance-card canvas,
.hps-distribution-card canvas {
  display: block;
  margin: 20px auto;
}

/* Healing Encounters Table */
.healing-table-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.healing-table-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.healing-table-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.healing-encounters-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.healing-encounters-table thead {
  background: #f8fafc;
}

.healing-encounters-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.healing-encounters-table th:hover {
  background: #f1f5f9;
}

.healing-encounters-table th.sorted {
  background: #d1fae5;
  color: #10b981;
}

.healing-encounters-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s;
}

.healing-encounters-table tbody tr:hover {
  background: #f8fafc;
}

.healing-encounters-table td {
  padding: 12px 16px;
  color: #334155;
}

.target-name {
  font-weight: 600;
  color: #1e293b;
}

.hps-value {
  font-weight: 600;
  color: #64748b;
}

.hps-value.high-hps {
  color: #10b981;
}

.overheal-value.low-overheal {
  color: #10b981;
  font-weight: 600;
}

.overheal-value.high-overheal {
  color: #ef4444;
  font-weight: 600;
}

/* Overheal Analysis */
.overheal-by-type {
  margin-bottom: 24px;
}

.overheal-by-type h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.type-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.type-item {
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.type-label {
  font-weight: 600;
  color: #475569;
  text-transform: capitalize;
}

.type-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #64748b;
}

.type-value.low-overheal {
  color: #10b981;
}

.type-value.high-overheal {
  color: #ef4444;
}

.type-count {
  margin-left: auto;
  color: #94a3b8;
  font-size: 0.875rem;
}

.improvement-opportunities {
  margin-top: 24px;
}

.improvement-opportunities h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.opportunities-table {
  width: 100%;
  border-collapse: collapse;
}

.opportunities-table thead {
  background: #fef2f2;
}

.opportunities-table th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: #991b1b;
  font-size: 0.875rem;
}

.opportunities-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
}

/* Efficiency Metrics */
.efficiency-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

.efficiency-section h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.efficiency-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.efficiency-item {
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #e2e8f0;
  transition: all 0.2s;
}

.efficiency-item:hover {
  background: #f1f5f9;
  border-left-color: #10b981;
}

.efficiency-target {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.efficiency-stats {
  display: flex;
  gap: 12px;
  font-size: 0.875rem;
}

.efficiency-hps {
  color: #10b981;
  font-weight: 600;
}

.efficiency-overheal {
  font-weight: 600;
}

.efficiency-date {
  color: #94a3b8;
  margin-left: auto;
}

/* Section styling */
.healing-section {
  margin-bottom: 48px;
}

/* Utility classes for healing */
.low-overheal {
  color: #10b981;
}

.high-overheal {
  color: #ef4444;
}

/* ===================================================================
   Tanking Analytics Styles (Blue/Steel Theme for Tanks)
   =================================================================== */

/* Tab Navigation */
.tanking-tabs-container {
  margin-bottom: 32px;
}

.tanking-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
}

.tanking-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  bottom: -2px;
}

.tanking-tab:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.tanking-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.tanking-tab-content {
  position: relative;
}

.tanking-tab-pane {
  display: none;
}

.tanking-tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

/* Tanking Overview Card */
.tanking-overview-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.tanking-title {
  color: #f1f5f9;
  font-size: 1.75rem;
  margin: 0 0 24px 0;
  font-weight: 600;
}

.tanking-stats-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .tanking-stats-grid {
    grid-template-columns: 1fr;
  }
}

.tanking-stat-main {
  grid-column: span 1;
  text-align: center;
  padding: 24px;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  border: 2px solid rgba(59, 130, 246, 0.4);
}

.tanking-stat {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

/* Chart Cards */
.dtps-chart-card,
.tanking-breakdown-card,
.instance-performance-card,
.dtps-distribution-card,
.death-analysis-card,
.survivability-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.dtps-chart-card h3,
.tanking-breakdown-card h3,
.instance-performance-card h3,
.dtps-distribution-card h3,
.death-analysis-card h3,
.survivability-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.dtps-canvas,
.tanking-breakdown-card canvas,
.instance-performance-card canvas,
.dtps-distribution-card canvas {
  display: block;
  margin: 20px auto;
}

/* Tanking Encounters Table */
.tanking-table-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.tanking-table-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.tanking-table-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tanking-encounters-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tanking-encounters-table thead {
  background: #f8fafc;
}

.tanking-encounters-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.tanking-encounters-table th:hover {
  background: #f1f5f9;
}

.tanking-encounters-table th.sorted {
  background: #dbeafe;
  color: #3b82f6;
}

.tanking-encounters-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s;
}

.tanking-encounters-table tbody tr:hover {
  background: #f8fafc;
}

.tanking-encounters-table td {
  padding: 12px 16px;
  color: #334155;
}

.dtps-value {
  font-weight: 600;
  color: #64748b;
}

.dtps-value.high-dtps {
  color: #3b82f6;
}

.outcome {
  font-weight: 600;
}

.outcome.survived {
  color: #10b981;
}

.outcome.died {
  color: #ef4444;
}

/* Death Analysis */
.death-analysis-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.death-section h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.killer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.killer-item {
  padding: 12px;
  background: #fef2f2;
  border-radius: 8px;
  border-left: 4px solid #ef4444;
  display: flex;
  align-items: center;
  gap: 8px;
}

.killer-label {
  font-weight: 600;
  color: #991b1b;
  text-transform: capitalize;
}

.killer-count {
  margin-left: auto;
  color: #dc2626;
  font-weight: 700;
}

.hotspot-table,
.recent-deaths-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.hotspot-table thead,
.recent-deaths-table thead {
  background: #fef2f2;
}

.hotspot-table th,
.recent-deaths-table th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: #991b1b;
}

.hotspot-table td,
.recent-deaths-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.death-count-cell {
  color: #dc2626;
  font-weight: 700;
}

/* Survivability Metrics */
.survivability-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

.surv-section h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.surv-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.surv-item {
  padding: 12px;
  background: #f0fdf4;
  border-radius: 8px;
  border-left: 4px solid #10b981;
  transition: all 0.2s;
}

.surv-item.dangerous {
  background: #fef2f2;
  border-left-color: #ef4444;
}

.surv-item:hover {
  background: #dcfce7;
}

.surv-item.dangerous:hover {
  background: #fee2e2;
}

.surv-target {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.surv-stats {
  display: flex;
  gap: 12px;
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.surv-dtps {
  color: #3b82f6;
  font-weight: 600;
}

.surv-duration {
  color: #10b981;
  font-weight: 600;
}

.surv-duration.negative {
  color: #ef4444;
}

.surv-damage {
  color: #64748b;
}

.surv-zone {
  color: #94a3b8;
}

.surv-date {
  color: #94a3b8;
  margin-left: auto;
}

/* Section styling */
.tanking-section {
  margin-bottom: 48px;
}

/* Utility classes for tanking */
.high-dtps {
  color: #3b82f6;
}

/* ===================================================================
   Role Performance - Unified Multi-Role Analytics Styles
   =================================================================== */

/* Main Role Tabs (Top Level) */
.role-main-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  border-bottom: 3px solid #e2e8f0;
  padding-bottom: 0;
  flex-wrap: wrap;
}

.role-main-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  background: transparent;
  border: none;
  border-bottom: 4px solid transparent;
  font-size: 1.125rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  bottom: -3px;
}

.role-main-tab:hover {
  background: rgba(0, 0, 0, 0.02);
  color: #334155;
}

.role-main-tab.active {
  color: #1e293b;
  background: rgba(0, 0, 0, 0.02);
  border-bottom-color: #6366f1;
}

.role-main-tab .tab-icon {
  font-size: 1.5rem;
}

.role-main-tab .tab-label {
  font-size: 1rem;
}

/* Role Tab Panes */
.role-tab-panes {
  position: relative;
  min-height: 400px;
}

.role-pane {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.role-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* ===================================================================
   OVERVIEW TAB STYLES
   =================================================================== */

.role-overview-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 24px 0;
}

.primary-role-badge {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 1.125rem;
  margin: 0 auto 32px auto;
  text-align: center;
  display: block;
  width: fit-content;
}

.primary-role-badge.damage {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
  border: 2px solid #ef4444;
}

.primary-role-badge.tanking {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  border: 2px solid #3b82f6;
}

.primary-role-badge.healing {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border: 2px solid #10b981;
}

/* Role Stats Grid */
.role-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

@media (max-width: 1024px) {
  .role-stats-grid {
    grid-template-columns: 1fr;
  }
}

.role-stat-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.role-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.role-stat-card.damage {
  border-top: 4px solid #ef4444;
}

.role-stat-card.tanking {
  border-top: 4px solid #3b82f6;
}

.role-stat-card.healing {
  border-top: 4px solid #10b981;
}

.role-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f1f5f9;
}

.role-card-icon {
  font-size: 2rem;
}

.role-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.role-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.role-stat {
  text-align: center;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.role-stat-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 4px;
}

.role-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.role-stat-value.positive {
  color: #10b981;
}

.role-stat-value.negative {
  color: #ef4444;
}

.role-card-footer {
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

/* Role Distribution Chart */
.role-distribution-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 32px;
  text-align: center;
}

.role-distribution-card h3 {
  margin: 0 0 24px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.role-distribution-card canvas {
  display: block;
  margin: 0 auto 24px auto;
}

/* Pie Legend */
.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  font-weight: 600;
  color: #334155;
}

.legend-value {
  color: #64748b;
  font-size: 0.875rem;
}

/* Role Insights */
.role-insights {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.role-insights h3 {
  margin: 0 0 20px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.insight-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insight-list li {
  padding: 12px 16px;
  background: #f8fafc;
  border-left: 4px solid #6366f1;
  border-radius: 8px;
  color: #334155;
  line-height: 1.6;
}

.insight-list li strong {
  color: #1e293b;
  font-weight: 700;
}

.insight-list li strong.positive {
  color: #10b981;
}

.insight-list li strong.negative {
  color: #ef4444;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .role-main-tabs {
    gap: 8px;
  }

  .role-main-tab {
    padding: 12px 16px;
    font-size: 0.9375rem;
  }

  .role-main-tab .tab-icon {
    font-size: 1.25rem;
  }

  .role-main-tab .tab-label {
    font-size: 0.875rem;
  }

  .role-overview-title {
    font-size: 1.5rem;
  }

  .primary-role-badge {
    font-size: 1rem;
    padding: 10px 20px;
  }

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

/* ===========================================================================
   STYLE.CSS FIXES - Text Contrast and Visual Improvements
   ========================================================================== */

/* FIX #3: Enhanced Equipment Slot Backgrounds */
.equipment-slot.dark-bg {
  background: linear-gradient(135deg, #111314 0%, #3a4567 100%);
  padding: 8px;
  border-radius: 8px;
}

.equipment-slot.dark-bg .slot-ilvl {
  color: #e0e7ff !important;
  font-weight: 600;
}

/* FIX #1: Enhanced Quick Stats Styling */
.quick-stats-grid.enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.quick-stat.enhanced-stat {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.quick-stat.enhanced-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(36, 86, 165, 0.15);
  border-color: #3182ce;
}

.quick-stat.enhanced-stat .stat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.quick-stat.enhanced-stat .quick-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.quick-stat.enhanced-stat .quick-stat-label {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* FIX #2: Leveling Speed Vertical Bar Chart */
.leveling-speed-chart {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 180px;
  padding: 20px 10px 10px;
  background: linear-gradient(to bottom, #f7fafc 0%, #ffffff 100%);
  border-radius: 8px;
  margin: 16px 0;
}

.speed-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 60px;
}

.speed-bar-container {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.speed-bar {
  width: 70%;
  background: linear-gradient(to top, #3182ce 0%, #60a5fa 100%);
  border-radius: 4px 4px 0 0;
  transition: all 0.3s ease;
  box-shadow: 0 -2px 4px rgba(49, 130, 206, 0.3);
}

.speed-bar:hover {
  background: linear-gradient(to top, #2563eb 0%, #3b82f6 100%);
  box-shadow: 0 -4px 8px rgba(37, 99, 235, 0.4);
}

.speed-bar-label {
  margin-top: 8px;
  font-size: 0.75rem;
  color: #475569;
  font-weight: 600;
  text-align: center;
}

.speed-average {
  text-align: center;
  margin-top: 16px;
  padding: 12px;
  background: #eef4ff;
  border-radius: 6px;
  color: #334155;
  font-size: 0.95rem;
}

.speed-average strong {
  color: #2456a5;
  font-weight: 700;
}

/* FIX #7: Highlights List Icon Alignment */
.highlights-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
}

.highlights-list li {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e6eefb;
}

.highlights-list li:last-child {
  border-bottom: none;
}

.highlights-list .hl-icon {
  font-size: 1.5rem;
  margin-right: 12px;
  min-width: 32px;
  text-align: center;
}

.highlights-list .hl-label {
  color: #64748b;
  margin-right: 8px;
  flex: 1;
}

.highlights-list strong {
  color: #2456a5;
  font-weight: 700;
  margin-left: auto;
}

/* FIX #9, #11, #12, #19, #20: Text Contrast Improvements for Travel Log, Professions, Achievements, Progression, Quests */
.stat-value,
.travel-stat-card .stat-value,
.profession-stat-value,
.achievement-stat-value,
.progression-stat-value,
.quest-stat-value {
  color: #1e40af !important;
  /* Darker blue for better contrast */
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Ensure all stat labels have good contrast */
.stat-label,
.travel-stat-card .stat-label,
.profession-stat-label,
.achievement-stat-label,
.progression-stat-label,
.quest-stat-label {
  color: #475569 !important;
  font-weight: 600 !important;
}

/* Fix for zone percentages and counts in Travel Log */
.zone-percentage,
.zone-bar-count {
  color: #1e40af !important;
  font-weight: 700 !important;
}

/* Fix for any light text on light backgrounds */
.light-bg .text-stat,
.travel-stats-grid .stat-value,
.profession-card .stat-value,
.achievement-card .stat-value,
.progression-card .stat-value,
.quest-card .stat-value {
  color: #1e3a8a !important;
  font-weight: 700 !important;
}

/* Improve readability of all numbers in stats cards */
.stat-number,
.count-display,
.value-display {
  color: #1e40af;
  font-weight: 700;
  font-size: 1.1em;
}

/* Make sure sub-labels are also readable */
.stat-sublabel,
.count-sublabel {
  color: #64748b;
  font-weight: 500;
}

/* Override for Combat/Damage Overview - White text, no shadows */
.combat-overview-card .stat-value,
.combat-overview-card .stat-label {
  color: #ffffff !important;
  text-shadow: none !important;
}

/* Override for Tanking Overview - White text, no shadows */
.tanking-overview-card .stat-value,
.tanking-overview-card .stat-label {
  color: #ffffff !important;
  text-shadow: none !important;
}

/* Override for Healing Overview - White text, no shadows */
.healing-overview-card .stat-value,
.healing-overview-card .stat-label {
  color: #ffffff !important;
  text-shadow: none !important;
}

/* Make trend charts responsive */
.dps-canvas,
.hps-canvas,
.dtps-canvas {
  display: block;
  margin: 20px auto;
}

/* Dashboard Styles - Minimal Enhancement */

/* Quick Stats Grid with Icon Boxes */
.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.quick-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.quick-stat:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.quick-stat-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.quick-stat-content {
  flex: 1;
  min-width: 0;
}

.quick-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}

.quick-stat-label {
  font-size: 13px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Leveling Speed Bar Graph - Increased Size */
.level-speed-bars {
  margin-top: 8px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.level-speed-bar {
  display: grid;
  grid-template-columns: 60px 1fr 80px;
  gap: 12px;
  align-items: center;
}

.level-speed-label {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-align: right;
}

.level-speed-bar-track {
  height: 28px;
  background: transparent;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.level-speed-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1976d2, #42a5f5);
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  min-width: 2px;
}

.level-speed-time {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* Recent Milestones - Smaller, Scrollable */
.milestone-timeline {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Custom scrollbar styling */
.milestone-timeline::-webkit-scrollbar {
  width: 8px;
}

.milestone-timeline::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.milestone-timeline::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.milestone-timeline::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.milestone-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 6px;
  flex-shrink: 0;
}

.milestone-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFA000;
  border-radius: 8px;
}

.milestone-content {
  flex: 1;
  min-width: 0;
}

.milestone-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.milestone-desc {
  font-size: 12px;
  color: #666;
}

/* Highlight important milestones */
.milestone-important .milestone-icon {
  background: #E91E63;
}

/* ===================================================================
   Enhanced Mortality Section Styles
   Styles for confidence badges, death cards, killing blows, etc.
   =================================================================== */

/* 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;
}

.conf-none {
  background: #ef4444;
}

.confidence-score-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 1.1em;
  font-weight: 700;
  color: white;
}

.confidence-score-mini {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 600;
  color: white;
}

/* Confidence Distribution */
.confidence-bars {
  margin: 16px 0;
}

.confidence-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.confidence-bar-label {
  font-size: 0.9em;
  font-weight: 600;
  color: #475569;
  text-transform: capitalize;
}

.confidence-bar-container {
  background: #e2e8f0;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
}

.confidence-bar-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.confidence-bar-value {
  font-size: 0.9em;
  font-weight: 600;
  color: #1e293b;
  text-align: right;
}

.accuracy-summary {
  margin-top: 20px;
  padding: 16px;
  background: #f1f5f9;
  border-radius: 8px;
  text-align: center;
}

.accuracy-score {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 1.1em;
}

.accuracy-label {
  font-weight: 600;
  color: #475569;
}

.accuracy-value {
  font-size: 1.5em;
  font-weight: 700;
  color: #22c55e;
}

/* Detection Methods Table */
.detection-methods-table {
  width: 100%;
  border-collapse: collapse;
}

.detection-methods-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f1f5f9;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #cbd5e1;
}

.detection-methods-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.detection-methods-table tr:hover {
  background: #f8fafc;
}

/* Death Statistics Enhancements */
.death-stats-secondary {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9em;
}

.stat-label {
  color: #64748b;
  font-weight: 500;
}

.stat-value {
  font-weight: 700;
  color: #1e293b;
}

/* Lethal Spell Showcase */
.lethal-spell-showcase {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 12px;
  margin: 16px 0;
}

.spell-icon {
  font-size: 3em;
  margin-bottom: 8px;
}

.spell-name {
  font-size: 1.3em;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 12px;
}

.spell-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
}

.spell-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spell-stat-value {
  font-size: 1.5em;
  font-weight: 700;
  color: #92400e;
}

.spell-stat-label {
  font-size: 0.85em;
  color: #78350f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.additional-stats {
  margin-top: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}

/* Chart Legend */
.chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

/* Interesting Stats */
.interesting-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-item-large {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f1f5f9;
  border-radius: 8px;
}

.stat-icon {
  font-size: 2.5em;
}

.stat-content {
  flex: 1;
}

.stat-value-large {
  font-size: 1.8em;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.stat-label-large {
  font-size: 0.9em;
  color: #64748b;
  margin-top: 4px;
}

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

@media (max-width: 768px) {
  .deaths-grid {
    grid-template-columns: 1fr;
  }
}

/* Death Card */
.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;
}

/* Mortality Header */
.mortality-header {
  text-align: center;
  margin-bottom: 32px;
}

.mortality-header h1 {
  font-size: 2.5em;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.mortality-subtitle {
  font-size: 1.1em;
  color: #64748b;
}

/* Death Subtitle */
.death-subtitle {
  text-align: center;
  font-size: 1.2em;
  font-weight: 600;
  color: #3b82f6;
  margin-bottom: 20px;
}

/* Death Stats Grid */
.death-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 20px 0;
}

@media (max-width: 768px) {
  .death-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.death-stat-item {
  text-align: center;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.death-stat-value {
  font-size: 2em;
  font-weight: 700;
  color: #d32f2f;
  line-height: 1;
}

.death-stat-label {
  font-size: 0.85em;
  color: #64748b;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Arch Nemesis */
.arch-nemesis-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nemesis-main {
  text-align: center;
}

.nemesis-name {
  font-size: 1.8em;
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 4px;
}

.nemesis-subtitle {
  font-size: 0.9em;
  color: #64748b;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nemesis-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.nemesis-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

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

.danger-zone {
  padding: 16px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-radius: 8px;
  text-align: center;
}

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

.danger-zone-name {
  font-size: 1.3em;
  font-weight: 700;
  color: #7f1d1d;
  margin-bottom: 4px;
}

.danger-zone-deaths {
  font-size: 0.9em;
  color: #991b1b;
}

/* Boss Death Table */
.boss-death-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.boss-death-table th {
  text-align: left;
  padding: 12px;
  background: #f1f5f9;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #cbd5e1;
}

.boss-death-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.boss-death-table tr:hover {
  background: #f8fafc;
}

.boss-name {
  font-weight: 700;
  color: #1e293b;
}

/* Hardest Boss Card */
.hardest-boss-card {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 2px solid #fca5a5;
}

.hardest-boss-content {
  text-align: center;
}

.hardest-boss-name {
  font-size: 2em;
  font-weight: 700;
  color: #7f1d1d;
  margin-bottom: 12px;
}

.hardest-boss-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
}

.boss-stat-value {
  font-size: 3em;
  font-weight: 700;
  color: #dc2626;
  line-height: 1;
}

.boss-stat-label {
  font-size: 0.9em;
  color: #991b1b;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.boss-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #fca5a5;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
}

.timeline-label {
  font-weight: 600;
  color: #991b1b;
}

.timeline-value {
  color: #7f1d1d;
}

/* Muted text */
.muted {
  color: #94a3b8;
}

/* Dashboard utilities */
.dashboard-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

.dashboard-section {
  width: 100%;
}

.dash-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dash-card h3 {
  font-size: 1.2em;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .death-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .spell-stats {
    flex-direction: column;
    gap: 12px;
  }

  .confidence-bar-row {
    grid-template-columns: 100px 1fr 80px;
  }
}

/* ============================== Bazaar-Specific Styles ============================== */

/* Bazaar character selector option */
.charselect-item.bazaar-option {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-left: 3px solid #2456a5;
}

.charselect-item.bazaar-option:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.charselect-item.bazaar-option.active {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-left-color: #1e40af;
}

/* Stat cards */
.stat-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.stat-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
}

/* Gold pills */
.gold-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.gold-pill .char-name {
  font-weight: 600;
  color: #334155;
}

.gold-pill .gold-value {
  color: #f59e0b;
  font-weight: 700;
}

/* Quality badges */
.quality-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.quality-poor {
  background: #9d9d9d;
  color: white;
}

.quality-common {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
}

.quality-uncommon {
  background: #1eff00;
  color: #064e3b;
}

.quality-rare {
  background: #0070dd;
  color: white;
}

.quality-epic {
  background: #a335ee;
  color: white;
}

.quality-legendary {
  background: #ff8000;
  color: white;
}

/* Lockout cards */
.lockout-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
}

.lockout-instance {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: #1e293b;
}

.lockout-info {
  display: flex;
  gap: 8px;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.lockout-timer {
  font-size: 0.8rem;
  color: #f59e0b;
  font-weight: 600;
}

/* WhoDAT table styling (if not already in main styles) */
.whodat-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.whodat-table thead {
  background: #f8fafc;
}

.whodat-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
}

.whodat-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.whodat-table tbody tr:hover {
  background: #f8fafc;
}

.whodat-table tbody tr:last-child td {
  border-bottom: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .stat-card {
    padding: 12px;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .gold-pill {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .whodat-table {
    font-size: 0.8rem;
  }

  .whodat-table th,
  .whodat-table td {
    padding: 8px 12px;
  }
}

/* ============================================================================
   SOCIAL SECTION STYLES
   ============================================================================ */

/* Tab System */
.social-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.social-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.social-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.social-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

.social-tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

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

/* Hero Stats - The True Adventure */
.social-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.hero-stat-card {
  background: linear-gradient(135deg, #eef4ff 0%, #ffffff 100%);
  border: 2px solid #d4e3fc;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(36, 86, 165, 0.08);
  transition: all 0.3s;
}

.hero-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(36, 86, 165, 0.15);
}

.hero-stat-card.hero-primary {
  background: linear-gradient(135deg, #fff3cd 0%, #ffffff 100%);
  border-color: #ffc107;
}

.hero-stat-card.hero-secondary {
  background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
  border-color: #2196f3;
}

.hero-stat-card.hero-tertiary {
  background: linear-gradient(135deg, #f3e5f5 0%, #ffffff 100%);
  border-color: #9c27b0;
}

.hero-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.hero-value {
  font-size: 3rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.hero-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.hero-sublabel {
  font-size: 0.9rem;
  color: #6e7f9b;
}

/* Fun Facts Grid */
.social-fun-facts {
  margin-bottom: 40px;
}

.social-fun-facts h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
  text-align: center;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.fact-card {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: all 0.2s;
}

.fact-card:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.fact-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.fact-value {
  font-size: 2rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.fact-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.fact-subtitle {
  font-size: 0.85rem;
  color: #6e7f9b;
}

/* Charts */
.social-chart-section {
  margin-bottom: 40px;
}

.social-chart-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
  text-align: center;
}

.class-pie-chart {
  position: relative;
}

.chart-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  color: #2c3e50;
  font-weight: 500;
}

.legend-value {
  color: #6e7f9b;
  font-weight: 600;
}

/* Size Bar Chart */
.size-bar-chart {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
}

.size-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.size-bar-row:last-child {
  margin-bottom: 0;
}

.size-label {
  font-weight: 600;
  color: #2c3e50;
  text-align: right;
}

.size-bar-container {
  background: #f0f4f8;
  border-radius: 8px;
  height: 32px;
  position: relative;
}

.size-bar {
  background: linear-gradient(90deg, #3182ce 0%, #2456a5 100%);
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  min-width: 80px;
  transition: width 0.3s ease;
}

.size-count {
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Companions List */
.companions-section {
  margin-bottom: 40px;
}

.companions-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
}

.companions-list {
  display: grid;
  gap: 12px;
}

.companion-card {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 16px;
  align-items: center;
  transition: all 0.2s;
}

.companion-card:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.companion-rank {
  font-size: 1.5rem;
  font-weight: 700;
  color: #6e7f9b;
  text-align: center;
}

.companion-info {
  flex: 1;
}

.companion-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.companion-class {
  font-size: 0.9rem;
  color: #6e7f9b;
}

.companion-stats {
  text-align: right;
}

.companion-count {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2456a5;
}

.companion-label {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 4px;
}

.companion-last {
  font-size: 0.8rem;
  color: #999;
}

/* Instance Grid */
.instances-section {
  margin-bottom: 40px;
}

.instances-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
}

.instance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.instance-card {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s;
}

.instance-card:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
  transform: translateY(-2px);
}

.instance-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.instance-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
}

.difficulty-badge {
  display: inline-block;
  background: #ffc107;
  color: #000;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
}

.instance-stats {
  margin-top: 12px;
}

.instance-runs {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 4px;
}

.instance-detail {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 2px;
}

.instance-last {
  font-size: 0.8rem;
  color: #999;
}

/* Friends Section */
.friends-section {
  margin-bottom: 40px;
}

.friends-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
}

.friends-list {
  display: grid;
  gap: 12px;
}

.friend-card {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.friend-card:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.friend-info {
  flex: 1;
}

.friend-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.friend-details {
  font-size: 0.9rem;
  color: #6e7f9b;
}

.friend-time {
  font-size: 0.9rem;
  color: #999;
  text-align: right;
}

/* Activity Heatmap */
.heatmap-section {
  margin-bottom: 40px;
}

.heatmap-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
  text-align: center;
}

.hour-heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 8px;
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
}

.hour-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
}

.hour-cell:hover {
  transform: scale(1.1);
  z-index: 10;
}

.hour-label {
  font-size: 0.7rem;
  margin-bottom: 4px;
}

.hour-count {
  font-size: 1rem;
}

/* Day Chart */
.day-section {
  margin-bottom: 40px;
}

.day-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
  text-align: center;
}

.day-chart {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
}

.day-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.day-bar-row:last-child {
  margin-bottom: 0;
}

.day-label {
  font-weight: 600;
  color: #2c3e50;
  text-align: right;
}

.day-bar-container {
  background: #f0f4f8;
  border-radius: 8px;
  height: 36px;
  position: relative;
}

.day-bar {
  background: linear-gradient(90deg, #9c27b0 0%, #7b1fa2 100%);
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  min-width: 60px;
  transition: width 0.3s ease;
}

.day-count {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Timeline Feed */
.timeline-feed-section {
  margin-bottom: 40px;
}

.timeline-feed-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
}

.timeline-feed {
  display: grid;
  gap: 16px;
}

.timeline-item {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  transition: all 0.2s;
}

.timeline-item:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.timeline-icon {
  font-size: 1.5rem;
  text-align: center;
}

.timeline-content {
  flex: 1;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: #2c3e50;
  font-weight: 600;
}

.timeline-time {
  font-size: 0.85rem;
  color: #999;
  font-weight: 400;
}

.timeline-location {
  font-size: 0.9rem;
  color: #6e7f9b;
  margin-bottom: 8px;
}

.timeline-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #f0f4f8;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* Group Brackets Tab Styles */
.brackets-controls {
  background: linear-gradient(135deg, #eef4ff 0%, #f7fafc 100%);
  border: 1px solid #d4e3fc;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
}

.brackets-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.brackets-search-bar input[type="text"] {
  flex: 2;
  min-width: 250px;
  padding: 10px 16px;
  border: 1px solid #bcd0ee;
  border-radius: 8px;
  font-size: 1rem;
  background: #ffffff;
  margin: 0;
}

.brackets-search-bar input[type="date"] {
  flex: 1;
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid #bcd0ee;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #ffffff;
  margin: 0;
}

.brackets-search-bar button {
  padding: 10px 20px;
  font-size: 0.95rem;
  margin: 0;
}

.brackets-content {
  background: linear-gradient(135deg, #a8d0ff 0%, #86c5ff 100%);
  border-radius: 16px;
  padding: 30px;
  min-height: 400px;
}

.bracket-section {
  margin-bottom: 40px;
}

.bracket-section:last-child {
  margin-bottom: 0;
}

.bracket-section h3 {
  color: #ffffff;
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bracket-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tournament-bracket {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.bracket-main {
  background: #ffffff;
  color: #2456a5;
  border: 2px solid #2456a5;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  min-width: 200px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bracket-connector {
  width: 40px;
  height: 3px;
  background: #ffffff;
  position: relative;
}

.bracket-connector::after {
  content: '';
  position: absolute;
  right: -6px;
  top: -3px;
  width: 0;
  height: 0;
  border-left: 6px solid #ffffff;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.bracket-members {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1;
}

.bracket-member {
  background: #ffffff;
  color: #333333;
  border: 2px solid #2456a5;
  border-radius: 8px;
  padding: 12px;
  min-width: 160px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}

.member-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--class-color, #333333);
}

.member-role {
  font-size: 0.9rem;
  color: #666666;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.member-class-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #999999;
  border-radius: 0 0 6px 6px;
  font-size: 0.75rem;
  color: #ffffff;
  text-align: center;
  line-height: 4px;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.bracket-extra {
  background: #f0f0f0;
  border: 1px solid #cccccc;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.8rem;
  color: #666666;
  margin-top: 6px;
  text-align: center;
}

.bracket-time {
  color: #ffffff;
  font-size: 0.9rem;
  opacity: 0.8;
  text-align: center;
  min-width: 120px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.brackets-loading {
  text-align: center;
  padding: 60px 20px;
  color: #2456a5;
  font-size: 1.2rem;
}

.loading-spinner {
  animation: pulse 2s infinite;
}

.no-results {
  text-align: center;
  color: #ffffff;
  font-size: 1.1rem;
  padding: 40px;
  opacity: 0.8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .social-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .social-tab {
    padding: 10px 16px;
    font-size: 0.9rem;
    white-space: nowrap;
  }

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

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

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

  .companion-card {
    grid-template-columns: 40px 1fr;
    gap: 12px;
  }

  .companion-stats {
    grid-column: 2;
    text-align: left;
    margin-top: 8px;
  }

  .hour-heatmap {
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  }

  .size-bar-row,
  .day-bar-row {
    grid-template-columns: 100px 1fr;
    gap: 12px;
  }

  /* Group Brackets responsive */
  .brackets-search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .brackets-search-bar input[type="text"],
  .brackets-search-bar input[type="date"] {
    min-width: 100%;
    flex: none;
  }

  .tournament-bracket {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .bracket-connector {
    width: 3px;
    height: 20px;
    transform: rotate(90deg);
  }

  .bracket-connector::after {
    right: -3px;
    top: -6px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #ffffff;
    border-bottom: none;
  }

  .bracket-main {
    min-width: 100%;
    order: -1;
  }

  .bracket-members {
    justify-content: center;
  }

  .bracket-member {
    min-width: 140px;
  }

  .bracket-time {
    min-width: 100%;
    order: 1;
  }
}

/* ============================================
   GUILD HALL STYLING
   Single Guild Hall entry in character selector
   ============================================ */

/* Guild Hall specific styling */
.guild-hall-option .char-name {
  color: #654321;
  font-weight: 600;
}

.guild-hall-option .char-emoji {
  filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.6));
}

.guild-hall-option:hover .char-emoji {
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
}

/* Mortality Analysis - Scoped Styles */
#tab-mortality {
  /* All styles are scoped to the mortality tab */
}

/* ==== 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 AREAS ==== */
#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: end;
  height: 120px;
  padding: 1rem 0;
}

#tab-mortality .timeline-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

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

#tab-mortality .timeline-bar .bar-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

/* ==== DEATH CARDS ==== */
#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 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;
}

/* ==== UTILITY CLASSES ==== */
#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;
}

/* ==== RESPONSIVE DESIGN ==== */
@media (max-width: 768px) {
  #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;
  }
}

@media (max-width: 480px) {
  #tab-mortality .stats-grid {
    grid-template-columns: 1fr;
  }

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

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

/* ============================================================
   WhoDASH Landing / Login Page
   Applied via body.wd-landing-page (toggled by main.js)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700;900&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300&display=swap');

body.wd-landing-page {
  background: linear-gradient(135deg, #1a3a6e 0%, #1e4fa0 45%, #2d7dd2 100%) !important;
  min-height: 100vh;
}

body.wd-landing-page .topbar {
  display: none !important;
}

body.wd-landing-page .container {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

#whodash-landing {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

#whodash-landing::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 15% 50%, rgba(255,255,255,0.05) 0%, transparent 65%),
    radial-gradient(ellipse 50% 70% at 85% 60%, rgba(10,25,60,0.28) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.wd-hero {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 60px 80px 80px;
  position: relative;
  z-index: 1;
}

.wd-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: wdHeroIn 0.6s ease both 0s;
}

.wd-eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: rgba(255,255,255,0.35);
}

.wd-logo {
  font-family: 'Cinzel', serif;
  font-size: clamp(3.8rem, 7vw, 6.5rem);
  font-weight: 900;
  color: #fff;
  line-height: 0.88;
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
  text-shadow: 0 2px 40px rgba(10,30,90,0.5);
  animation: wdHeroIn 0.6s ease both 0.07s;
}

.wd-logo span {
  color: #7ec8ff;
  text-shadow: 0 0 40px rgba(126,200,255,0.4);
}

.wd-tagline {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.65);
  margin: 18px 0 52px 0;
  line-height: 1.55;
  max-width: 400px;
  animation: wdHeroIn 0.6s ease both 0.14s;
}

.wd-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
}

.wd-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  animation: wdFeatureIn 0.55s ease both;
}

.wd-feature:nth-child(1) { animation-delay: 0.18s; }
.wd-feature:nth-child(2) { animation-delay: 0.28s; }
.wd-feature:nth-child(3) { animation-delay: 0.38s; }

.wd-feature:hover {
  background: rgba(255,255,255,0.13);
  border-color: rgba(126,200,255,0.35);
  transform: translateX(4px);
}

.wd-feature-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1.4;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.3));
}

.wd-feature-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wd-feature-text strong {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.92);
  text-transform: uppercase;
}

.wd-feature-text span {
  font-family: 'Crimson Pro', serif;
  font-size: 0.93rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.4;
}

.wd-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(255,255,255,0.18) 25%,
    rgba(255,255,255,0.18) 75%,
    transparent 100%);
  flex-shrink: 0;
  z-index: 1;
  margin: 40px 0;
}

.wd-auth-panel {
  flex: 0 0 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  z-index: 1;
}

.wd-auth-card {
  width: 100%;
  background: rgba(255,255,255,0.97);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 32px 80px rgba(8,20,60,0.45), 0 2px 0 rgba(255,255,255,0.9) inset;
  animation: wdCardIn 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) both 0.08s;
}

.wd-auth-title {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a3a6e;
  margin: 0 0 5px 0;
  letter-spacing: 0.04em;
}

.wd-auth-subtitle {
  font-family: 'Crimson Pro', serif;
  font-size: 0.95rem;
  color: #7a8fa8;
  margin: 0 0 26px 0;
}

.wd-auth-card form {
  display: flex;
  flex-direction: column;
}

.wd-auth-card input[type="text"],
.wd-auth-card input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 14px;
  border: 1.5px solid #d8e8f5;
  border-radius: 10px;
  font-size: 0.96rem;
  font-family: 'Crimson Pro', serif;
  background: #f5f9fd;
  color: #1a3a6e;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

.wd-auth-card input[type="text"]:focus,
.wd-auth-card input[type="password"]:focus {
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49,130,206,0.13);
  background: #fff;
}

.wd-auth-card input::placeholder {
  color: #b0bfcc;
  font-style: italic;
}

.wd-btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2d7dd2 0%, #1a3a6e 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 4px 20px rgba(29,78,160,0.4);
  margin: 4px 0 0 0;
}

.wd-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(29,78,160,0.5);
}

.wd-btn-primary:active {
  transform: translateY(0);
}

.wd-btn-secondary {
  width: 100%;
  padding: 11px;
  background: transparent;
  color: #2d7dd2;
  border: 1.5px solid #c5d8ee;
  border-radius: 10px;
  font-family: 'Cinzel', serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
  margin: 8px 0 0 0;
}

.wd-btn-secondary:hover {
  background: #eef5fc;
  border-color: #2d7dd2;
}

.wd-auth-card #loginError,
.wd-auth-card #registerError {
  color: #c53030;
  font-family: 'Crimson Pro', serif;
  font-size: 0.9rem;
  margin: 10px 0 0 0;
  min-height: 18px;
}

.wd-auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 10px;
  color: #b0bfcc;
  font-size: 0.78rem;
  font-family: 'Crimson Pro', serif;
  letter-spacing: 0.05em;
}

.wd-auth-divider::before,
.wd-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2ecf5;
}

@keyframes wdHeroIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes wdFeatureIn {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes wdCardIn {
  from { opacity: 0; transform: translateY(22px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 860px) {
  #whodash-landing { flex-direction: column; }
  .wd-hero { padding: 52px 32px 36px; }
  .wd-divider {
    width: 100%; height: 1px; margin: 0 40px; align-self: auto;
    background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.18) 25%, rgba(255,255,255,0.18) 75%, transparent 100%);
  }
  .wd-auth-panel { flex: unset; padding: 36px 24px 52px; }
}
/* === GLOBAL STYLES === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #3a8dde 0%, #1e3c72 100%);
}

.container {
  width: 100%;
  max-width: 1440px;
  margin: 48px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(30, 60, 114, 0.12);
  padding: 40px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.tab-content {
  display: block;
  padding: 2px 12px;
  background: transparent;
  border-radius: 0 0 8px 8px;
  min-height: 24px;
  box-shadow: 0 2px 8px rgba(49, 130, 206, 0.04);
  margin-bottom: 1px;
  margin-top: 0;
  opacity: 1;
  transition: opacity 0.3s;
}

.tab-content.fade-out {
  opacity: 0;
  transition: opacity 0.2s;
}

.tab-content.fade-in {
  opacity: 1;
  transition: opacity 0.3s;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #2456a5;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 18px;
  border: 1px solid #bcd0ee;
  border-radius: 8px;
  font-size: 1.05rem;
  background: #f7fafc;
}

button,
.btn {
  background: linear-gradient(90deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(49, 130, 206, 0.08);
  margin-right: 8px;
  margin-bottom: 8px;
}

button:hover,
.btn:hover {
  background: linear-gradient(90deg, #2456a5 0%, #3182ce 100%);
  box-shadow: 0 4px 16px rgba(49, 130, 206, 0.16);
}

h1 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 32px;
  font-weight: 700;
  color: #2456a5;
}

h2,
h3 {
  color: #2456a5;
}

.muted {
  color: #6e7f9b;
  margin: 8px 0 0 0;
  font-size: 0.95em;
}

a {
  color: #2456a5;
  text-decoration: underline;
  cursor: pointer;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .container {
    width: 98vw;
    padding: 16px 4vw;
  }

  h1 {
    font-size: 1.3rem;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 14px 6px;
  }

  .tab {
    font-size: 0.95rem;
  }
}

/* --- NAV SECTION START --- */
.topbar {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.08);
  padding: 4px 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 10;
  min-height: 38px;
}

.searchbar-wrapper {
  position: relative;
  width: 75%;
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#sectionSearch {
  width: 100%;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid #bcd0ee;
  font-size: 1rem;
  font-family: 'Segoe UI', Arial, sans-serif;
  outline: none;
  background: #f7fafc;
  box-shadow: 0 1px 4px rgba(30, 60, 114, 0.06);
  margin: 0;
  transition: box-shadow 0.2s, border-color 0.2s;
}

#sectionSearch:focus {
  box-shadow: 0 3px 12px rgba(49, 130, 206, 0.15);
  border-color: #3182ce;
}

#sectionSearch::placeholder {
  color: #9ca3af;
}

.dropdown {
  position: absolute;
  top: 48px;
  left: 0;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(30, 60, 114, 0.18);
  border: 1px solid #e2e8f0;
  padding: 8px;
  max-height: 520px;
  overflow-y: auto;
  font-family: 'Segoe UI', Arial, sans-serif;
  z-index: 1000;
}

.dropdown .search-category {
  padding: 8px 12px 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6e7f9b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.dropdown .search-category:first-child {
  margin-top: 0;
}

.dropdown .section-item {
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 8px;
  color: #2456a5;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
}

.dropdown .section-item .item-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  line-height: 1;
}

.dropdown .section-item .item-content {
  flex: 1;
  min-width: 0;
}

.dropdown .section-item .item-title {
  font-weight: 600;
  color: #2456a5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown .section-item .item-description {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 400;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown .section-item:hover,
.dropdown .section-item.active {
  background: linear-gradient(90deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
}

.dropdown .section-item:hover .item-title,
.dropdown .section-item.active .item-title {
  color: #fff;
}

.dropdown .section-item:hover .item-description,
.dropdown .section-item.active .item-description {
  color: rgba(255, 255, 255, 0.85);
}

.dropdown .no-results {
  padding: 24px;
  text-align: center;
  color: #6e7f9b;
  font-size: 0.95rem;
}

.dropdown .search-loading {
  padding: 16px;
  text-align: center;
  color: #6e7f9b;
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .searchbar-wrapper {
    width: 70%;
  }
}

@media (max-width: 900px) {
  .searchbar-wrapper {
    width: 65%;
  }
}

@media (max-width: 600px) {
  .searchbar-wrapper {
    width: 90%;
  }

  .dropdown .section-item {
    padding: 10px 12px;
  }

  .dropdown .section-item .item-icon {
    font-size: 1.25rem;
    width: 28px;
    height: 28px;
  }
}

.hidden {
  display: none;
}

/* --- NAV SECTION END --- */

/* --- FADE TRANSITIONS --- */
.fade-out {
  opacity: 0 !important;
  transition: opacity 0.3s;
}

.fade-in {
  opacity: 1 !important;
  transition: opacity 0.3s;
}

/* === Character Select (top-left in topbar) === */
.charselect-wrapper {
  position: absolute;
  left: 12px;
  top: 6px;
  display: inline-block;
  z-index: 11;
  /* above topbar content */
}

.charselect-trigger {
  /* Text-only button (no visible box) */
  background: transparent;
  border: 0;
  padding: 4px 0;
  color: #2456a5;
  /* deep blue from your theme */
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  outline: none;
}

.charselect-trigger:focus-visible {
  outline: 2px solid #3182ce;
  border-radius: 6px;
}

.charselect-trigger:hover .charselect-label,
.charselect-trigger:hover .charselect-icon {
  text-decoration: underline;
}

.charselect-icon {
  font-size: 1.05rem;
  /* emoji size */
}

.charselect-caret {
  font-size: 0.9rem;
  color: #6e7f9b;
}

/* Dropdown (white card look, like your .dropdown) */
.charselect-menu {
  position: absolute;
  top: 28px;
  left: 0;
  min-width: 240px;
  max-width: 320px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(30, 60, 114, 0.12);
  border: 1px solid #bcd0ee;
  /* soft blue border to match cards */
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 6px;
  z-index: 100;
}

.charselect-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  color: #2456a5;
  transition: background 0.2s, color 0.2s;
  font-weight: 500;
  user-select: none;
}

.charselect-item:hover,
.charselect-item.active {
  background: linear-gradient(90deg, #2efff5 0%, #fff 100%);
  color: #fff;
}

.charselect-item .char-emoji {
  font-size: 1.1rem;
}

.charselect-item .char-name {
  font-size: 1.02rem;
  font-weight: 600;
}

.charselect-item .char-meta {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 400;
}

.hidden {
  display: none !important;
}

/* Responsive: keep menu usable on mobile */
@media (max-width: 600px) {
  .charselect-menu {
    min-width: 90vw;
    left: 0;
    right: 0;
    margin: 0 auto;
  }
}

/* === WhoDASH dashboard components === */
.dash-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid #bcd0ee;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  margin: 14px 0;
}

.dash-portrait {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e7eef8, #c8d9f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2456a5;
  font-weight: 700;
}

.dash-main {
  display: flex;
  flex-direction: column;
}

.dash-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2456a5;
}

.dash-meta {
  margin-top: 4px;
  color: #6e7f9b;
  font-size: 0.95rem;
}

.dash-gold {
  margin-top: 6px;
  font-weight: 600;
  color: #2456a5;
}

.dash-actions {
  text-align: right;
}

.dash-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2456a5;
  margin-top: 10px;
}

@media (max-width: 700px) {
  .dash-card {
    grid-template-columns: 100%;
  }

  .dash-actions {
    justify-self: end;
  }

  .dash-portrait {
    width: 100%;
    height: 160px;
  }
}

/* Coin badges */
.coin {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  margin-right: 6px;
}

.coin-gold {
  color: #9c6b00;
  background: #fff7e0;
  border: 1px solid #f1d38a;
}

.coin-silver {
  color: #5b6a7a;
  background: #eef2f7;
  border: 1px solid #cfd8e3;
}

.coin-copper {
  color: #7a3b1a;
  background: #f5e9e4;
  border: 1px solid #ddb7a4;
}

/* Tooltip for charts */
.whodat-tip {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  background: #111;
  color: #fff;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 12px;
  line-height: 1.25;
  transform: translate(-50%, -120%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  opacity: 0;
  transition: opacity .08s ease;
}

/* === Travel Log (fragment) === */
.segmented {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  background: #eef4ff;
  border-radius: 10px;
  border: 1px solid #d7e3fb;
}

.segmented-btn {
  padding: 8px 14px;
  border-radius: 8px;
  background: #f7fafc;
  color: #2456a5;
  border: 1px solid #cfe0fb;
  cursor: pointer;
}

.segmented-btn.is-active {
  background: #2456a5;
  color: #fff;
  border-color: #2456a5;
}

.panel.hidden {
  display: none;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card {
  background: #ffffff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 12px;
}

.card-title {
  margin: 0 0 8px 0;
  color: #2456a5;
  font-weight: 600;
}

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead th {
  text-align: left;
  background: #f0f5ff;
  color: #2456a5;
  font-weight: 600;
  padding: 8px;
  border-bottom: 1px solid #d7e3fb;
  cursor: pointer;
}

.table tbody td {
  padding: 8px;
  border-bottom: 1px solid #eef2f9;
}

.table.compact tbody td,
.table.compact thead th {
  padding: 6px;
}

.table.sticky thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.table thead th.sort-asc::after {
  content: " â–²";
  /* or "\25B2" */
}

.table thead th.sort-desc::after {
  content: " â–¼";
  /* or "\25BC" */
}

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

.bar-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: center;
  gap: 8px;
}

.bar-label {
  color: #334e88;
}

.bar {
  --w: 0%;
  position: relative;
  height: 22px;
  border-radius: 10px;
  background: linear-gradient(90deg, #cfe0fb var(--w), #eef4ff var(--w));
  border: 1px solid #d7e3fb;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  color: #2456a5;
  font-weight: 600;
}

/* Travel Log date range layout (optional) */
.date-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

.date-range input[type="datetime-local"] {
  padding: 6px 10px;
  border: 1px solid #bcd0ee;
  border-radius: 8px;
  background: #f7fafc;
  color: #2456a5;
}

/* Icon placeholder cell */
.cell-icon {
  width: 28px;
}

.icon-placeholder {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #eef4ff;
  border: 1px solid #d7e3fb;
}

/* Quality badge pills (Q0ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â€šÂ¬Ã…â€œQ5 typical) */
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid transparent;
}

.pill.q-0 {
  color: #666;
  background: #f2f2f2;
  border-color: #ddd;
}

/* Poor */
.pill.q-1 {
  color: #2456a5;
  background: #eef4ff;
  border-color: #cfe0fb;
}

/* Common */
.pill.q-2 {
  color: #0a7a34;
  background: #e6f6ea;
  border-color: #bfe8ca;
}

/* Uncommon (green) */
.pill.q-3 {
  color: #3a2b96;
  background: #eceaff;
  border-color: #cfc9ff;
}

/* Rare (blue/purple mix) */
.pill.q-4 {
  color: #9c6b00;
  background: #fff7e0;
  border-color: #f1d38a;
}

/* Epic-ish */
.pill.q-5 {
  color: #7a3b1a;
  background: #f5e9e4;
  border-color: #ddb7a4;
}

.q-badge {
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.6;
  display: inline-block;
}

.q-poor {
  background: #6b6b6b;
  color: #fff;
}

.q-common {
  background: #dfe7df;
  color: #2e5b2e;
}

.q-uncommon {
  background: #1eff00;
  color: #033600;
}

.q-rare {
  background: #0070dd;
  color: #fff;
}

.q-epic {
  background: #a335ee;
  color: #fff;
}

.q-legendary {
  background: #ff8000;
  color: #231300;
}

.vault-bars-row {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.vault-bar-block {
  flex: 1 1 0;
  min-width: 220px;
}

.vault-bar-block h4 {
  margin-top: 250;
  margin-bottom: 8px;
}

/* === Achievements (minimal additions) === */

/* Canvas container */
.chart-canvas {
  width: 100%;
  /* height is set via the canvas attribute and scaled by JS DPR */
  display: block;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(30, 60, 114, 0.06);
  margin-bottom: 8px;
}

/* KPI chips (color tokens consistent with theme) */
.chip {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.chip-blue {
  background: #2456a5;
}

.chip-gray {
  background: #6e7f9b;
}

.chip-gold {
  background: #f1d38a;
}

.mini-kpi {
  color: #2456a5;
  font-weight: 600;
  margin: 4px 0;
}

/* Latest 5 list */
.ach-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.ach-item {
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
}

.ach-item .ach-name {
  font-weight: 700;
  color: #2456a5;
}

.ach-item .ach-meta {
  margin-top: 4px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.ach-item .ach-desc {
  margin-top: 6px;
  color: #334e88;
}

/* Reputation vertical column */
.rep-vbar {
  width: 100%;
  height: 0%;
  border-radius: 6px;
  transition: height 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Rainbow-ready reputation styling */
.rep-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}

.rep-name {
  flex: 0 0 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #222;
}

.rep-value {
  flex: 0 0 auto;
  min-width: 64px;
  text-align: right;
  color: #7a7a7a;
  font-variant-numeric: tabular-nums;
}

.rep-bar {
  flex: 1 1 auto;
  height: 16px;
  background: #101314;
  border-radius: 999px;
  overflow: hidden;
}

.rep-fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
}

/* container only */
.rep-fill-inner {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  will-change: width;
}

/* ============================================================================
   DASHBOARD SUMMARY STYLES
   ============================================================================ */

/* Dashboard Sections */
.dashboard-section {
  margin-bottom: 24px;
}

.dashboard-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dashboard-row-three {
  grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 1200px) {
  .dashboard-row-three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   TIPS CARD
   ============================================================================ */
.tips-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.tips-card h3 {
  margin: 0 0 12px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.tips-subtitle {
  color: #6e7f9b;
  font-size: 0.9rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e6eefb;
}

.tips-section-title {
  margin: 16px 0 10px 0;
  color: #2456a5;
  font-size: 0.95rem;
  font-weight: 600;
}

.tips-zones-list,
.tips-notes-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}

.tips-zones-list li {
  padding: 6px 12px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #eef4ff 0%, #f7fafc 100%);
  border-left: 3px solid #3182ce;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #2c5282;
}

.tips-notes-list li {
  padding: 8px 0 8px 20px;
  margin-bottom: 8px;
  position: relative;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #4a5568;
}

.tips-notes-list li:before {
  content: "✱";
  /* or "\2022" for Unicode escape */
  position: absolute;
  left: 6px;
  color: #3182ce;
  font-weight: bold;
}

.tips-card .muted {
  color: #9ca3af;
  font-style: italic;
  text-align: center;
  padding: 20px;
}


/* ============================================================================
   HERO STATS GRID
   ============================================================================ */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.hero-stat {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(30, 60, 114, 0.12);
}

.hero-stat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.hero-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.hero-stat-label {
  font-size: 0.95rem;
  color: #6e7f9b;
  font-weight: 500;
  margin-bottom: 4px;
}

.hero-stat-tier {
  font-size: 0.85rem;
  color: #3182ce;
  font-weight: 600;
  margin-top: 6px;
}

.hero-stat-subtitle {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-top: 4px;
}

/* ============================================================================
   HIGHLIGHTS CARD
   ============================================================================ */
.highlights-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.highlights-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.highlights-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.highlights-list li {
  padding: 14px 0;
  /* Changed from 10px to 14px */
  border-bottom: 1px solid #eef4ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Extended highlights list with more spacing */
.highlights-list-extended li {
  padding: 16px 0;
}

.highlights-list li:last-child {
  border-bottom: none;
}

.hl-icon {
  font-size: 1.1rem;
  margin-right: 8px;
  display: inline-block;
  min-width: 24px;
}

.hl-label {
  color: #6e7f9b;
  font-weight: 500;
}

.highlights-list strong {
  color: #2456a5;
  font-weight: 700;
}

/* ============================================================================
   ACTIVITY HEATMAP
   ============================================================================ */
.activity-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.activity-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.activity-heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16px, 1fr));
  /* Changed from 12px */
  gap: 5px;
  /* Changed from 3px */
  max-width: 100%;
}

.heatmap-cell {
  width: 16px;
  /* Changed from 12px */
  height: 16px;
  /* Changed from 12px */
  border-radius: 3px;
  /* Changed from 2px */
  background: #eef4ff;
  border: 1px solid #d7e3fb;
  transition: all 0.2s;
}

.heatmap-cell[data-intensity="0"] {
  background: #eef4ff;
  border-color: #d7e3fb;
}

.heatmap-cell[data-intensity="1"] {
  background: #c8d9f1;
  border-color: #b8c9e1;
}

.heatmap-cell[data-intensity="2"] {
  background: #9ab8e5;
  border-color: #8aa8d5;
}

.heatmap-cell[data-intensity="3"] {
  background: #5a92d6;
  border-color: #4a82c6;
}

.heatmap-cell[data-intensity="4"] {
  background: #3182ce;
  border-color: #2456a5;
}

.heatmap-cell:hover {
  transform: scale(1.4);
  /* Changed from 1.3 */
  z-index: 10;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  /* Enhanced shadow */
}

/* ============================================================================
   TOP LOOT WIDGET
   ============================================================================ */
.top-loot-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.top-loot-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.top-loot-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-loot-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.top-loot-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.loot-rank {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(49, 130, 206, 0.2);
}

.loot-name {
  color: #334e88;
  font-weight: 600;
  font-size: 0.95rem;
}

.loot-count {
  color: #2456a5;
  font-weight: 700;
  font-size: 1rem;
  background: #eef4ff;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #d7e3fb;
}

/* ============================================================================
   SPARKLINE CHART
   ============================================================================ */
.sparkline-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.sparkline-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.sparkline-canvas {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  background: #f7fafc;
}

.sparkline-info {
  margin-top: 12px;
  padding: 12px;
  background: #eef4ff;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #334e88;
  font-weight: 500;
  text-align: center;
}

.sparkline-tooltip {
  position: absolute;
  display: none;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   ACTIVITY FEED
   ============================================================================ */
.activity-feed-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 600px;
  overflow-y: auto;
}

.activity-feed-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 12px;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.activity-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.activity-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #d7e3fb;
}

.activity-icon-img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid #d7e3fb;
  display: block;
  background: #fff;
}

.activity-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.activity-desc {
  color: #334e88;
  font-size: 0.95rem;
  line-height: 1.4;
}

.activity-desc strong {
  color: #2456a5;
  font-weight: 600;
}

.activity-time {
  color: #6e7f9b;
  font-size: 0.85rem;
}

/* ============================================================================
   REPUTATION LIST (Animated)
   ============================================================================ */
.reputation-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 600px;
  overflow-y: auto;
}

.reputation-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.rep-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f7fafc;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #334e88;
}

.rep-legend .chip {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.rep-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rep-row {
  display: grid;
  grid-template-columns: 150px 1fr 80px;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}

.rep-name {
  color: #2456a5;
  font-weight: 600;
  font-size: 0.95rem;
}

.rep-bar {
  position: relative;
  height: 22px;
  background: #eef4ff;
  border-radius: 11px;
  border: 1px solid #d7e3fb;
  overflow: hidden;
}

.rep-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 11px;
  transition: width 0.5s ease-out;
}

.rep-value {
  text-align: right;
  color: #334e88;
  font-weight: 600;
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .rep-row {
    grid-template-columns: 100%;
    gap: 6px;
  }

  .rep-value {
    text-align: left;
    font-size: 0.85rem;
  }
}

/* ============================================================================
   COIN DISPLAY (from original)
   ============================================================================ */
.coin {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  margin-right: 4px;
  font-size: 0.9rem;
}

.coin-gold {
  color: #9c6b00;
  background: #fff7e0;
  border: 1px solid #f1d38a;
}

.coin-silver {
  color: #5b6a7a;
  background: #eef2f7;
  border: 1px solid #cfd8e3;
}

.coin-copper {
  color: #7a3b1a;
  background: #f5e9e4;
  border: 1px solid #ddb7a4;
}

/* ============================================================================
   UTILITIES
   ============================================================================ */
.muted {
  color: #6e7f9b;
  font-size: 0.95rem;
  font-style: italic;
}

/* ============================================================================
   CHARACTER DASHBOARD STYLES
   ============================================================================ */

/* Character Profile Card */
.char-profile-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.char-header {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e6eefb;
}

.char-avatar {
  flex-shrink: 0;
}

.char-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.char-info {
  flex: 1;
}

.char-name {
  margin: 0 0 8px 0;
  font-size: 2rem;
  font-weight: 700;
  color: #2456a5;
}

.char-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.char-identity {
  font-size: 1rem;
  color: #334e88;
  font-weight: 500;
  line-height: 1.5;
}

.char-level,
.char-class,
.char-race {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.char-level {
  background: #eef4ff;
  color: #2456a5;
  border: 1px solid #d7e3fb;
}

.char-class {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.char-race {
  background: #f5f3ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.char-guild {
  color: #6e7f9b;
  font-size: 0.95rem;
  font-weight: 500;
}

.char-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.char-stat-item {
  text-align: center;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e6eefb;
}

.stat-label {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

/* Stats Dashboard */
.stats-dashboard-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.stats-dashboard-card h3 {
  margin: 0 0 20px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-bar-item {
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border: 1px solid #e6eefb;
}

.stat-bar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.stat-icon {
  font-size: 1.3rem;
}

.stat-name {
  flex: 1;
  font-weight: 600;
  color: #334e88;
  font-size: 0.95rem;
}

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

.stat-bar {
  height: 8px;
  background: #e6eefb;
  border-radius: 4px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, #3182ce 0%, #2456a5 100%);
  transition: width 0.5s ease-out;
  border-radius: 4px;
}

/* Progression Card */
.progression-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.progression-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.progression-canvas {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  background: #f7fafc;
}

.progression-info {
  margin-top: 12px;
  padding: 12px;
  background: #eef4ff;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #334e88;
  text-align: center;
}

/* Leveling Speed Card */
.speed-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.speed-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.speed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.speed-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.speed-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.speed-level {
  font-weight: 700;
  color: #2456a5;
  font-size: 0.95rem;
}

.speed-time {
  color: #334e88;
  font-weight: 500;
  font-size: 0.9rem;
}

.speed-rate {
  background: #eef4ff;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  color: #2456a5;
  font-size: 0.85rem;
  border: 1px solid #d7e3fb;
}

.speed-average {
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #eef4ff 0%, #d7e3fb 100%);
  border-radius: 10px;
  text-align: center;
  color: #334e88;
  font-size: 1rem;
  border: 1px solid #d7e3fb;
}

.speed-average strong {
  color: #2456a5;
  font-size: 1.1rem;
}

/* Milestones Card */
.milestones-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.milestones-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.milestone-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.milestone-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  padding: 14px;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.milestone-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.milestone-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #3182ce 0%, #2456a5 100%);
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(49, 130, 206, 0.2);
}

.milestone-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.milestone-title {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
}

.milestone-desc {
  color: #6e7f9b;
  font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .char-header {
    flex-direction: column;
    text-align: center;
  }

  .char-meta {
    justify-content: center;
  }

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

/* ============================================================================
   CURRENCIES / ECONOMY STYLES
   ============================================================================ */
/* Enhanced Auction Analytics Styles */

/* Analytics Grid Layout */
.analytics-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

.analytics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.analytics-row.full-width {
  grid-template-columns: 1fr;
}

.auction-analytics-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.auction-analytics-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auction-analytics-card h4 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 500;
  color: #475569;
}

/* Sell-Through by Duration */
.sell-through-chart {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.duration-bar-item {
  display: grid;
  grid-template-columns: 60px 1fr 140px;
  gap: 12px;
  align-items: center;
}

.duration-label {
  font-weight: 600;
  color: #334155;
  text-align: right;
}

.duration-bar-bg {
  height: 32px;
  background: #f1f5f9;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.duration-bar-fill {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  transition: width 0.3s ease;
  border-radius: 6px;
}

.duration-bar-text {
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.duration-stats {
  font-size: 0.85rem;
  color: #64748b;
  text-align: right;
}

/* Market Seasonality Heatmaps */
.seasonality-container {
  display: flex;
  gap: 32px;
}

.seasonality-section {
  flex: 1;
}

.day-heatmap,
.hour-heatmap {
  display: grid;
  gap: 8px;
}

.day-heatmap {
  grid-template-columns: repeat(7, 1fr);
}

.hour-heatmap {
  grid-template-columns: repeat(3, 1fr);
}

.heat-cell {
  padding: 16px 12px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s;
}

.heat-cell:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.heat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.heat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

/* Scatter Plot */
.scatter-plot-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scatter-canvas {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.scatter-legend {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #475569;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* Price History Charts */
.price-history-charts {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.price-history-item {
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.price-history-item h4 {
  color: #1e293b;
  font-size: 1rem;
  font-weight: 600;
}

.price-history-item canvas {
  margin-top: 12px;
  display: block;
}

/* Undercut Ladder */
.undercut-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.undercut-item {
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.undercut-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

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

.position-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.position-badge.competitive {
  background: #dcfce7;
  color: #166534;
}

.position-badge.overpriced {
  background: #fef3c7;
  color: #92400e;
}

.undercut-pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-label {
  font-size: 0.85rem;
  color: #64748b;
}

.price-value {
  font-weight: 600;
  color: #1e293b;
}

.undercut-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.undercut-option {
  background: white;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.undercut-option span {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 4px;
}

.undercut-option strong {
  display: block;
  color: #1e293b;
  font-size: 0.9rem;
}

/* Profit Calculator */
.profit-calculator .calculator-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calc-input-group {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  align-items: center;
}

.calc-input-group label {
  font-size: 0.9rem;
  color: #475569;
  font-weight: 500;
}

.calc-input-group input,
.calc-input-group select {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
}

.calc-input-group input:focus,
.calc-input-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.calc-results {
  margin-top: 8px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.calc-result-row:not(:last-child) {
  border-bottom: 1px solid #e2e8f0;
}

.calc-result-row span {
  font-size: 0.9rem;
  color: #64748b;
}

.calc-result-row strong {
  font-size: 1rem;
  font-weight: 600;
}

.calc-total {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 2px solid #cbd5e1 !important;
}

.calc-total span {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

.calc-total strong {
  font-size: 1.25rem;
}

.profit-value.positive {
  color: #16a34a;
}

.profit-value.negative {
  color: #dc2626;
}

/* Performance Table */
.performance-table-container {
  overflow-x: auto;
}

.performance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.performance-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.performance-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.performance-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.performance-table tbody tr:hover {
  background: #f8fafc;
}

.performance-table .item-name {
  font-weight: 600;
  color: #1e293b;
}

.performance-table .success-rate {
  font-weight: 600;
}

.performance-table .success-rate.excellent {
  color: #16a34a;
}

.performance-table .success-rate.good {
  color: #f59e0b;
}

.performance-table .success-rate.poor {
  color: #dc2626;
}

/* Competitor Analysis */
.competitor-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.competitor-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.competitor-rank {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  font-weight: 700;
  border-radius: 8px;
  font-size: 1rem;
}

.competitor-info {
  flex: 1;
}

.competitor-name {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.competitor-stats {
  font-size: 0.85rem;
  color: #64748b;
}

/* Repost Tracker */
.repost-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.repost-item {
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.repost-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.repost-name {
  font-weight: 600;
  color: #1e293b;
}

.repost-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.repost-badge.sold {
  background: #dcfce7;
  color: #166534;
}

.repost-badge.expired {
  background: #fee2e2;
  color: #991b1b;
}

.repost-stats {
  font-size: 0.85rem;
  color: #64748b;
}

/* Utility Classes */
.positive {
  color: #16a34a;
}

.negative {
  color: #dc2626;
}

.muted {
  color: #94a3b8;
  font-style: italic;
}

/* Existing styles compatibility */
.coin {
  font-weight: 600;
  white-space: nowrap;
}

.coin-gold {
  color: #f59e0b;
}

.coin-silver {
  color: #94a3b8;
}

.coin-copper {
  color: #a16207;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .analytics-row {
    grid-template-columns: 1fr;
  }

  .seasonality-container {
    flex-direction: column;
  }

  .undercut-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .auction-analytics-card {
    padding: 16px;
  }

  .duration-bar-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .duration-label {
    text-align: left;
  }

  .duration-stats {
    text-align: left;
  }

  .calc-input-group {
    grid-template-columns: 1fr;
  }

  .undercut-pricing {
    grid-template-columns: 1fr;
  }

  .performance-table {
    font-size: 0.8rem;
  }

  .performance-table th,
  .performance-table td {
    padding: 8px;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.auction-analytics-card {
  animation: fadeIn 0.3s ease-out;
}

.analytics-row:nth-child(1) .auction-analytics-card {
  animation-delay: 0.05s;
}

.analytics-row:nth-child(2) .auction-analytics-card {
  animation-delay: 0.1s;
}

.analytics-row:nth-child(3) .auction-analytics-card {
  animation-delay: 0.15s;
}

.analytics-row:nth-child(4) .auction-analytics-card {
  animation-delay: 0.2s;
}

.analytics-row:nth-child(5) .auction-analytics-card {
  animation-delay: 0.25s;
}

/* Loading state */
.auction-analytics-card.loading {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

/* Empty state */
.auction-analytics-card .muted {
  text-align: center;
  padding: 40px 20px;
  font-size: 0.9rem;
}

/* ===== G/S/C Input Styles ===== */
.gsc-input {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gsc-input input[type="number"] {
  width: 60px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.95rem;
}

.gsc-input .coin-label {
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 15px;
}

.coin-label.coin-gold {
  color: #f59e0b;
}

.coin-label.coin-silver {
  color: #9ca3af;
}

.coin-label.coin-copper {
  color: #b45309;
}

/* ===== Price History Legend ===== */
.price-legend {
  display: flex;
  gap: 16px;
  margin: 12px 0;
  padding: 8px;
  background: #f9fafb;
  border-radius: 4px;
  font-size: 0.85rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* ===== Enhanced Competitor Analysis ===== */
.competitor-analysis-card .competitor-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fafafa;
}

.competitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.competitor-card {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.competitor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
}

.competitor-rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.competitor-name-lg {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
  padding-right: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.competitor-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.competitor-stat {
  text-align: center;
}

.competitor-stat .stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #059669;
  margin-bottom: 2px;
}

.competitor-stat .stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.competitor-items-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.competitor-item-mini {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: white;
  border-radius: 6px;
  font-size: 0.85rem;
  border: 1px solid #f3f4f6;
}

.item-name-mini {
  color: #374151;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 8px;
}

.item-price-mini {
  color: #059669;
  font-weight: 600;
  white-space: nowrap;
}

.competitor-more-mini {
  color: #6b7280;
  font-size: 0.8rem;
  font-style: italic;
  text-align: center;
  padding: 4px 8px;
}

.competitor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.competitor-summary {
  color: #6b7280;
  font-size: 0.85rem;
  margin-left: auto;
}

.competitor-items {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.competitor-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: white;
  border-radius: 4px;
  font-size: 0.9rem;
}

.competitor-item-row .item-name {
  color: #374151;
  font-weight: 500;
}

.competitor-item-row .item-price {
  color: #059669;
  font-weight: 600;
}

.competitor-more {
  color: #6b7280;
  font-size: 0.85rem;
  font-style: italic;
  padding: 4px 8px;
  text-align: center;
}

/* ===== Responsive Updates ===== */
@media (max-width: 640px) {
  .gsc-input {
    flex-direction: column;
    align-items: stretch;
  }

  .gsc-input input[type="number"] {
    width: 100%;
  }

  .price-legend {
    flex-direction: column;
    gap: 8px;
  }

  .competitor-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .competitor-summary {
    margin-left: 0;
  }

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

/* ===== Auction History Table ===== */
.auction-history-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auction-history-card h2 {
  margin: 0 0 20px 0;
  color: #1e3a8a;
  font-size: 1.5rem;
}

.history-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

.history-search {
  flex: 1;
  min-width: 250px;
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.history-search:focus {
  outline: none;
  border-color: #3b82f6;
}

.history-stats {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
}

.history-stats span {
  color: #6b7280;
}

.history-stats strong {
  color: #111827;
  font-weight: 600;
}

.table-container {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 20px;
}

.auction-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.auction-history-table thead {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
}

.auction-history-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  position: relative;
  white-space: nowrap;
}

.auction-history-table th:hover {
  background: rgba(255, 255, 255, 0.1);
}

.auction-history-table th.sorted {
  background: rgba(255, 255, 255, 0.15);
}

.sort-arrow {
  margin-left: 4px;
  font-size: 0.8em;
  opacity: 0.7;
}

.auction-history-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s;
}

.auction-history-table tbody tr:hover {
  background-color: #f9fafb;
}

.auction-history-table tbody tr:last-child {
  border-bottom: none;
}

.auction-history-table td {
  padding: 12px 16px;
  color: #374151;
}

.item-name-cell {
  font-weight: 500;
  color: #1e3a8a;
}

.auction-history-table td.center {
  text-align: center;
}

.history-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.page-btn {
  padding: 8px 16px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.page-btn:hover:not(:disabled) {
  background: #2563eb;
}

.page-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

#pageInfo {
  color: #6b7280;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .history-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .history-search {
    min-width: 100%;
  }

  .history-stats {
    flex-direction: column;
    gap: 8px;
  }

  .auction-history-table {
    font-size: 0.8rem;
  }

  .auction-history-table th,
  .auction-history-table td {
    padding: 8px 12px;
  }
}

/* ===== Profit/Loss Display with Arrows ===== */
.profit-gain {
  color: #059669;
  font-weight: 600;
}

.profit-loss {
  color: #dc2626;
  font-weight: 600;
}

.profit-gain::before,
.profit-loss::before {
  font-weight: 700;
  margin-right: 2px;
}

/* Tab Navigation */
.currency-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.currency-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.currency-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.currency-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

/* Financial Health Card */
.finance-health-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.finance-title {
  margin: 0 0 24px 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #2456a5;
}

.finance-stats-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 20px;
}

.finance-stat-main {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff !important;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.finance-stat-main .stat-label {
  font-size: 1.3rem;
  color: #fff !important;
  opacity: 0.95;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value-huge {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff !important;
}

/* Make coins more readable on green background */
.stat-value-huge .coin-gold {
  color: #fef3c7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.stat-value-huge .coin-silver {
  color: #f3f4f6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.stat-value-huge .coin-copper {
  color: #fed7aa;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.finance-stat {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  text-align: center;
}

.finance-stat .stat-label {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.finance-stat .stat-value {
  font-size: 1.3rem;
  font-weight: 700;
}

.stat-value.positive {
  color: #10b981;
}

.stat-value.negative {
  color: #ef4444;
}

/* Coin Styles */
.coin {
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
  margin: 0 2px;
}

.coin-gold {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
}

.coin-silver {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #9ca3af;
}

.coin-copper {
  background: #fed7aa;
  color: #7c2d12;
  border: 1px solid #f97316;
}

/* Prevent coin wrapping in stat displays */
.stat-value-huge,
.stat-value,
.gph-value,
.calc-text {
  white-space: nowrap;
}

/* Override for green background - white coins with subtle backgrounds */
.stat-value-huge .coin-gold {
  background: rgba(254, 243, 199, 0.25);
  color: #fef3c7;
  border: 1px solid rgba(251, 191, 36, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.stat-value-huge .coin-silver {
  background: rgba(243, 244, 246, 0.25);
  color: #f3f4f6;
  border: 1px solid rgba(156, 163, 175, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.stat-value-huge .coin-copper {
  background: rgba(254, 215, 170, 0.25);
  color: #fed7aa;
  border: 1px solid rgba(249, 115, 22, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Net Worth Chart */
.networth-chart-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.networth-chart-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.networth-canvas {
  width: 100%;
  height: 300px;
  /* Increased from 200px for full-width display */
  border-radius: 8px;
  background: #f7fafc;
}

/* Gold Per Hour Table */
.gph-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 800px;
  /* Increased from 500px for full-width display with 20 rows */
  overflow-y: auto;
}

.gph-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.gph-table {
  width: 100%;
  border-collapse: collapse;
}

.gph-table thead {
  background: #f7fafc;
  position: sticky;
  top: 50px;
  z-index: 1;
}

.gph-table th {
  text-align: left;
  padding: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6e7f9b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e6eefb;
}

.gph-table td {
  padding: 12px;
  border-bottom: 1px solid #f0f4f8;
  color: #334e88;
  font-size: 0.95rem;
}

.gph-table tbody tr:hover {
  background: #f7fafc;
}

.gph-value {
  font-weight: 700;
  color: #10b981;
}

.gph-average {
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #eef4ff 0%, #d7e3fb 100%);
  border-radius: 10px;
  text-align: center;
  color: #334e88;
  font-size: 1rem;
  border: 1px solid #d7e3fb;
}

.gph-average strong {
  color: #10b981;
  font-size: 1.1rem;
}

/* Milestones */
.milestones-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.milestones-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.milestone-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.milestone-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  padding: 14px;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.milestone-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.milestone-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(251, 191, 36, 0.3);
}

.milestone-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.milestone-title {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
}

.milestone-desc {
  color: #6e7f9b;
  font-size: 0.85rem;
}

/* Epic Flying Calculator */
.epic-flying-calc {
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
  border-radius: 12px;
  border: 2px solid #fb923c;
}

.calc-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #c2410c;
  margin-bottom: 12px;
  text-align: center;
}

.calc-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-bar {
  height: 24px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #fb923c;
}

.calc-fill {
  height: 100%;
  background: linear-gradient(90deg, #fb923c 0%, #f97316 100%);
  transition: width 0.5s ease-out;
}

.calc-text {
  text-align: center;
  font-weight: 600;
  color: #c2410c;
  font-size: 0.95rem;
}

/* Recent Loot */
.recent-loot-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.recent-loot-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.loot-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.loot-item {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border-radius: 10px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.loot-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.loot-name {
  font-weight: 600;
  font-size: 0.95rem;
}

/* WoW Item Quality Colors */
.quality-poor {
  color: #9d9d9d;
}

.quality-common {
  color: #334e88;
}

.quality-uncommon {
  color: #1eff00;
  font-weight: 700;
}

.quality-rare {
  color: #0070dd;
  font-weight: 700;
}

.quality-epic {
  color: #a335ee;
  font-weight: 700;
}

.quality-legendary {
  color: #ff8000;
  font-weight: 700;
}

.loot-source {
  color: #6e7f9b;
  font-size: 0.85rem;
}

.loot-time {
  color: #6e7f9b;
  font-size: 0.85rem;
  font-style: italic;
}

/* Responsive */
@media (max-width: 1200px) {
  .finance-stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .gph-table {
    font-size: 0.85rem;
  }

  .gph-table th,
  .gph-table td {
    padding: 8px;
  }
}

/* ============================================================================
   AUCTION HOUSE STYLES
   ============================================================================ */

/* Auction Performance Card */
.auction-performance-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.auction-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.auction-stat {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  text-align: center;
}

/* Active Auctions */
.active-auctions-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.active-auctions-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.auction-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auction-item {
  display: grid;
  grid-template-columns: 2fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.auction-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.auction-name {
  font-weight: 600;
  color: #2456a5;
  font-size: 0.95rem;
}

.auction-price {
  font-weight: 700;
  color: #10b981;
  font-size: 0.95rem;
}

.auction-time {
  color: #6e7f9b;
  font-size: 0.85rem;
  font-style: italic;
}

/* Success Rate Card */
.success-rate-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.success-rate-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.success-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.success-circle {
  display: flex;
  justify-content: center;
  align-items: center;
  /* This ensures the SVG fills available space */
  width: 100%;
  max-width: 280px;
}

.success-circle svg {
  width: 100%;
  height: auto;
  /* This prevents any layout shift */
  display: block;
}

.success-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  width: 100%;
}

.success-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.success-label {
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.success-value {
  font-size: 1.75rem;
  font-weight: 700;
}

.success-value.sold {
  color: #10b981;
}

.success-value.expired {
  color: #ef4444;
}

/* Responsive adjustment for smaller screens */
@media (max-width: 768px) {
  .success-circle {
    max-width: 240px;
  }

  .success-circle svg {
    width: 100%;
    height: auto;
  }

  .success-stats {
    gap: 24px;
  }

  .success-value {
    font-size: 1.5rem;
  }
}

/* Best Sellers Table */
.best-sellers-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.best-sellers-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.best-sellers-table {
  width: 100%;
  border-collapse: collapse;
}

.best-sellers-table thead {
  background: #f7fafc;
}

.best-sellers-table th {
  text-align: left;
  padding: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6e7f9b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e6eefb;
}

.best-sellers-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #f0f4f8;
  color: #334e88;
  font-size: 0.95rem;
}

.best-sellers-table tbody tr:hover {
  background: #f7fafc;
}

.best-sellers-table .rank {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
  border-radius: 8px;
  text-align: center;
  line-height: 32px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 12px;
}

@media (max-width: 1200px) {
  .auction-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .currency-tabs {
    flex-direction: column;
  }

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

/* Configuration Upload Progress Bar */

.upload-progress-container {
  max-width: 600px;
  margin: 40px auto;
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.progress-bar-wrapper {
  margin: 24px 0;
}

.progress-bar-container {
  height: 40px;
  background: #e6eefb;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(45deg,
      #2456a5 25%,
      #ffffff 25%,
      #ffffff 50%,
      #2456a5 50%,
      #2456a5 75%,
      #ffffff 75%,
      #ffffff);
  background-size: 40px 40px;
  border-radius: 20px;
  transition: width 0.3s ease;
  animation: candy-cane 1s linear infinite;
  box-shadow: 0 2px 8px rgba(36, 86, 165, 0.3);
}

@keyframes candy-cane {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 40px 40px;
  }
}

.progress-text {
  text-align: center;
  margin-top: 16px;
  font-size: 1rem;
  color: #2456a5;
  font-weight: 600;
  min-height: 24px;
}

.progress-message {
  text-align: center;
  margin-top: 8px;
  font-size: 0.9rem;
  color: #6e7f9b;
  font-style: italic;
  min-height: 20px;
}

/* ============================================================================
   TRAVEL LOG STYLES (Matching Currencies Design)
   ============================================================================ */

/* Container */
.travel-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation (Reusing currencies style) */
.travel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.travel-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.travel-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.travel-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

/* Tab Content */
.travel-tab-content {
  display: none;
}

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

.travel-content-wrapper {
  margin-top: 24px;
}

/* ===== Journal Tab (Overview Stats) ===== */

.travel-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.travel-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.travel-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

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

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

.stat-label {
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-sublabel {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 4px;
}

/* Favorite Zone Card */
.favorite-zone-card {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #fbbf24;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
  margin-bottom: 24px;
}

.favorite-zone-card h3 {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  color: #92400e;
}

.favorite-zone-name {
  font-size: 2rem;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 12px;
}

.favorite-zone-stats {
  font-size: 1rem;
  color: #92400e;
  font-weight: 600;
}

/* Zone Timeline Graph */
.zone-timeline-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  margin-bottom: 24px;
}

.zone-timeline-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.zone-timeline-canvas {
  width: 100%;
  height: auto;
  max-width: 1000px;
  display: block;
}

/* ===== Log Tab (Searchable Table) ===== */

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.log-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.log-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.zone-search-input,
.date-input {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.zone-search-input {
  min-width: 200px;
}

.date-input {
  min-width: 140px;
}

.zone-search-input:focus,
.date-input:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.clear-filters-btn {
  padding: 8px 16px;
  background: #f0f4f8;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  color: #2456a5;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-filters-btn:hover {
  background: #e6eefb;
  border-color: #2456a5;
}

.log-table-container {
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  margin-bottom: 12px;
}

.pagination-info {
  text-align: right;
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
}

.travel-log-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.travel-log-table thead {
  background: linear-gradient(135deg, #2456a5 0%, #1e4a8f 100%);
  color: #fff;
}

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

.travel-log-table tbody tr {
  border-bottom: 1px solid #e6eefb;
  transition: background 0.15s;
}

.travel-log-table tbody tr:hover {
  background: #f7fafc;
}

.travel-log-table tbody tr:last-child {
  border-bottom: none;
}

.travel-log-table td {
  padding: 12px 16px;
  color: #374151;
}

.travel-log-table td.muted {
  color: #9ca3af;
  font-size: 0.9rem;
}

/* ===== Heatmap Tab ===== */

.heatmap-section,
.transitions-section,
.subzone-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.heatmap-section h3,
.transitions-section h3,
.subzone-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

/* Heatmap Bars */
.heatmap-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.heatmap-bar-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.heatmap-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.zone-name {
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.zone-percentage {
  font-weight: 700;
  color: #2456a5;
  font-size: 0.9rem;
}

.heatmap-bar-track {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.heatmap-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.5s ease-out;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.heatmap-stats {
  font-size: 0.85rem;
  color: #6e7f9b;
}

/* Zone Transitions */
.transitions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transition-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e6eefb;
}

.transition-route {
  display: flex;
  align-items: center;
  gap: 12px;
}

.from-zone,
.to-zone {
  font-weight: 600;
  color: #374151;
}

.transition-arrow {
  color: #2456a5;
  font-size: 1.2rem;
}

.transition-count {
  font-weight: 600;
  color: #2456a5;
  font-size: 0.9rem;
  background: #eef4ff;
  padding: 4px 12px;
  border-radius: 12px;
}

/* Subzone Table */
.subzone-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.subzone-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.subzone-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.subzone-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.subzone-table tbody tr:hover {
  background: #f7fafc;
}

.subzone-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
  .travel-stats-grid {
    grid-template-columns: 1fr;
  }

  .travel-tabs {
    flex-wrap: wrap;
  }

  .travel-tab {
    flex: 1;
    min-width: 100px;
  }
}

/* ============================================================================
   PROGRESSION / RAIDS STYLES
   ============================================================================ */

/* Container */
.prog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation */
.prog-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.prog-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.prog-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.prog-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

.prog-content-wrapper {
  margin-top: 24px;
}

/* ===== Overview Tab ===== */

.prog-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.prog-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.prog-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

/* Raid Progression */
.raid-progression-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.raid-progression-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.raid-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.raid-card:last-child {
  margin-bottom: 0;
}

.raid-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 12px;
}

.raid-difficulty-row {
  display: grid;
  grid-template-columns: 120px 1fr 80px;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.raid-difficulty-row:last-child {
  margin-bottom: 0;
}

.diff-name {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.raid-progress-bar {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.raid-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  transition: width 0.5s ease-out;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.raid-progress-text {
  font-weight: 700;
  color: #2456a5;
  font-size: 0.9rem;
  text-align: right;
}

/* Difficulty Breakdown */
.difficulty-breakdown-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.difficulty-breakdown-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
  align-self: flex-start;
}

.difficulty-pie-chart {
  margin-bottom: 20px;
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 400px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  font-weight: 600;
  color: #374151;
}

.legend-value {
  color: #6e7f9b;
  font-weight: 600;
}

/* ===== Boss Kills Tab ===== */

.boss-kills-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.boss-kills-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.boss-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.boss-search-input,
.difficulty-filter {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.boss-search-input {
  min-width: 220px;
}

.difficulty-filter {
  min-width: 160px;
}

.boss-search-input:focus,
.difficulty-filter:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.boss-kills-table-container {
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  margin-bottom: 12px;
}

.boss-kills-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.boss-kills-table thead {
  background: linear-gradient(135deg, #2456a5 0%, #1e4a8f 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.boss-kills-table tbody tr {
  border-bottom: 1px solid #e6eefb;
  transition: background 0.15s;
}

.boss-kills-table tbody tr:hover {
  background: #f7fafc;
}

.boss-kills-table td {
  padding: 12px 16px;
  color: #374151;
}

.difficulty-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.diff-normal {
  background: #e0f2fe;
  color: #0369a1;
}

.diff-heroic {
  background: #fef3c7;
  color: #92400e;
}

.diff-mythic {
  background: #fce7f3;
  color: #9f1239;
}

/* ===== Lockouts Tab ===== */

.lockouts-section,
.lockout-history-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.lockouts-section h3,
.lockout-history-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.lockouts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.lockout-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
}

.lockout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.lockout-instance {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
}

.lockout-difficulty {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6e7f9b;
  background: #e6eefb;
  padding: 4px 8px;
  border-radius: 4px;
}

.lockout-progress {
  margin-bottom: 12px;
}

.lockout-progress-bar {
  height: 20px;
  background: #e6eefb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
}

.lockout-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-radius: 10px;
  transition: width 0.5s ease-out;
}

.lockout-progress-text {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 600;
}

.lockout-reset {
  font-size: 0.9rem;
  color: #374151;
  font-weight: 600;
}

.extended-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Lockout History Table */
.lockout-history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.lockout-history-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.lockout-history-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.lockout-history-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.lockout-history-table tbody tr:hover {
  background: #f7fafc;
}

.lockout-history-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
  .prog-stats-grid {
    grid-template-columns: 1fr;
  }

  .prog-tabs {
    flex-wrap: wrap;
  }

  .prog-tab {
    flex: 1;
    min-width: 100px;
  }

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

/* ============================================================================
   QUESTS STYLES
   ============================================================================ */

/* Container */
.quest-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation */
.quest-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.quest-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.quest-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.quest-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

.quest-content-wrapper {
  margin-top: 24px;
}

/* ===== Overview Tab ===== */

.quest-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.quest-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.quest-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

/* Most Rewarding Quest Card */
.most-rewarding-quest-card {
  background: linear-gradient(135deg, #ffe064 0%, #775f00 100%);
  border: 2px solid #fbbf24;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
  margin-bottom: 24px;
}

.most-rewarding-quest-card h3 {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  color: #92400e;
}

.rewarding-quest-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 12px;
}

.rewarding-quest-details {
  display: flex;
  gap: 20px;
  justify-content: center;
  font-size: 1.1rem;
  color: #92400e;
  font-weight: 600;
}

/* Quest Trends */
.quest-trends-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.quest-trends-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.quest-trends-canvas {
  width: 100%;
  height: auto;
  max-width: 1000px;
  display: block;
}

/* Quests by Zone */
.quests-by-zone-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.quests-by-zone-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.zone-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zone-bar-container {
  display: grid;
  grid-template-columns: 200px 1fr 60px;
  align-items: center;
  gap: 12px;
}

.zone-bar-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.zone-bar-track {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
}

.zone-bar-fill {
  height: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  transition: width 0.5s ease-out;
}

.zone-bar-count {
  font-weight: 700;
  color: #2456a5;
  text-align: right;
}

/* ===== Quest Log Tab ===== */

.quest-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.quest-log-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.quest-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.quest-search-input,
.level-input {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.quest-search-input {
  min-width: 220px;
}

.level-input {
  width: 90px;
}

.quest-search-input:focus,
.level-input:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.quest-log-table-container {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  margin-bottom: 24px;
}

.quest-log-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.quest-log-table thead {
  background: linear-gradient(135deg, #2456a5 0%, #1e4a8f 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.quest-log-table tbody tr {
  border-bottom: 1px solid #e6eefb;
  transition: background 0.15s;
}

.quest-log-table tbody tr:hover {
  background: #f7fafc;
}

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

/* Notable Quests */
.notable-quests-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.notable-quests-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.notable-quests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.notable-quest-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
}

.notable-quest-card h4 {
  margin: 0 0 12px 0;
  color: #2456a5;
  font-size: 1rem;
}

.notable-quest-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notable-quest-card li {
  padding: 6px 0;
  color: #374151;
  font-size: 0.9rem;
  border-bottom: 1px solid #e6eefb;
}

.notable-quest-card li:last-child {
  border-bottom: none;
}

/* ===== Rewards Tab ===== */

.reward-quality-section,
.reward-slot-section,
.top-rewards-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.reward-quality-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reward-quality-section h3,
.reward-slot-section h3,
.top-rewards-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
  align-self: flex-start;
}

.quality-pie-chart {
  margin-bottom: 20px;
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 400px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  font-weight: 600;
  color: #374151;
}

.legend-value {
  color: #6e7f9b;
  font-weight: 600;
}

/* Slot Distribution */
.slot-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slot-bar-container {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  align-items: center;
  gap: 12px;
}

.slot-bar-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.slot-bar-track {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
}

.slot-bar-fill {
  height: 100%;
  background: linear-gradient(135deg, #3182ce 0%, #1e4a8f 100%);
  border-radius: 12px;
  transition: width 0.5s ease-out;
}

.slot-bar-count {
  font-weight: 700;
  color: #2456a5;
  text-align: right;
}

/* Top Rewards Gallery */
.reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.reward-card {
  background: linear-gradient(135deg, #262b33 0%, #1e5275 100%);
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 12px;
}

.reward-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.reward-count {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .quest-stats-grid {
    grid-template-columns: 1fr;
  }

  .quest-tabs {
    flex-wrap: wrap;
  }

  .quest-tab {
    flex: 1;
    min-width: 100px;
  }

  .zone-bar-container,
  .slot-bar-container {
    grid-template-columns: 150px 1fr 50px;
  }

  .notable-quests-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   PROFESSIONS / SKILLS STYLES
   ============================================================================ */

/* Container */
.prof-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation */
.prof-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.prof-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.prof-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.prof-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

.prof-content-wrapper {
  margin-top: 24px;
}

/* ===== Overview Tab ===== */

.prof-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.prof-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.prof-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

/* Professions Section */
.professions-section,
.secondary-section,
.recipe-counts-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.professions-section h3,
.secondary-section h3,
.recipe-counts-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.profession-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.profession-card {
  background: linear-gradient(135deg, #f7fafc 0%, #eef4ff 100%);
  border: 1px solid #d7e3fb;
  border-radius: 8px;
  padding: 16px;
}

.profession-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.profession-name {
  font-weight: 700;
  color: #2456a5;
  font-size: 1.1rem;
}

.profession-rank {
  font-weight: 600;
  color: #6e7f9b;
  font-size: 0.95rem;
}

.profession-progress-bar {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}

.profession-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  transition: width 0.5s ease-out;
}

.profession-stats {
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
}

/* Secondary Skills */
.secondary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.secondary-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
}

.secondary-name {
  font-weight: 700;
  color: #374151;
  margin-bottom: 12px;
  font-size: 1rem;
}

.secondary-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.secondary-progress-bar {
  flex: 1;
  height: 20px;
  background: #e6eefb;
  border-radius: 10px;
  overflow: hidden;
}

.secondary-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #3182ce 0%, #1e4a8f 100%);
  border-radius: 10px;
  transition: width 0.5s ease-out;
}

.secondary-rank {
  font-weight: 600;
  color: #2456a5;
  font-size: 0.9rem;
  min-width: 60px;
  text-align: right;
}

/* Recipe Counts Table */
.recipe-counts-table {
  width: 100%;
  border-collapse: collapse;
}

.recipe-counts-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.recipe-counts-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.recipe-counts-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.recipe-counts-table tbody tr:hover {
  background: #f7fafc;
}

.recipe-counts-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

/* ===== Recipes Tab ===== */

.recipes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.recipes-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.recipe-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.recipe-search-input,
.profession-filter {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.recipe-search-input {
  min-width: 220px;
}

.profession-filter {
  min-width: 160px;
}

.recipe-search-input:focus,
.profession-filter:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.recipe-cards-container {
  margin-bottom: 24px;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.recipe-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

.recipe-card-name {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
  margin-bottom: 8px;
}

.recipe-card-profession {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 600;
  margin-bottom: 6px;
}

.recipe-card-type {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 4px;
}

.recipe-card-cooldown {
  font-size: 0.85rem;
  color: #f59e0b;
  font-weight: 600;
  margin-top: 8px;
}

/* Notable Recipes */
.notable-recipes-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.notable-recipe-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.notable-recipe-card h4 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.1rem;
}

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

.notable-recipe-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f7fafc;
  border-radius: 6px;
  border: 1px solid #e6eefb;
}

.recipe-name {
  font-weight: 600;
  color: #374151;
  flex: 1;
}

.recipe-prof,
.recipe-cooldown {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .prof-stats-grid {
    grid-template-columns: 1fr;
  }

  .prof-tabs {
    flex-wrap: wrap;
  }

  .prof-tab {
    flex: 1;
    min-width: 100px;
  }

  .profession-cards,
  .secondary-cards,
  .recipe-grid {
    grid-template-columns: 1fr;
  }

  .notable-recipes-section {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   ACHIEVEMENTS STYLES
   ============================================================================ */

/* Container */
.ach-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation */
.ach-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.ach-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.ach-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.ach-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

.ach-content-wrapper {
  margin-top: 24px;
}

/* ===== Overview Tab ===== */

.ach-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.ach-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ach-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

/* Categories */
.category-section,
.recent-achievements-section,
.highest-achievements-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.category-section h3,
.recent-achievements-section h3,
.highest-achievements-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.category-card {
  background: linear-gradient(135deg, #f7fafc 0%, #eef4ff 100%);
  border: 1px solid #d7e3fb;
  border-radius: 8px;
  padding: 16px;
}

.category-name {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
  margin-bottom: 12px;
}

.category-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
}

/* Recent Achievements */
.recent-achievements-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-achievement-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  gap: 16px;
}

.achievement-content {
  flex: 1;
}

.achievement-name {
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 4px;
}

.achievement-desc {
  font-size: 0.85rem;
  color: #6e7f9b;
}

.achievement-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.achievement-points {
  font-weight: 700;
  color: #f59e0b;
  font-size: 0.95rem;
}

.achievement-date {
  font-size: 0.85rem;
  color: #9ca3af;
}

/* Highest Achievements Table */
.highest-achievements-table {
  width: 100%;
  border-collapse: collapse;
}

.highest-achievements-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.highest-achievements-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.highest-achievements-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.highest-achievements-table tbody tr:hover {
  background: #f7fafc;
}

.highest-achievements-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

.points-cell {
  color: #f59e0b;
  font-weight: 700;
}

/* ===== Collections Tab ===== */

.mounts-section,
.pets-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.mounts-section h3,
.pets-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.collection-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.collection-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

.collection-card.active-mount,
.collection-card.active-pet {
  border: 2px solid #10b981;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.collection-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
}

.collection-icon-placeholder {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: #e6eefb;
  border-radius: 8px;
}

.collection-name {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.active-badge {
  margin-top: 8px;
  padding: 4px 8px;
  background: #10b981;
  color: #fff;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ===== Timeline Tab ===== */

.spam-days-section,
.monthly-graph-section,
.timeline-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.spam-days-section h3,
.monthly-graph-section h3,
.timeline-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

/* Spam Days */
.spam-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.spam-day-card {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #fbbf24;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.spam-day-date {
  font-weight: 700;
  color: #92400e;
  font-size: 1rem;
  margin-bottom: 8px;
}

.spam-day-stats {
  font-size: 0.9rem;
  color: #78350f;
  font-weight: 600;
}

.spam-day-count {
  margin-bottom: 4px;
}

/* Monthly Graph */
.monthly-graph-canvas {
  width: 100%;
  height: auto;
  max-width: 1000px;
  display: block;
}

/* Timeline */
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.timeline-search {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  min-width: 250px;
  transition: border-color 0.2s;
}

.timeline-search:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 600px;
  overflow-y: auto;
}

.timeline-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
}

.timeline-date {
  min-width: 120px;
  font-weight: 600;
  color: #6e7f9b;
  font-size: 0.9rem;
}

.timeline-achievement {
  flex: 1;
}

.timeline-name {
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 6px;
}

.timeline-points {
  font-size: 0.85rem;
  color: #f59e0b;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .ach-stats-grid {
    grid-template-columns: 1fr;
  }

  .ach-tabs {
    flex-wrap: wrap;
  }

  .ach-tab {
    flex: 1;
    min-width: 100px;
  }

  .category-grid,
  .collection-grid,
  .spam-days-grid {
    grid-template-columns: 1fr;
  }

  .recent-achievement-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .achievement-meta {
    align-items: flex-start;
  }

  .timeline-item {
    flex-direction: column;
    gap: 8px;
  }

  .timeline-date {
    min-width: auto;
  }
}

/* ===== ITEMS PAGE STYLES - CONSOLIDATED & FIXED ===== */

/* Tab styling */
.items-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 8px;
}

.items-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 500;
  font-size: 1rem;
  color: #6b7280;
  transition: all 0.2s;
}

.items-tab:hover {
  color: #1e3a8a;
  background: #f3f4f6;
  border-radius: 8px 8px 0 0;
}

.items-tab.active {
  color: #1e3a8a;
  border-bottom-color: #1e3a8a;
  font-weight: 600;
}

.items-tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

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

/* Vault Overview */
.vault-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.vault-stat-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
  padding: 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vault-stat-icon {
  font-size: 3rem;
  opacity: 0.9;
}

.vault-stat-content {
  flex: 1;
}

.vault-stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 4px;
}

.vault-stat-value {
  font-size: 2rem;
  font-weight: 700;
}

/* Vault Sections */
.vault-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.vault-section h3 {
  margin: 0 0 20px 0;
  color: #1e3a8a;
  font-size: 1.3rem;
}

/* Quality Chart */
.quality-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quality-bar {
  display: grid;
  grid-template-columns: 120px 1fr 80px;
  align-items: center;
  gap: 12px;
}

.quality-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.quality-bar-fill {
  height: 24px;
  border-radius: 4px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.quality-bar:hover .quality-bar-fill {
  opacity: 1;
}

.quality-count {
  text-align: right;
  font-weight: 700;
  color: #111827;
}

/* Vault Items List */
.vault-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vault-item-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  transition: background 0.2s;
}

.vault-item-row:hover {
  background: #f3f4f6;
}

.vault-item-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.vault-item-ilvl {
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 600;
}

.vault-item-location {
  color: #6b7280;
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 500;
}

/* Bags/Bank/Mail - Grid Display */
.bag-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bag-container h3 {
  margin: 0 0 20px 0;
  color: #1e3a8a;
  font-size: 1.2rem;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.item-card {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.item-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.item-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  border: 2px solid #d1d5db;
}

/* Item card text - DARK version (used in bags/bank/mail) */
.item-name-dark {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  /* Quality color applied via inline style - NO text shadow needed */
}

.item-count-dark {
  font-size: 1rem;
  color: #111827;
  font-weight: 700;
}

.item-ilvl-dark {
  font-size: 0.85rem;
  color: #374151;
  margin-top: 4px;
  font-weight: 600;
}

.item-sender-dark {
  font-size: 0.8rem;
  color: #374151;
  margin-top: 4px;
  font-style: italic;
  font-weight: 500;
}

/* Combined Tab */
.combined-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.combined-container h3 {
  margin: 0 0 20px 0;
  color: #1e3a8a;
  font-size: 1.3rem;
}

.combined-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

.combined-search {
  flex: 1;
  min-width: 250px;
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.combined-search:focus {
  outline: none;
  border-color: #3b82f6;
}

.combined-count {
  color: #6b7280;
  font-size: 0.95rem;
}

.combined-count strong {
  color: #111827;
  font-weight: 600;
}

.combined-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.combined-table thead {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
}

.combined-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.combined-table th:hover {
  background: rgba(255, 255, 255, 0.1);
}

.combined-table th.sorted {
  background: rgba(255, 255, 255, 0.15);
}

.sort-arrow {
  margin-left: 4px;
  font-size: 0.8em;
  opacity: 0.7;
}

.combined-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s;
}

.combined-table tbody tr:hover {
  background-color: #f9fafb;
}

.combined-table tbody td {
  padding: 12px 16px;
  color: #111827;
}

.combined-table tbody td strong {
  font-weight: 700;
}

.combined-table td.center {
  text-align: center;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .vault-overview {
    grid-template-columns: 1fr;
  }

  .vault-item-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
  }

  .item-icon {
    width: 48px;
    height: 48px;
  }

  .combined-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .combined-search {
    min-width: 100%;
  }

  .combined-table {
    font-size: 0.8rem;
  }

  .combined-table th,
  .combined-table td {
    padding: 8px 12px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.muted {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Dashboard Tabs */
.dashboard-tabs {
  display: flex;
  gap: 8px;
  margin: 24px 0;
  border-bottom: 2px solid #e2e8f0;
  padding: 0 20px;
}

.dashboard-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #64748b;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: -2px;
}

.dashboard-tab:hover {
  color: #2456a5;
  background: #f8fafc;
}

.dashboard-tab.active {
  color: #2456a5;
  border-bottom-color: #2456a5;
  background: #f8fafc;
}

.dashboard-content-wrapper {
  padding: 20px;
}

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

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

/* Gear Tab - Paper Doll */
.paperdoll-card {
  min-height: auto;
  margin-bottom: 20px;
}

.upgrade-opportunities-card {
  width: 100%;
}

.paperdoll {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  margin-top: 20px;
}

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

.paperdoll-center {
  justify-content: center;
  gap: 20px;
}

.equipment-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: #001933;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.equipment-slot:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.equipment-slot.empty {
  opacity: 0.6;
}

.equipment-slot.needs-upgrade {
  border-color: #ff0000;
  background: #370000;
}

.slot-icon {
  width: 40px;
  height: 40px;
  border: 2px solid #9d9d9d;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: #1e293b;
  flex-shrink: 0;
  position: relative;
}

.slot-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.slot-icon.empty-slot {
  background: #e2e8f0;
  color: #94a3b8;
  border-color: #cbd5e1;
}

.slot-info {
  flex: 1;
  min-width: 0;
}

.slot-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-ilvl {
  font-size: 0.85rem;
  color: #64748b;
}

.slot-empty {
  font-size: 0.85rem;
  color: #94a3b8;
  font-style: italic;
}

.upgrade-flag {
  font-size: 0.75rem;
  color: #f59e0b;
  font-weight: 600;
}

/* Upgrade Opportunities */
.upgrade-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.upgrade-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #181400;
  border: 2px solid #ffdd00;
  border-radius: 8px;
}

.upgrade-slot {
  font-weight: 700;
  color: #92400e;
  min-width: 80px;
}

.upgrade-info {
  flex: 1;
}

.upgrade-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.upgrade-deficit {
  font-size: 0.85rem;
  color: #78350f;
  margin-top: 4px;
}

.deficit-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #dc2626;
  color: white;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
  margin-left: 8px;
}

.success-message {
  color: #16a34a;
  font-weight: 600;
  padding: 20px;
  text-align: center;
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  border-radius: 8px;
  margin-top: 16px;
}

/* Stats Tab */
.stats-bars-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.stat-bar-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-bar-label {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
}

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

.stat-bar-container {
  width: 100%;
  height: 24px;
  background: #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.3s ease;
  position: relative;
}

.stat-bar-fill.health {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

.stat-bar-fill.mana {
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
}

.stat-bar-fill.ilvl {
  background: linear-gradient(90deg, #7c3aed 0%, #a855f7 100%);
}

/* Stat Trends */
.trends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.trend-item {
  padding: 16px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  text-align: center;
}

.trend-label {
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.trend-indicator {
  font-size: 1.3rem;
  font-weight: 700;
}

.trend-indicator.up {
  color: #16a34a;
}

.trend-indicator.down {
  color: #dc2626;
}

.trend-indicator.neutral {
  color: #64748b;
}

/* Talent Points Tab */
.talents-card {
  max-width: 100%;
}

.talent-trees-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.talent-tree-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
}

.talent-tree-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.talent-tree-header h4 {
  margin: 0;
  color: #1e293b;
  font-size: 1.1rem;
}

.talent-tree-points {
  font-weight: 700;
  color: #2456a5;
  font-size: 1.1rem;
}

.talent-tree-bar-container {
  width: 100%;
  height: 20px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.talent-tree-bar {
  height: 100%;
  background: linear-gradient(90deg, #2456a5 0%, #3b6fd9 100%);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.talent-tree-percentage {
  text-align: center;
  font-weight: 600;
  color: #64748b;
  font-size: 0.9rem;
}

.talents-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.talent-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.talent-item:hover {
  border-color: #2456a5;
  box-shadow: 0 2px 8px rgba(36, 86, 165, 0.1);
}

.talent-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  position: relative;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  font-size: 1.2rem;
}

.talent-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.talent-rank {
  position: absolute;
  bottom: -6px;
  right: -6px;
  background: #2456a5;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 2px solid white;
}

.talent-info {
  flex: 1;
  min-width: 0;
}

.talent-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.talent-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .paperdoll {
    grid-template-columns: 1fr;
  }

  .paperdoll-center {
    flex-direction: row;
    justify-content: space-around;
  }

  .talent-trees-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-tabs {
    overflow-x: auto;
    padding: 0 10px;
  }

  .dashboard-tab {
    padding: 10px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
  }
}

/* ========================================
   MORTALITY SECTION STYLES - Light Theme
   ======================================== */

/* Mortality Header */
.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;
}

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

/* Death Subtitle */
.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 */
.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 */
.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 */
.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 Chart */
.death-trend-chart {
  grid-column: 1 / -1;
  width: 100%;
  height: 250px;
  margin-top: 15px;
  background: #f8fafc;
  border-radius: 8px;
}

/* Interesting Stats Grid */
.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 */
.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 */
.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 */
.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;
}

.muted {
  color: #94a3b8;
  font-style: italic;
}

/* Override dash-card for mortality to allow proper 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;
}

/* Tab content visibility */
.mortality-tab-content {
  display: none;
}

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

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

/* Responsive adjustments */
@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 some 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;
  }
}

@media (max-width: 480px) {

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

/* ==========================================================================
   WhoDASH Quests - Enhanced Styles for Quest Events & Timeline
   Add this to your existing CSS file or include it separately
   ========================================================================== */

/* Current Quest Log Section */
.current-quest-log-section {
  margin-bottom: 2rem;
}

.current-quest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.current-quest-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s;
}

.current-quest-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.current-quest-card.quest-complete {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #22c55e;
}

.quest-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.quest-card-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: #1f2937;
  flex: 1;
}

.quest-complete-badge {
  background: #22c55e;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.quest-objectives {
  margin: 0.75rem 0;
}

.objective-item {
  padding: 0.5rem;
  margin: 0.25rem 0;
  background: #f9fafb;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #4b5563;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.objective-item.objective-complete {
  background: #d1fae5;
  color: #065f46;
  text-decoration: line-through;
}

.objective-progress {
  margin-left: auto;
  font-weight: 600;
  color: #6366f1;
}

.quest-card-footer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.85rem;
}

/* Quest Event History Section */
.quest-event-history-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
}

.quest-event-timeline {
  max-height: 600px;
  overflow-y: auto;
  margin-top: 1rem;
  padding-right: 0.5rem;
}

.quest-event-timeline::-webkit-scrollbar {
  width: 8px;
}

.quest-event-timeline::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.quest-event-timeline::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.quest-event-timeline::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.quest-event-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #cbd5e1;
  transition: all 0.2s;
}

.quest-event-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.event-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 50%;
}

.event-content {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.event-kind {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: #e5e7eb;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #4b5563;
  margin-bottom: 0.25rem;
}

.event-detail {
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: #f3f4f6;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #6b7280;
}

.event-time {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Success stat card highlight */
.stat-card-success {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #22c55e !important;
}

.stat-card-success .stat-value {
  color: #16a34a;
}

/* Quest Level Distribution */
.quest-level-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.level-bars {
  margin-top: 1rem;
}

.level-bar-container {
  display: grid;
  grid-template-columns: 80px 1fr 60px;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.level-bar-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4b5563;
}

.level-bar-track {
  height: 28px;
  background: #f1f5f9;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.level-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 14px;
  transition: width 0.5s ease;
}

.level-bar-count {
  text-align: right;
  font-weight: 600;
  color: #6366f1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .current-quest-grid {
    grid-template-columns: 1fr;
  }

  .quest-event-item {
    flex-direction: column;
    gap: 0.75rem;
  }

  .event-icon {
    width: 100%;
    height: 48px;
  }

  .level-bar-container {
    grid-template-columns: 60px 1fr 50px;
    gap: 0.75rem;
  }
}

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

.quest-stat-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s;
}

.quest-stat-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 500;
}

.stat-sublabel {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

/* Canvas containers */
.quest-trends-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.quest-trends-canvas,
.quest-timeline-canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

/* ===================================================================
   Combat Analytics Styles
   =================================================================== */

/* Tab Navigation */
.combat-tabs-container {
  margin-bottom: 32px;
}

.combat-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
}

.combat-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  bottom: -2px;
}

.combat-tab:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.combat-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.combat-tab-content {
  position: relative;
}

.combat-tab-pane {
  display: none;
}

.combat-tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* Combat Overview Card */
.combat-overview-card {
  background: linear-gradient(135deg, #991b1b 0%, #450a0a 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.combat-title {
  color: #f1f5f9;
  font-size: 1.75rem;
  margin: 0 0 24px 0;
  font-weight: 600;
}

.combat-stats-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .combat-stats-grid {
    grid-template-columns: 1fr;
  }
}

.combat-stat-main {
  grid-column: span 1;
  text-align: center;
  padding: 24px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 12px;
  border: 2px solid rgba(239, 68, 68, 0.3);
}

.combat-stat {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.stat-value-huge {
  font-size: 3rem;
  font-weight: 700;
  color: #ef4444;
  margin: 8px 0;
  text-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 8px 0;
}

.stat-value.highlight {
  color: #fbbf24;
}

.stat-label {
  font-size: 0.875rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.stat-sublabel {
  font-size: 0.875rem;
  color: #cbd5e1;
  margin-top: 4px;
}

/* Chart Cards */
.dps-chart-card,
.combat-breakdown-card,
.instance-performance-card,
.dps-distribution-card,
.role-performance-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.dps-chart-card h3,
.combat-breakdown-card h3,
.instance-performance-card h3,
.dps-distribution-card h3,
.role-performance-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.dps-canvas,
.combat-breakdown-card canvas,
.instance-performance-card canvas,
.dps-distribution-card canvas {
  display: block;
  margin: 20px auto;
}

/* Pie Chart Legend */
.pie-legend {
  margin-top: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px;
  background: #f8fafc;
  border-radius: 6px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.legend-label {
  flex: 1;
  color: #475569;
  font-weight: 500;
}

.legend-value {
  color: #64748b;
  font-weight: 600;
}

/* Boss Encounters Table */
.boss-table-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.boss-table-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.boss-table-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.filter-buttons {
  display: flex;
  gap: 8px;
}

.filter-btn {
  padding: 8px 16px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.filter-btn.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.table-wrapper {
  overflow-x: auto;
  margin-bottom: 16px;
}

.boss-encounters-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.boss-encounters-table thead {
  background: #f8fafc;
}

.boss-encounters-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.boss-encounters-table th:hover {
  background: #f1f5f9;
}

.boss-encounters-table th.sorted {
  background: #e0e7ff;
  color: #3b82f6;
}

.sort-arrow {
  margin-left: 4px;
  font-size: 12px;
  color: #94a3b8;
}

.boss-encounters-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s;
}

.boss-encounters-table tbody tr:hover {
  background: #f8fafc;
}

.boss-encounters-table td {
  padding: 12px 16px;
  color: #334155;
}

.boss-name {
  font-weight: 600;
  color: #1e293b;
}

.dps-value {
  font-weight: 600;
  color: #64748b;
}

.dps-value.high-dps {
  color: #10b981;
}

.table-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.page-btn {
  padding: 8px 16px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  border-color: #3b82f6;
  color: #3b82f6;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* DPS Distribution */
.percentiles-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .percentiles-info {
    grid-template-columns: 1fr;
  }
}

.percentile-item {
  text-align: center;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
}

.percentile-label {
  display: block;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.percentile-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: #06b6d4;
}

/* Role Performance */
.role-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .role-stats-grid {
    grid-template-columns: 1fr;
  }
}

.role-stat {
  text-align: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
}

/* Section styling */
.combat-section {
  margin-bottom: 48px;
}

.section-title {
  color: #1e293b;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 3px solid #e2e8f0;
}

/* Utility classes */
.muted {
  color: #94a3b8;
  text-align: center;
  padding: 20px;
}

.positive {
  color: #10b981;
}

.negative {
  color: #ef4444;
}

/* ===================================================================
   NEW DPS-SPECIFIC COMPONENTS
   =================================================================== */

/* Burst vs Sustained Analysis */
.burst-analysis-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.burst-analysis-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.burst-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .burst-comparison {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .burst-divider {
    display: none;
  }
}

.burst-item {
  text-align: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
}

.burst-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}

.burst-desc {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 12px;
}

.burst-value {
  font-size: 2rem;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 8px;
}

.burst-value.highlight {
  color: #dc2626;
}

.burst-count {
  font-size: 0.875rem;
  color: #64748b;
}

.burst-divider {
  font-size: 1.5rem;
  font-weight: 700;
  color: #cbd5e1;
}

.burst-insight {
  padding: 16px;
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #1e40af;
}

/* Target Type Analysis */
.target-analysis-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.target-analysis-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.target-comparison {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .target-comparison {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .target-divider {
    display: none;
  }
}

.target-item {
  text-align: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
}

.target-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 12px;
}

.target-value {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.target-value.boss {
  color: #7c3aed;
}

.target-value.adds {
  color: #f97316;
}

.target-detail {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.target-count {
  font-size: 0.875rem;
  color: #94a3b8;
}

.target-divider {
  background: linear-gradient(to bottom, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
}

.target-insight {
  padding: 16px;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #92400e;
}

/* Consistency Metrics */
.consistency-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.consistency-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.consistency-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 968px) {
  .consistency-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .consistency-grid {
    grid-template-columns: 1fr;
  }
}

.consistency-item {
  text-align: center;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.consistency-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.consistency-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #334155;
}

.consistency-rating {
  font-size: 1.25rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  display: inline-block;
}

.consistency-rating.excellent {
  background: #d1fae5;
  color: #065f46;
}

.consistency-rating.good {
  background: #dbeafe;
  color: #1e40af;
}

.consistency-rating.average {
  background: #fef3c7;
  color: #92400e;
}

.consistency-rating.poor {
  background: #fee2e2;
  color: #991b1b;
}

.consistency-insight {
  padding: 16px;
  background: #f0f9ff;
  border-left: 4px solid #0ea5e9;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #075985;
}

/* ===================================================================
   Healing Analytics Styles (Green Theme for Healers)
   =================================================================== */

/* Tab Navigation */
.healing-tabs-container {
  margin-bottom: 32px;
}

.healing-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
}

.healing-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  bottom: -2px;
}

.healing-tab:hover {
  color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.healing-tab.active {
  color: #10b981;
  border-bottom-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.healing-tab-content {
  position: relative;
}

.healing-tab-pane {
  display: none;
}

.healing-tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

/* Healing Overview Card */
.healing-overview-card {
  background: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.healing-title {
  color: #f1f5f9;
  font-size: 1.75rem;
  margin: 0 0 24px 0;
  font-weight: 600;
}

.healing-stats-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .healing-stats-grid {
    grid-template-columns: 1fr;
  }
}

.healing-stat-main {
  grid-column: span 1;
  text-align: center;
  padding: 24px;
  background: rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  border: 2px solid rgba(16, 185, 129, 0.4);
}

.healing-stat {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

/* Chart Cards */
.hps-chart-card,
.healing-breakdown-card,
.instance-performance-card,
.hps-distribution-card,
.overheal-analysis-card,
.efficiency-metrics-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.hps-chart-card h3,
.healing-breakdown-card h3,
.instance-performance-card h3,
.hps-distribution-card h3,
.overheal-analysis-card h3,
.efficiency-metrics-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.hps-canvas,
.healing-breakdown-card canvas,
.instance-performance-card canvas,
.hps-distribution-card canvas {
  display: block;
  margin: 20px auto;
}

/* Healing Encounters Table */
.healing-table-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.healing-table-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.healing-table-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.healing-encounters-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.healing-encounters-table thead {
  background: #f8fafc;
}

.healing-encounters-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.healing-encounters-table th:hover {
  background: #f1f5f9;
}

.healing-encounters-table th.sorted {
  background: #d1fae5;
  color: #10b981;
}

.healing-encounters-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s;
}

.healing-encounters-table tbody tr:hover {
  background: #f8fafc;
}

.healing-encounters-table td {
  padding: 12px 16px;
  color: #334155;
}

.target-name {
  font-weight: 600;
  color: #1e293b;
}

.hps-value {
  font-weight: 600;
  color: #64748b;
}

.hps-value.high-hps {
  color: #10b981;
}

.overheal-value.low-overheal {
  color: #10b981;
  font-weight: 600;
}

.overheal-value.high-overheal {
  color: #ef4444;
  font-weight: 600;
}

/* Overheal Analysis */
.overheal-by-type {
  margin-bottom: 24px;
}

.overheal-by-type h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.type-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.type-item {
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.type-label {
  font-weight: 600;
  color: #475569;
  text-transform: capitalize;
}

.type-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #64748b;
}

.type-value.low-overheal {
  color: #10b981;
}

.type-value.high-overheal {
  color: #ef4444;
}

.type-count {
  margin-left: auto;
  color: #94a3b8;
  font-size: 0.875rem;
}

.improvement-opportunities {
  margin-top: 24px;
}

.improvement-opportunities h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.opportunities-table {
  width: 100%;
  border-collapse: collapse;
}

.opportunities-table thead {
  background: #fef2f2;
}

.opportunities-table th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: #991b1b;
  font-size: 0.875rem;
}

.opportunities-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
}

/* Efficiency Metrics */
.efficiency-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

.efficiency-section h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.efficiency-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.efficiency-item {
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #e2e8f0;
  transition: all 0.2s;
}

.efficiency-item:hover {
  background: #f1f5f9;
  border-left-color: #10b981;
}

.efficiency-target {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.efficiency-stats {
  display: flex;
  gap: 12px;
  font-size: 0.875rem;
}

.efficiency-hps {
  color: #10b981;
  font-weight: 600;
}

.efficiency-overheal {
  font-weight: 600;
}

.efficiency-date {
  color: #94a3b8;
  margin-left: auto;
}

/* Section styling */
.healing-section {
  margin-bottom: 48px;
}

/* Utility classes for healing */
.low-overheal {
  color: #10b981;
}

.high-overheal {
  color: #ef4444;
}

/* ===================================================================
   Tanking Analytics Styles (Blue/Steel Theme for Tanks)
   =================================================================== */

/* Tab Navigation */
.tanking-tabs-container {
  margin-bottom: 32px;
}

.tanking-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
}

.tanking-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  bottom: -2px;
}

.tanking-tab:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.tanking-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.tanking-tab-content {
  position: relative;
}

.tanking-tab-pane {
  display: none;
}

.tanking-tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

/* Tanking Overview Card */
.tanking-overview-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.tanking-title {
  color: #f1f5f9;
  font-size: 1.75rem;
  margin: 0 0 24px 0;
  font-weight: 600;
}

.tanking-stats-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .tanking-stats-grid {
    grid-template-columns: 1fr;
  }
}

.tanking-stat-main {
  grid-column: span 1;
  text-align: center;
  padding: 24px;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  border: 2px solid rgba(59, 130, 246, 0.4);
}

.tanking-stat {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

/* Chart Cards */
.dtps-chart-card,
.tanking-breakdown-card,
.instance-performance-card,
.dtps-distribution-card,
.death-analysis-card,
.survivability-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.dtps-chart-card h3,
.tanking-breakdown-card h3,
.instance-performance-card h3,
.dtps-distribution-card h3,
.death-analysis-card h3,
.survivability-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.dtps-canvas,
.tanking-breakdown-card canvas,
.instance-performance-card canvas,
.dtps-distribution-card canvas {
  display: block;
  margin: 20px auto;
}

/* Tanking Encounters Table */
.tanking-table-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.tanking-table-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.tanking-table-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tanking-encounters-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tanking-encounters-table thead {
  background: #f8fafc;
}

.tanking-encounters-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.tanking-encounters-table th:hover {
  background: #f1f5f9;
}

.tanking-encounters-table th.sorted {
  background: #dbeafe;
  color: #3b82f6;
}

.tanking-encounters-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s;
}

.tanking-encounters-table tbody tr:hover {
  background: #f8fafc;
}

.tanking-encounters-table td {
  padding: 12px 16px;
  color: #334155;
}

.dtps-value {
  font-weight: 600;
  color: #64748b;
}

.dtps-value.high-dtps {
  color: #3b82f6;
}

.outcome {
  font-weight: 600;
}

.outcome.survived {
  color: #10b981;
}

.outcome.died {
  color: #ef4444;
}

/* Death Analysis */
.death-analysis-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.death-section h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.killer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.killer-item {
  padding: 12px;
  background: #fef2f2;
  border-radius: 8px;
  border-left: 4px solid #ef4444;
  display: flex;
  align-items: center;
  gap: 8px;
}

.killer-label {
  font-weight: 600;
  color: #991b1b;
  text-transform: capitalize;
}

.killer-count {
  margin-left: auto;
  color: #dc2626;
  font-weight: 700;
}

.hotspot-table,
.recent-deaths-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.hotspot-table thead,
.recent-deaths-table thead {
  background: #fef2f2;
}

.hotspot-table th,
.recent-deaths-table th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: #991b1b;
}

.hotspot-table td,
.recent-deaths-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.death-count-cell {
  color: #dc2626;
  font-weight: 700;
}

/* Survivability Metrics */
.survivability-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

.surv-section h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.surv-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.surv-item {
  padding: 12px;
  background: #f0fdf4;
  border-radius: 8px;
  border-left: 4px solid #10b981;
  transition: all 0.2s;
}

.surv-item.dangerous {
  background: #fef2f2;
  border-left-color: #ef4444;
}

.surv-item:hover {
  background: #dcfce7;
}

.surv-item.dangerous:hover {
  background: #fee2e2;
}

.surv-target {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.surv-stats {
  display: flex;
  gap: 12px;
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.surv-dtps {
  color: #3b82f6;
  font-weight: 600;
}

.surv-duration {
  color: #10b981;
  font-weight: 600;
}

.surv-duration.negative {
  color: #ef4444;
}

.surv-damage {
  color: #64748b;
}

.surv-zone {
  color: #94a3b8;
}

.surv-date {
  color: #94a3b8;
  margin-left: auto;
}

/* Section styling */
.tanking-section {
  margin-bottom: 48px;
}

/* Utility classes for tanking */
.high-dtps {
  color: #3b82f6;
}

/* ===================================================================
   Role Performance - Unified Multi-Role Analytics Styles
   =================================================================== */

/* Main Role Tabs (Top Level) */
.role-main-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  border-bottom: 3px solid #e2e8f0;
  padding-bottom: 0;
  flex-wrap: wrap;
}

.role-main-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  background: transparent;
  border: none;
  border-bottom: 4px solid transparent;
  font-size: 1.125rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  bottom: -3px;
}

.role-main-tab:hover {
  background: rgba(0, 0, 0, 0.02);
  color: #334155;
}

.role-main-tab.active {
  color: #1e293b;
  background: rgba(0, 0, 0, 0.02);
  border-bottom-color: #6366f1;
}

.role-main-tab .tab-icon {
  font-size: 1.5rem;
}

.role-main-tab .tab-label {
  font-size: 1rem;
}

/* Role Tab Panes */
.role-tab-panes {
  position: relative;
  min-height: 400px;
}

.role-pane {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.role-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* ===================================================================
   OVERVIEW TAB STYLES
   =================================================================== */

.role-overview-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 24px 0;
}

.primary-role-badge {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 1.125rem;
  margin: 0 auto 32px auto;
  text-align: center;
  display: block;
  width: fit-content;
}

.primary-role-badge.damage {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
  border: 2px solid #ef4444;
}

.primary-role-badge.tanking {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  border: 2px solid #3b82f6;
}

.primary-role-badge.healing {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border: 2px solid #10b981;
}

/* Role Stats Grid */
.role-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

@media (max-width: 1024px) {
  .role-stats-grid {
    grid-template-columns: 1fr;
  }
}

.role-stat-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.role-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.role-stat-card.damage {
  border-top: 4px solid #ef4444;
}

.role-stat-card.tanking {
  border-top: 4px solid #3b82f6;
}

.role-stat-card.healing {
  border-top: 4px solid #10b981;
}

.role-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f1f5f9;
}

.role-card-icon {
  font-size: 2rem;
}

.role-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.role-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.role-stat {
  text-align: center;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.role-stat-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 4px;
}

.role-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.role-stat-value.positive {
  color: #10b981;
}

.role-stat-value.negative {
  color: #ef4444;
}

.role-card-footer {
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

/* Role Distribution Chart */
.role-distribution-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 32px;
  text-align: center;
}

.role-distribution-card h3 {
  margin: 0 0 24px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.role-distribution-card canvas {
  display: block;
  margin: 0 auto 24px auto;
}

/* Pie Legend */
.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  font-weight: 600;
  color: #334155;
}

.legend-value {
  color: #64748b;
  font-size: 0.875rem;
}

/* Role Insights */
.role-insights {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.role-insights h3 {
  margin: 0 0 20px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.insight-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insight-list li {
  padding: 12px 16px;
  background: #f8fafc;
  border-left: 4px solid #6366f1;
  border-radius: 8px;
  color: #334155;
  line-height: 1.6;
}

.insight-list li strong {
  color: #1e293b;
  font-weight: 700;
}

.insight-list li strong.positive {
  color: #10b981;
}

.insight-list li strong.negative {
  color: #ef4444;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .role-main-tabs {
    gap: 8px;
  }

  .role-main-tab {
    padding: 12px 16px;
    font-size: 0.9375rem;
  }

  .role-main-tab .tab-icon {
    font-size: 1.25rem;
  }

  .role-main-tab .tab-label {
    font-size: 0.875rem;
  }

  .role-overview-title {
    font-size: 1.5rem;
  }

  .primary-role-badge {
    font-size: 1rem;
    padding: 10px 20px;
  }

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

/* ===========================================================================
   STYLE.CSS FIXES - Text Contrast and Visual Improvements
   ========================================================================== */

/* FIX #3: Enhanced Equipment Slot Backgrounds */
.equipment-slot.dark-bg {
  background: linear-gradient(135deg, #111314 0%, #3a4567 100%);
  padding: 8px;
  border-radius: 8px;
}

.equipment-slot.dark-bg .slot-ilvl {
  color: #e0e7ff !important;
  font-weight: 600;
}

/* FIX #1: Enhanced Quick Stats Styling */
.quick-stats-grid.enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.quick-stat.enhanced-stat {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.quick-stat.enhanced-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(36, 86, 165, 0.15);
  border-color: #3182ce;
}

.quick-stat.enhanced-stat .stat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.quick-stat.enhanced-stat .quick-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.quick-stat.enhanced-stat .quick-stat-label {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* FIX #2: Leveling Speed Vertical Bar Chart */
.leveling-speed-chart {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 180px;
  padding: 20px 10px 10px;
  background: linear-gradient(to bottom, #f7fafc 0%, #ffffff 100%);
  border-radius: 8px;
  margin: 16px 0;
}

.speed-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 60px;
}

.speed-bar-container {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.speed-bar {
  width: 70%;
  background: linear-gradient(to top, #3182ce 0%, #60a5fa 100%);
  border-radius: 4px 4px 0 0;
  transition: all 0.3s ease;
  box-shadow: 0 -2px 4px rgba(49, 130, 206, 0.3);
}

.speed-bar:hover {
  background: linear-gradient(to top, #2563eb 0%, #3b82f6 100%);
  box-shadow: 0 -4px 8px rgba(37, 99, 235, 0.4);
}

.speed-bar-label {
  margin-top: 8px;
  font-size: 0.75rem;
  color: #475569;
  font-weight: 600;
  text-align: center;
}

.speed-average {
  text-align: center;
  margin-top: 16px;
  padding: 12px;
  background: #eef4ff;
  border-radius: 6px;
  color: #334155;
  font-size: 0.95rem;
}

.speed-average strong {
  color: #2456a5;
  font-weight: 700;
}

/* FIX #7: Highlights List Icon Alignment */
.highlights-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
}

.highlights-list li {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e6eefb;
}

.highlights-list li:last-child {
  border-bottom: none;
}

.highlights-list .hl-icon {
  font-size: 1.5rem;
  margin-right: 12px;
  min-width: 32px;
  text-align: center;
}

.highlights-list .hl-label {
  color: #64748b;
  margin-right: 8px;
  flex: 1;
}

.highlights-list strong {
  color: #2456a5;
  font-weight: 700;
  margin-left: auto;
}

/* FIX #9, #11, #12, #19, #20: Text Contrast Improvements for Travel Log, Professions, Achievements, Progression, Quests */
.stat-value,
.travel-stat-card .stat-value,
.profession-stat-value,
.achievement-stat-value,
.progression-stat-value,
.quest-stat-value {
  color: #1e40af !important;
  /* Darker blue for better contrast */
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Ensure all stat labels have good contrast */
.stat-label,
.travel-stat-card .stat-label,
.profession-stat-label,
.achievement-stat-label,
.progression-stat-label,
.quest-stat-label {
  color: #475569 !important;
  font-weight: 600 !important;
}

/* Fix for zone percentages and counts in Travel Log */
.zone-percentage,
.zone-bar-count {
  color: #1e40af !important;
  font-weight: 700 !important;
}

/* Fix for any light text on light backgrounds */
.light-bg .text-stat,
.travel-stats-grid .stat-value,
.profession-card .stat-value,
.achievement-card .stat-value,
.progression-card .stat-value,
.quest-card .stat-value {
  color: #1e3a8a !important;
  font-weight: 700 !important;
}

/* Improve readability of all numbers in stats cards */
.stat-number,
.count-display,
.value-display {
  color: #1e40af;
  font-weight: 700;
  font-size: 1.1em;
}

/* Make sure sub-labels are also readable */
.stat-sublabel,
.count-sublabel {
  color: #64748b;
  font-weight: 500;
}

/* Override for Combat/Damage Overview - White text, no shadows */
.combat-overview-card .stat-value,
.combat-overview-card .stat-label {
  color: #ffffff !important;
  text-shadow: none !important;
}

/* Override for Tanking Overview - White text, no shadows */
.tanking-overview-card .stat-value,
.tanking-overview-card .stat-label {
  color: #ffffff !important;
  text-shadow: none !important;
}

/* Override for Healing Overview - White text, no shadows */
.healing-overview-card .stat-value,
.healing-overview-card .stat-label {
  color: #ffffff !important;
  text-shadow: none !important;
}

/* Make trend charts responsive */
.dps-canvas,
.hps-canvas,
.dtps-canvas {
  display: block;
  margin: 20px auto;
}

/* Dashboard Styles - Minimal Enhancement */

/* Quick Stats Grid with Icon Boxes */
.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.quick-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.quick-stat:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.quick-stat-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.quick-stat-content {
  flex: 1;
  min-width: 0;
}

.quick-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}

.quick-stat-label {
  font-size: 13px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Leveling Speed Bar Graph - Increased Size */
.level-speed-bars {
  margin-top: 8px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.level-speed-bar {
  display: grid;
  grid-template-columns: 60px 1fr 80px;
  gap: 12px;
  align-items: center;
}

.level-speed-label {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-align: right;
}

.level-speed-bar-track {
  height: 28px;
  background: transparent;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.level-speed-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1976d2, #42a5f5);
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  min-width: 2px;
}

.level-speed-time {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* Recent Milestones - Smaller, Scrollable */
.milestone-timeline {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Custom scrollbar styling */
.milestone-timeline::-webkit-scrollbar {
  width: 8px;
}

.milestone-timeline::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.milestone-timeline::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.milestone-timeline::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.milestone-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 6px;
  flex-shrink: 0;
}

.milestone-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFA000;
  border-radius: 8px;
}

.milestone-content {
  flex: 1;
  min-width: 0;
}

.milestone-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.milestone-desc {
  font-size: 12px;
  color: #666;
}

/* Highlight important milestones */
.milestone-important .milestone-icon {
  background: #E91E63;
}

/* ===================================================================
   Enhanced Mortality Section Styles
   Styles for confidence badges, death cards, killing blows, etc.
   =================================================================== */

/* 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;
}

.conf-none {
  background: #ef4444;
}

.confidence-score-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 1.1em;
  font-weight: 700;
  color: white;
}

.confidence-score-mini {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 600;
  color: white;
}

/* Confidence Distribution */
.confidence-bars {
  margin: 16px 0;
}

.confidence-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.confidence-bar-label {
  font-size: 0.9em;
  font-weight: 600;
  color: #475569;
  text-transform: capitalize;
}

.confidence-bar-container {
  background: #e2e8f0;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
}

.confidence-bar-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.confidence-bar-value {
  font-size: 0.9em;
  font-weight: 600;
  color: #1e293b;
  text-align: right;
}

.accuracy-summary {
  margin-top: 20px;
  padding: 16px;
  background: #f1f5f9;
  border-radius: 8px;
  text-align: center;
}

.accuracy-score {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 1.1em;
}

.accuracy-label {
  font-weight: 600;
  color: #475569;
}

.accuracy-value {
  font-size: 1.5em;
  font-weight: 700;
  color: #22c55e;
}

/* Detection Methods Table */
.detection-methods-table {
  width: 100%;
  border-collapse: collapse;
}

.detection-methods-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f1f5f9;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #cbd5e1;
}

.detection-methods-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.detection-methods-table tr:hover {
  background: #f8fafc;
}

/* Death Statistics Enhancements */
.death-stats-secondary {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9em;
}

.stat-label {
  color: #64748b;
  font-weight: 500;
}

.stat-value {
  font-weight: 700;
  color: #1e293b;
}

/* Lethal Spell Showcase */
.lethal-spell-showcase {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 12px;
  margin: 16px 0;
}

.spell-icon {
  font-size: 3em;
  margin-bottom: 8px;
}

.spell-name {
  font-size: 1.3em;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 12px;
}

.spell-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
}

.spell-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spell-stat-value {
  font-size: 1.5em;
  font-weight: 700;
  color: #92400e;
}

.spell-stat-label {
  font-size: 0.85em;
  color: #78350f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.additional-stats {
  margin-top: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}

/* Chart Legend */
.chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

/* Interesting Stats */
.interesting-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-item-large {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f1f5f9;
  border-radius: 8px;
}

.stat-icon {
  font-size: 2.5em;
}

.stat-content {
  flex: 1;
}

.stat-value-large {
  font-size: 1.8em;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.stat-label-large {
  font-size: 0.9em;
  color: #64748b;
  margin-top: 4px;
}

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

@media (max-width: 768px) {
  .deaths-grid {
    grid-template-columns: 1fr;
  }
}

/* Death Card */
.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;
}

/* Mortality Header */
.mortality-header {
  text-align: center;
  margin-bottom: 32px;
}

.mortality-header h1 {
  font-size: 2.5em;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.mortality-subtitle {
  font-size: 1.1em;
  color: #64748b;
}

/* Death Subtitle */
.death-subtitle {
  text-align: center;
  font-size: 1.2em;
  font-weight: 600;
  color: #3b82f6;
  margin-bottom: 20px;
}

/* Death Stats Grid */
.death-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 20px 0;
}

@media (max-width: 768px) {
  .death-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.death-stat-item {
  text-align: center;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.death-stat-value {
  font-size: 2em;
  font-weight: 700;
  color: #d32f2f;
  line-height: 1;
}

.death-stat-label {
  font-size: 0.85em;
  color: #64748b;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Arch Nemesis */
.arch-nemesis-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nemesis-main {
  text-align: center;
}

.nemesis-name {
  font-size: 1.8em;
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 4px;
}

.nemesis-subtitle {
  font-size: 0.9em;
  color: #64748b;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nemesis-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.nemesis-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

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

.danger-zone {
  padding: 16px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-radius: 8px;
  text-align: center;
}

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

.danger-zone-name {
  font-size: 1.3em;
  font-weight: 700;
  color: #7f1d1d;
  margin-bottom: 4px;
}

.danger-zone-deaths {
  font-size: 0.9em;
  color: #991b1b;
}

/* Boss Death Table */
.boss-death-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.boss-death-table th {
  text-align: left;
  padding: 12px;
  background: #f1f5f9;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #cbd5e1;
}

.boss-death-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.boss-death-table tr:hover {
  background: #f8fafc;
}

.boss-name {
  font-weight: 700;
  color: #1e293b;
}

/* Hardest Boss Card */
.hardest-boss-card {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 2px solid #fca5a5;
}

.hardest-boss-content {
  text-align: center;
}

.hardest-boss-name {
  font-size: 2em;
  font-weight: 700;
  color: #7f1d1d;
  margin-bottom: 12px;
}

.hardest-boss-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
}

.boss-stat-value {
  font-size: 3em;
  font-weight: 700;
  color: #dc2626;
  line-height: 1;
}

.boss-stat-label {
  font-size: 0.9em;
  color: #991b1b;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.boss-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #fca5a5;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
}

.timeline-label {
  font-weight: 600;
  color: #991b1b;
}

.timeline-value {
  color: #7f1d1d;
}

/* Muted text */
.muted {
  color: #94a3b8;
}

/* Dashboard utilities */
.dashboard-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

.dashboard-section {
  width: 100%;
}

.dash-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dash-card h3 {
  font-size: 1.2em;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .death-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .spell-stats {
    flex-direction: column;
    gap: 12px;
  }

  .confidence-bar-row {
    grid-template-columns: 100px 1fr 80px;
  }
}

/* ============================== Bazaar-Specific Styles ============================== */

/* Bazaar character selector option */
.charselect-item.bazaar-option {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-left: 3px solid #2456a5;
}

.charselect-item.bazaar-option:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.charselect-item.bazaar-option.active {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-left-color: #1e40af;
}

/* Stat cards */
.stat-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.stat-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
}

/* Gold pills */
.gold-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.gold-pill .char-name {
  font-weight: 600;
  color: #334155;
}

.gold-pill .gold-value {
  color: #f59e0b;
  font-weight: 700;
}

/* Quality badges */
.quality-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.quality-poor {
  background: #9d9d9d;
  color: white;
}

.quality-common {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
}

.quality-uncommon {
  background: #1eff00;
  color: #064e3b;
}

.quality-rare {
  background: #0070dd;
  color: white;
}

.quality-epic {
  background: #a335ee;
  color: white;
}

.quality-legendary {
  background: #ff8000;
  color: white;
}

/* Lockout cards */
.lockout-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
}

.lockout-instance {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: #1e293b;
}

.lockout-info {
  display: flex;
  gap: 8px;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.lockout-timer {
  font-size: 0.8rem;
  color: #f59e0b;
  font-weight: 600;
}

/* WhoDAT table styling (if not already in main styles) */
.whodat-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.whodat-table thead {
  background: #f8fafc;
}

.whodat-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
}

.whodat-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.whodat-table tbody tr:hover {
  background: #f8fafc;
}

.whodat-table tbody tr:last-child td {
  border-bottom: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .stat-card {
    padding: 12px;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .gold-pill {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .whodat-table {
    font-size: 0.8rem;
  }

  .whodat-table th,
  .whodat-table td {
    padding: 8px 12px;
  }
}

/* ============================================================================
   SOCIAL SECTION STYLES
   ============================================================================ */

/* Tab System */
.social-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.social-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.social-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.social-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

.social-tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

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

/* Hero Stats - The True Adventure */
.social-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.hero-stat-card {
  background: linear-gradient(135deg, #eef4ff 0%, #ffffff 100%);
  border: 2px solid #d4e3fc;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(36, 86, 165, 0.08);
  transition: all 0.3s;
}

.hero-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(36, 86, 165, 0.15);
}

.hero-stat-card.hero-primary {
  background: linear-gradient(135deg, #fff3cd 0%, #ffffff 100%);
  border-color: #ffc107;
}

.hero-stat-card.hero-secondary {
  background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
  border-color: #2196f3;
}

.hero-stat-card.hero-tertiary {
  background: linear-gradient(135deg, #f3e5f5 0%, #ffffff 100%);
  border-color: #9c27b0;
}

.hero-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.hero-value {
  font-size: 3rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.hero-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.hero-sublabel {
  font-size: 0.9rem;
  color: #6e7f9b;
}

/* Fun Facts Grid */
.social-fun-facts {
  margin-bottom: 40px;
}

.social-fun-facts h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
  text-align: center;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.fact-card {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: all 0.2s;
}

.fact-card:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.fact-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.fact-value {
  font-size: 2rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.fact-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.fact-subtitle {
  font-size: 0.85rem;
  color: #6e7f9b;
}

/* Charts */
.social-chart-section {
  margin-bottom: 40px;
}

.social-chart-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
  text-align: center;
}

.class-pie-chart {
  position: relative;
}

.chart-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  color: #2c3e50;
  font-weight: 500;
}

.legend-value {
  color: #6e7f9b;
  font-weight: 600;
}

/* Size Bar Chart */
.size-bar-chart {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
}

.size-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.size-bar-row:last-child {
  margin-bottom: 0;
}

.size-label {
  font-weight: 600;
  color: #2c3e50;
  text-align: right;
}

.size-bar-container {
  background: #f0f4f8;
  border-radius: 8px;
  height: 32px;
  position: relative;
}

.size-bar {
  background: linear-gradient(90deg, #3182ce 0%, #2456a5 100%);
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  min-width: 80px;
  transition: width 0.3s ease;
}

.size-count {
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Companions List */
.companions-section {
  margin-bottom: 40px;
}

.companions-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
}

.companions-list {
  display: grid;
  gap: 12px;
}

.companion-card {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 16px;
  align-items: center;
  transition: all 0.2s;
}

.companion-card:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.companion-rank {
  font-size: 1.5rem;
  font-weight: 700;
  color: #6e7f9b;
  text-align: center;
}

.companion-info {
  flex: 1;
}

.companion-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.companion-class {
  font-size: 0.9rem;
  color: #6e7f9b;
}

.companion-stats {
  text-align: right;
}

.companion-count {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2456a5;
}

.companion-label {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 4px;
}

.companion-last {
  font-size: 0.8rem;
  color: #999;
}

/* Instance Grid */
.instances-section {
  margin-bottom: 40px;
}

.instances-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
}

.instance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.instance-card {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s;
}

.instance-card:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
  transform: translateY(-2px);
}

.instance-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.instance-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
}

.difficulty-badge {
  display: inline-block;
  background: #ffc107;
  color: #000;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
}

.instance-stats {
  margin-top: 12px;
}

.instance-runs {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 4px;
}

.instance-detail {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 2px;
}

.instance-last {
  font-size: 0.8rem;
  color: #999;
}

/* Friends Section */
.friends-section {
  margin-bottom: 40px;
}

.friends-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
}

.friends-list {
  display: grid;
  gap: 12px;
}

.friend-card {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.friend-card:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.friend-info {
  flex: 1;
}

.friend-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.friend-details {
  font-size: 0.9rem;
  color: #6e7f9b;
}

.friend-time {
  font-size: 0.9rem;
  color: #999;
  text-align: right;
}

/* Activity Heatmap */
.heatmap-section {
  margin-bottom: 40px;
}

.heatmap-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
  text-align: center;
}

.hour-heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 8px;
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
}

.hour-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
}

.hour-cell:hover {
  transform: scale(1.1);
  z-index: 10;
}

.hour-label {
  font-size: 0.7rem;
  margin-bottom: 4px;
}

.hour-count {
  font-size: 1rem;
}

/* Day Chart */
.day-section {
  margin-bottom: 40px;
}

.day-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
  text-align: center;
}

.day-chart {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
}

.day-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.day-bar-row:last-child {
  margin-bottom: 0;
}

.day-label {
  font-weight: 600;
  color: #2c3e50;
  text-align: right;
}

.day-bar-container {
  background: #f0f4f8;
  border-radius: 8px;
  height: 36px;
  position: relative;
}

.day-bar {
  background: linear-gradient(90deg, #9c27b0 0%, #7b1fa2 100%);
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  min-width: 60px;
  transition: width 0.3s ease;
}

.day-count {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Timeline Feed */
.timeline-feed-section {
  margin-bottom: 40px;
}

.timeline-feed-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
}

.timeline-feed {
  display: grid;
  gap: 16px;
}

.timeline-item {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  transition: all 0.2s;
}

.timeline-item:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.timeline-icon {
  font-size: 1.5rem;
  text-align: center;
}

.timeline-content {
  flex: 1;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: #2c3e50;
  font-weight: 600;
}

.timeline-time {
  font-size: 0.85rem;
  color: #999;
  font-weight: 400;
}

.timeline-location {
  font-size: 0.9rem;
  color: #6e7f9b;
  margin-bottom: 8px;
}

.timeline-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #f0f4f8;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* Group Brackets Tab Styles */
.brackets-controls {
  background: linear-gradient(135deg, #eef4ff 0%, #f7fafc 100%);
  border: 1px solid #d4e3fc;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
}

.brackets-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.brackets-search-bar input[type="text"] {
  flex: 2;
  min-width: 250px;
  padding: 10px 16px;
  border: 1px solid #bcd0ee;
  border-radius: 8px;
  font-size: 1rem;
  background: #ffffff;
  margin: 0;
}

.brackets-search-bar input[type="date"] {
  flex: 1;
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid #bcd0ee;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #ffffff;
  margin: 0;
}

.brackets-search-bar button {
  padding: 10px 20px;
  font-size: 0.95rem;
  margin: 0;
}

.brackets-content {
  background: linear-gradient(135deg, #a8d0ff 0%, #86c5ff 100%);
  border-radius: 16px;
  padding: 30px;
  min-height: 400px;
}

.bracket-section {
  margin-bottom: 40px;
}

.bracket-section:last-child {
  margin-bottom: 0;
}

.bracket-section h3 {
  color: #ffffff;
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bracket-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tournament-bracket {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.bracket-main {
  background: #ffffff;
  color: #2456a5;
  border: 2px solid #2456a5;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  min-width: 200px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bracket-connector {
  width: 40px;
  height: 3px;
  background: #ffffff;
  position: relative;
}

.bracket-connector::after {
  content: '';
  position: absolute;
  right: -6px;
  top: -3px;
  width: 0;
  height: 0;
  border-left: 6px solid #ffffff;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.bracket-members {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1;
}

.bracket-member {
  background: #ffffff;
  color: #333333;
  border: 2px solid #2456a5;
  border-radius: 8px;
  padding: 12px;
  min-width: 160px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}

.member-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--class-color, #333333);
}

.member-role {
  font-size: 0.9rem;
  color: #666666;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.member-class-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #999999;
  border-radius: 0 0 6px 6px;
  font-size: 0.75rem;
  color: #ffffff;
  text-align: center;
  line-height: 4px;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.bracket-extra {
  background: #f0f0f0;
  border: 1px solid #cccccc;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.8rem;
  color: #666666;
  margin-top: 6px;
  text-align: center;
}

.bracket-time {
  color: #ffffff;
  font-size: 0.9rem;
  opacity: 0.8;
  text-align: center;
  min-width: 120px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.brackets-loading {
  text-align: center;
  padding: 60px 20px;
  color: #2456a5;
  font-size: 1.2rem;
}

.loading-spinner {
  animation: pulse 2s infinite;
}

.no-results {
  text-align: center;
  color: #ffffff;
  font-size: 1.1rem;
  padding: 40px;
  opacity: 0.8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .social-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .social-tab {
    padding: 10px 16px;
    font-size: 0.9rem;
    white-space: nowrap;
  }

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

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

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

  .companion-card {
    grid-template-columns: 40px 1fr;
    gap: 12px;
  }

  .companion-stats {
    grid-column: 2;
    text-align: left;
    margin-top: 8px;
  }

  .hour-heatmap {
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  }

  .size-bar-row,
  .day-bar-row {
    grid-template-columns: 100px 1fr;
    gap: 12px;
  }

  /* Group Brackets responsive */
  .brackets-search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .brackets-search-bar input[type="text"],
  .brackets-search-bar input[type="date"] {
    min-width: 100%;
    flex: none;
  }

  .tournament-bracket {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .bracket-connector {
    width: 3px;
    height: 20px;
    transform: rotate(90deg);
  }

  .bracket-connector::after {
    right: -3px;
    top: -6px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #ffffff;
    border-bottom: none;
  }

  .bracket-main {
    min-width: 100%;
    order: -1;
  }

  .bracket-members {
    justify-content: center;
  }

  .bracket-member {
    min-width: 140px;
  }

  .bracket-time {
    min-width: 100%;
    order: 1;
  }
}

/* ============================================
   GUILD HALL STYLING
   Single Guild Hall entry in character selector
   ============================================ */

/* Guild Hall specific styling */
.guild-hall-option .char-name {
  color: #654321;
  font-weight: 600;
}

.guild-hall-option .char-emoji {
  filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.6));
}

.guild-hall-option:hover .char-emoji {
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
}

/* Mortality Analysis - Scoped Styles */
#tab-mortality {
  /* All styles are scoped to the mortality tab */
}

/* ==== 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 AREAS ==== */
#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: end;
  height: 120px;
  padding: 1rem 0;
}

#tab-mortality .timeline-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

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

#tab-mortality .timeline-bar .bar-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

/* ==== DEATH CARDS ==== */
#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 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;
}

/* ==== UTILITY CLASSES ==== */
#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;
}

/* ==== RESPONSIVE DESIGN ==== */
@media (max-width: 768px) {
  #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;
  }
}

@media (max-width: 480px) {
  #tab-mortality .stats-grid {
    grid-template-columns: 1fr;
  }

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

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

/* ============================================================
   WhoDASH Landing / Login Page
   Applied via body.wd-landing-page (toggled by main.js)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700;900&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300&display=swap');

body.wd-landing-page {
  background: linear-gradient(135deg, #1a3a6e 0%, #1e4fa0 45%, #2d7dd2 100%) !important;
  min-height: 100vh;
}

body.wd-landing-page .topbar {
  display: none !important;
}

body.wd-landing-page .container {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

#whodash-landing {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

#whodash-landing::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 15% 50%, rgba(255,255,255,0.05) 0%, transparent 65%),
    radial-gradient(ellipse 50% 70% at 85% 60%, rgba(10,25,60,0.28) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.wd-hero {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 60px;
  position: relative;
  z-index: 1;
}

.wd-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  animation: wdHeroIn 0.6s ease both 0s;
}

.wd-eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: rgba(255,255,255,0.35);
}

.wd-logo {
  font-family: 'Cinzel', serif;
  font-size: clamp(3.8rem, 7vw, 6.5rem);
  font-weight: 900;
  color: #fff;
  line-height: 0.88;
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
  text-shadow: 0 2px 40px rgba(10,30,90,0.5);
  animation: wdHeroIn 0.6s ease both 0.07s;
}

.wd-logo span {
  color: #7ec8ff;
  text-shadow: 0 0 40px rgba(126,200,255,0.4);
}

.wd-tagline {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.65);
  margin: 18px 0 52px 0;
  line-height: 1.55;
  animation: wdHeroIn 0.6s ease both 0.14s;
}

.wd-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 480px;
}

.wd-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  animation: wdFeatureIn 0.55s ease both;
}

.wd-feature:nth-child(1) { animation-delay: 0.18s; }
.wd-feature:nth-child(2) { animation-delay: 0.28s; }
.wd-feature:nth-child(3) { animation-delay: 0.38s; }

.wd-feature:hover {
  background: rgba(255,255,255,0.13);
  border-color: rgba(126,200,255,0.35);
  transform: translateY(-2px);
}

.wd-feature-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1.4;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.3));
}

.wd-feature-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wd-feature-text strong {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.92);
  text-transform: uppercase;
}

.wd-feature-text span {
  font-family: 'Crimson Pro', serif;
  font-size: 0.93rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.4;
}

.wd-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(255,255,255,0.18) 25%,
    rgba(255,255,255,0.18) 75%,
    transparent 100%);
  flex-shrink: 0;
  z-index: 1;
  margin: 40px 0;
}

.wd-auth-panel {
  flex: 0 0 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  z-index: 1;
}

.wd-auth-card {
  width: 100%;
  background: rgba(255,255,255,0.97);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 32px 80px rgba(8,20,60,0.45), 0 2px 0 rgba(255,255,255,0.9) inset;
  animation: wdCardIn 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) both 0.08s;
}

.wd-auth-title {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a3a6e;
  margin: 0 0 5px 0;
  letter-spacing: 0.04em;
}

.wd-auth-subtitle {
  font-family: 'Crimson Pro', serif;
  font-size: 0.95rem;
  color: #7a8fa8;
  margin: 0 0 26px 0;
}

.wd-auth-card form {
  display: flex;
  flex-direction: column;
}

.wd-auth-card input[type="text"],
.wd-auth-card input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 14px;
  border: 1.5px solid #d8e8f5;
  border-radius: 10px;
  font-size: 0.96rem;
  font-family: 'Crimson Pro', serif;
  background: #f5f9fd;
  color: #1a3a6e;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

.wd-auth-card input[type="text"]:focus,
.wd-auth-card input[type="password"]:focus {
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49,130,206,0.13);
  background: #fff;
}

.wd-auth-card input::placeholder {
  color: #b0bfcc;
  font-style: italic;
}

.wd-btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2d7dd2 0%, #1a3a6e 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 4px 20px rgba(29,78,160,0.4);
  margin: 4px 0 0 0;
}

.wd-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(29,78,160,0.5);
}

.wd-btn-primary:active {
  transform: translateY(0);
}

.wd-btn-secondary {
  width: 100%;
  padding: 11px;
  background: transparent;
  color: #2d7dd2;
  border: 1.5px solid #c5d8ee;
  border-radius: 10px;
  font-family: 'Cinzel', serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
  margin: 8px 0 0 0;
}

.wd-btn-secondary:hover {
  background: #eef5fc;
  border-color: #2d7dd2;
}

.wd-auth-card #loginError,
.wd-auth-card #registerError {
  color: #c53030;
  font-family: 'Crimson Pro', serif;
  font-size: 0.9rem;
  margin: 10px 0 0 0;
  min-height: 18px;
}

.wd-auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 10px;
  color: #b0bfcc;
  font-size: 0.78rem;
  font-family: 'Crimson Pro', serif;
  letter-spacing: 0.05em;
}

.wd-auth-divider::before,
.wd-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2ecf5;
}

@keyframes wdHeroIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes wdFeatureIn {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes wdCardIn {
  from { opacity: 0; transform: translateY(22px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 860px) {
  #whodash-landing { flex-direction: column; }
  .wd-hero { padding: 52px 32px 36px; }
  .wd-divider {
    width: 100%; height: 1px; margin: 0 40px; align-self: auto;
    background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.18) 25%, rgba(255,255,255,0.18) 75%, transparent 100%);
  }
  .wd-auth-panel { flex: unset; padding: 36px 24px 52px; }
}
/* === GLOBAL STYLES === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #3a8dde 0%, #1e3c72 100%);
}

.container {
  width: 100%;
  max-width: 1440px;
  margin: 48px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(30, 60, 114, 0.12);
  padding: 40px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.tab-content {
  display: block;
  padding: 2px 12px;
  background: transparent;
  border-radius: 0 0 8px 8px;
  min-height: 24px;
  box-shadow: 0 2px 8px rgba(49, 130, 206, 0.04);
  margin-bottom: 1px;
  margin-top: 0;
  opacity: 1;
  transition: opacity 0.3s;
}

.tab-content.fade-out {
  opacity: 0;
  transition: opacity 0.2s;
}

.tab-content.fade-in {
  opacity: 1;
  transition: opacity 0.3s;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #2456a5;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 18px;
  border: 1px solid #bcd0ee;
  border-radius: 8px;
  font-size: 1.05rem;
  background: #f7fafc;
}

button,
.btn {
  background: linear-gradient(90deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(49, 130, 206, 0.08);
  margin-right: 8px;
  margin-bottom: 8px;
}

button:hover,
.btn:hover {
  background: linear-gradient(90deg, #2456a5 0%, #3182ce 100%);
  box-shadow: 0 4px 16px rgba(49, 130, 206, 0.16);
}

h1 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 32px;
  font-weight: 700;
  color: #2456a5;
}

h2,
h3 {
  color: #2456a5;
}

.muted {
  color: #6e7f9b;
  margin: 8px 0 0 0;
  font-size: 0.95em;
}

a {
  color: #2456a5;
  text-decoration: underline;
  cursor: pointer;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .container {
    width: 98vw;
    padding: 16px 4vw;
  }

  h1 {
    font-size: 1.3rem;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 14px 6px;
  }

  .tab {
    font-size: 0.95rem;
  }
}

/* --- NAV SECTION START --- */
.topbar {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.08);
  padding: 4px 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 10;
  min-height: 38px;
}

.searchbar-wrapper {
  position: relative;
  width: 75%;
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#sectionSearch {
  width: 100%;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid #bcd0ee;
  font-size: 1rem;
  font-family: 'Segoe UI', Arial, sans-serif;
  outline: none;
  background: #f7fafc;
  box-shadow: 0 1px 4px rgba(30, 60, 114, 0.06);
  margin: 0;
  transition: box-shadow 0.2s, border-color 0.2s;
}

#sectionSearch:focus {
  box-shadow: 0 3px 12px rgba(49, 130, 206, 0.15);
  border-color: #3182ce;
}

#sectionSearch::placeholder {
  color: #9ca3af;
}

.dropdown {
  position: absolute;
  top: 48px;
  left: 0;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(30, 60, 114, 0.18);
  border: 1px solid #e2e8f0;
  padding: 8px;
  max-height: 520px;
  overflow-y: auto;
  font-family: 'Segoe UI', Arial, sans-serif;
  z-index: 1000;
}

.dropdown .search-category {
  padding: 8px 12px 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6e7f9b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.dropdown .search-category:first-child {
  margin-top: 0;
}

.dropdown .section-item {
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 8px;
  color: #2456a5;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
}

.dropdown .section-item .item-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  line-height: 1;
}

.dropdown .section-item .item-content {
  flex: 1;
  min-width: 0;
}

.dropdown .section-item .item-title {
  font-weight: 600;
  color: #2456a5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown .section-item .item-description {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 400;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown .section-item:hover,
.dropdown .section-item.active {
  background: linear-gradient(90deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
}

.dropdown .section-item:hover .item-title,
.dropdown .section-item.active .item-title {
  color: #fff;
}

.dropdown .section-item:hover .item-description,
.dropdown .section-item.active .item-description {
  color: rgba(255, 255, 255, 0.85);
}

.dropdown .no-results {
  padding: 24px;
  text-align: center;
  color: #6e7f9b;
  font-size: 0.95rem;
}

.dropdown .search-loading {
  padding: 16px;
  text-align: center;
  color: #6e7f9b;
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .searchbar-wrapper {
    width: 70%;
  }
}

@media (max-width: 900px) {
  .searchbar-wrapper {
    width: 65%;
  }
}

@media (max-width: 600px) {
  .searchbar-wrapper {
    width: 90%;
  }

  .dropdown .section-item {
    padding: 10px 12px;
  }

  .dropdown .section-item .item-icon {
    font-size: 1.25rem;
    width: 28px;
    height: 28px;
  }
}

.hidden {
  display: none;
}

/* --- NAV SECTION END --- */

/* --- FADE TRANSITIONS --- */
.fade-out {
  opacity: 0 !important;
  transition: opacity 0.3s;
}

.fade-in {
  opacity: 1 !important;
  transition: opacity 0.3s;
}

/* === Character Select (top-left in topbar) === */
.charselect-wrapper {
  position: absolute;
  left: 12px;
  top: 6px;
  display: inline-block;
  z-index: 11;
  /* above topbar content */
}

.charselect-trigger {
  /* Text-only button (no visible box) */
  background: transparent;
  border: 0;
  padding: 4px 0;
  color: #2456a5;
  /* deep blue from your theme */
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  outline: none;
}

.charselect-trigger:focus-visible {
  outline: 2px solid #3182ce;
  border-radius: 6px;
}

.charselect-trigger:hover .charselect-label,
.charselect-trigger:hover .charselect-icon {
  text-decoration: underline;
}

.charselect-icon {
  font-size: 1.05rem;
  /* emoji size */
}

.charselect-caret {
  font-size: 0.9rem;
  color: #6e7f9b;
}

/* Dropdown (white card look, like your .dropdown) */
.charselect-menu {
  position: absolute;
  top: 28px;
  left: 0;
  min-width: 240px;
  max-width: 320px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(30, 60, 114, 0.12);
  border: 1px solid #bcd0ee;
  /* soft blue border to match cards */
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 6px;
  z-index: 100;
}

.charselect-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  color: #2456a5;
  transition: background 0.2s, color 0.2s;
  font-weight: 500;
  user-select: none;
}

.charselect-item:hover,
.charselect-item.active {
  background: linear-gradient(90deg, #2efff5 0%, #fff 100%);
  color: #fff;
}

.charselect-item .char-emoji {
  font-size: 1.1rem;
}

.charselect-item .char-name {
  font-size: 1.02rem;
  font-weight: 600;
}

.charselect-item .char-meta {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 400;
}

.hidden {
  display: none !important;
}

/* Responsive: keep menu usable on mobile */
@media (max-width: 600px) {
  .charselect-menu {
    min-width: 90vw;
    left: 0;
    right: 0;
    margin: 0 auto;
  }
}

/* === WhoDASH dashboard components === */
.dash-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid #bcd0ee;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  margin: 14px 0;
}

.dash-portrait {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e7eef8, #c8d9f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2456a5;
  font-weight: 700;
}

.dash-main {
  display: flex;
  flex-direction: column;
}

.dash-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2456a5;
}

.dash-meta {
  margin-top: 4px;
  color: #6e7f9b;
  font-size: 0.95rem;
}

.dash-gold {
  margin-top: 6px;
  font-weight: 600;
  color: #2456a5;
}

.dash-actions {
  text-align: right;
}

.dash-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2456a5;
  margin-top: 10px;
}

@media (max-width: 700px) {
  .dash-card {
    grid-template-columns: 100%;
  }

  .dash-actions {
    justify-self: end;
  }

  .dash-portrait {
    width: 100%;
    height: 160px;
  }
}

/* Coin badges */
.coin {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  margin-right: 6px;
}

.coin-gold {
  color: #9c6b00;
  background: #fff7e0;
  border: 1px solid #f1d38a;
}

.coin-silver {
  color: #5b6a7a;
  background: #eef2f7;
  border: 1px solid #cfd8e3;
}

.coin-copper {
  color: #7a3b1a;
  background: #f5e9e4;
  border: 1px solid #ddb7a4;
}

/* Tooltip for charts */
.whodat-tip {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  background: #111;
  color: #fff;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 12px;
  line-height: 1.25;
  transform: translate(-50%, -120%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  opacity: 0;
  transition: opacity .08s ease;
}

/* === Travel Log (fragment) === */
.segmented {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  background: #eef4ff;
  border-radius: 10px;
  border: 1px solid #d7e3fb;
}

.segmented-btn {
  padding: 8px 14px;
  border-radius: 8px;
  background: #f7fafc;
  color: #2456a5;
  border: 1px solid #cfe0fb;
  cursor: pointer;
}

.segmented-btn.is-active {
  background: #2456a5;
  color: #fff;
  border-color: #2456a5;
}

.panel.hidden {
  display: none;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card {
  background: #ffffff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 12px;
}

.card-title {
  margin: 0 0 8px 0;
  color: #2456a5;
  font-weight: 600;
}

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead th {
  text-align: left;
  background: #f0f5ff;
  color: #2456a5;
  font-weight: 600;
  padding: 8px;
  border-bottom: 1px solid #d7e3fb;
  cursor: pointer;
}

.table tbody td {
  padding: 8px;
  border-bottom: 1px solid #eef2f9;
}

.table.compact tbody td,
.table.compact thead th {
  padding: 6px;
}

.table.sticky thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.table thead th.sort-asc::after {
  content: " â–²";
  /* or "\25B2" */
}

.table thead th.sort-desc::after {
  content: " â–¼";
  /* or "\25BC" */
}

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

.bar-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: center;
  gap: 8px;
}

.bar-label {
  color: #334e88;
}

.bar {
  --w: 0%;
  position: relative;
  height: 22px;
  border-radius: 10px;
  background: linear-gradient(90deg, #cfe0fb var(--w), #eef4ff var(--w));
  border: 1px solid #d7e3fb;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  color: #2456a5;
  font-weight: 600;
}

/* Travel Log date range layout (optional) */
.date-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

.date-range input[type="datetime-local"] {
  padding: 6px 10px;
  border: 1px solid #bcd0ee;
  border-radius: 8px;
  background: #f7fafc;
  color: #2456a5;
}

/* Icon placeholder cell */
.cell-icon {
  width: 28px;
}

.icon-placeholder {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #eef4ff;
  border: 1px solid #d7e3fb;
}

/* Quality badge pills (Q0ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â€šÂ¬Ã…â€œQ5 typical) */
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid transparent;
}

.pill.q-0 {
  color: #666;
  background: #f2f2f2;
  border-color: #ddd;
}

/* Poor */
.pill.q-1 {
  color: #2456a5;
  background: #eef4ff;
  border-color: #cfe0fb;
}

/* Common */
.pill.q-2 {
  color: #0a7a34;
  background: #e6f6ea;
  border-color: #bfe8ca;
}

/* Uncommon (green) */
.pill.q-3 {
  color: #3a2b96;
  background: #eceaff;
  border-color: #cfc9ff;
}

/* Rare (blue/purple mix) */
.pill.q-4 {
  color: #9c6b00;
  background: #fff7e0;
  border-color: #f1d38a;
}

/* Epic-ish */
.pill.q-5 {
  color: #7a3b1a;
  background: #f5e9e4;
  border-color: #ddb7a4;
}

.q-badge {
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.6;
  display: inline-block;
}

.q-poor {
  background: #6b6b6b;
  color: #fff;
}

.q-common {
  background: #dfe7df;
  color: #2e5b2e;
}

.q-uncommon {
  background: #1eff00;
  color: #033600;
}

.q-rare {
  background: #0070dd;
  color: #fff;
}

.q-epic {
  background: #a335ee;
  color: #fff;
}

.q-legendary {
  background: #ff8000;
  color: #231300;
}

.vault-bars-row {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.vault-bar-block {
  flex: 1 1 0;
  min-width: 220px;
}

.vault-bar-block h4 {
  margin-top: 250;
  margin-bottom: 8px;
}

/* === Achievements (minimal additions) === */

/* Canvas container */
.chart-canvas {
  width: 100%;
  /* height is set via the canvas attribute and scaled by JS DPR */
  display: block;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(30, 60, 114, 0.06);
  margin-bottom: 8px;
}

/* KPI chips (color tokens consistent with theme) */
.chip {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.chip-blue {
  background: #2456a5;
}

.chip-gray {
  background: #6e7f9b;
}

.chip-gold {
  background: #f1d38a;
}

.mini-kpi {
  color: #2456a5;
  font-weight: 600;
  margin: 4px 0;
}

/* Latest 5 list */
.ach-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.ach-item {
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
}

.ach-item .ach-name {
  font-weight: 700;
  color: #2456a5;
}

.ach-item .ach-meta {
  margin-top: 4px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.ach-item .ach-desc {
  margin-top: 6px;
  color: #334e88;
}

/* Reputation vertical column */
.rep-vbar {
  width: 100%;
  height: 0%;
  border-radius: 6px;
  transition: height 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Rainbow-ready reputation styling */
.rep-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}

.rep-name {
  flex: 0 0 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #222;
}

.rep-value {
  flex: 0 0 auto;
  min-width: 64px;
  text-align: right;
  color: #7a7a7a;
  font-variant-numeric: tabular-nums;
}

.rep-bar {
  flex: 1 1 auto;
  height: 16px;
  background: #101314;
  border-radius: 999px;
  overflow: hidden;
}

.rep-fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
}

/* container only */
.rep-fill-inner {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  will-change: width;
}

/* ============================================================================
   DASHBOARD SUMMARY STYLES
   ============================================================================ */

/* Dashboard Sections */
.dashboard-section {
  margin-bottom: 24px;
}

.dashboard-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dashboard-row-three {
  grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 1200px) {
  .dashboard-row-three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   TIPS CARD
   ============================================================================ */
.tips-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.tips-card h3 {
  margin: 0 0 12px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.tips-subtitle {
  color: #6e7f9b;
  font-size: 0.9rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e6eefb;
}

.tips-section-title {
  margin: 16px 0 10px 0;
  color: #2456a5;
  font-size: 0.95rem;
  font-weight: 600;
}

.tips-zones-list,
.tips-notes-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}

.tips-zones-list li {
  padding: 6px 12px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #eef4ff 0%, #f7fafc 100%);
  border-left: 3px solid #3182ce;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #2c5282;
}

.tips-notes-list li {
  padding: 8px 0 8px 20px;
  margin-bottom: 8px;
  position: relative;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #4a5568;
}

.tips-notes-list li:before {
  content: "✱";
  /* or "\2022" for Unicode escape */
  position: absolute;
  left: 6px;
  color: #3182ce;
  font-weight: bold;
}

.tips-card .muted {
  color: #9ca3af;
  font-style: italic;
  text-align: center;
  padding: 20px;
}


/* ============================================================================
   HERO STATS GRID
   ============================================================================ */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.hero-stat {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(30, 60, 114, 0.12);
}

.hero-stat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.hero-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.hero-stat-label {
  font-size: 0.95rem;
  color: #6e7f9b;
  font-weight: 500;
  margin-bottom: 4px;
}

.hero-stat-tier {
  font-size: 0.85rem;
  color: #3182ce;
  font-weight: 600;
  margin-top: 6px;
}

.hero-stat-subtitle {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-top: 4px;
}

/* ============================================================================
   HIGHLIGHTS CARD
   ============================================================================ */
.highlights-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.highlights-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.highlights-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.highlights-list li {
  padding: 14px 0;
  /* Changed from 10px to 14px */
  border-bottom: 1px solid #eef4ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Extended highlights list with more spacing */
.highlights-list-extended li {
  padding: 16px 0;
}

.highlights-list li:last-child {
  border-bottom: none;
}

.hl-icon {
  font-size: 1.1rem;
  margin-right: 8px;
  display: inline-block;
  min-width: 24px;
}

.hl-label {
  color: #6e7f9b;
  font-weight: 500;
}

.highlights-list strong {
  color: #2456a5;
  font-weight: 700;
}

/* ============================================================================
   ACTIVITY HEATMAP
   ============================================================================ */
.activity-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.activity-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.activity-heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16px, 1fr));
  /* Changed from 12px */
  gap: 5px;
  /* Changed from 3px */
  max-width: 100%;
}

.heatmap-cell {
  width: 16px;
  /* Changed from 12px */
  height: 16px;
  /* Changed from 12px */
  border-radius: 3px;
  /* Changed from 2px */
  background: #eef4ff;
  border: 1px solid #d7e3fb;
  transition: all 0.2s;
}

.heatmap-cell[data-intensity="0"] {
  background: #eef4ff;
  border-color: #d7e3fb;
}

.heatmap-cell[data-intensity="1"] {
  background: #c8d9f1;
  border-color: #b8c9e1;
}

.heatmap-cell[data-intensity="2"] {
  background: #9ab8e5;
  border-color: #8aa8d5;
}

.heatmap-cell[data-intensity="3"] {
  background: #5a92d6;
  border-color: #4a82c6;
}

.heatmap-cell[data-intensity="4"] {
  background: #3182ce;
  border-color: #2456a5;
}

.heatmap-cell:hover {
  transform: scale(1.4);
  /* Changed from 1.3 */
  z-index: 10;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  /* Enhanced shadow */
}

/* ============================================================================
   TOP LOOT WIDGET
   ============================================================================ */
.top-loot-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.top-loot-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.top-loot-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-loot-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.top-loot-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.loot-rank {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(49, 130, 206, 0.2);
}

.loot-name {
  color: #334e88;
  font-weight: 600;
  font-size: 0.95rem;
}

.loot-count {
  color: #2456a5;
  font-weight: 700;
  font-size: 1rem;
  background: #eef4ff;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #d7e3fb;
}

/* ============================================================================
   SPARKLINE CHART
   ============================================================================ */
.sparkline-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.sparkline-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.sparkline-canvas {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  background: #f7fafc;
}

.sparkline-info {
  margin-top: 12px;
  padding: 12px;
  background: #eef4ff;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #334e88;
  font-weight: 500;
  text-align: center;
}

.sparkline-tooltip {
  position: absolute;
  display: none;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   ACTIVITY FEED
   ============================================================================ */
.activity-feed-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 600px;
  overflow-y: auto;
}

.activity-feed-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 12px;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.activity-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.activity-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #d7e3fb;
}

.activity-icon-img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid #d7e3fb;
  display: block;
  background: #fff;
}

.activity-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.activity-desc {
  color: #334e88;
  font-size: 0.95rem;
  line-height: 1.4;
}

.activity-desc strong {
  color: #2456a5;
  font-weight: 600;
}

.activity-time {
  color: #6e7f9b;
  font-size: 0.85rem;
}

/* ============================================================================
   REPUTATION LIST (Animated)
   ============================================================================ */
.reputation-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 600px;
  overflow-y: auto;
}

.reputation-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.rep-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f7fafc;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #334e88;
}

.rep-legend .chip {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.rep-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rep-row {
  display: grid;
  grid-template-columns: 150px 1fr 80px;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}

.rep-name {
  color: #2456a5;
  font-weight: 600;
  font-size: 0.95rem;
}

.rep-bar {
  position: relative;
  height: 22px;
  background: #eef4ff;
  border-radius: 11px;
  border: 1px solid #d7e3fb;
  overflow: hidden;
}

.rep-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 11px;
  transition: width 0.5s ease-out;
}

.rep-value {
  text-align: right;
  color: #334e88;
  font-weight: 600;
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .rep-row {
    grid-template-columns: 100%;
    gap: 6px;
  }

  .rep-value {
    text-align: left;
    font-size: 0.85rem;
  }
}

/* ============================================================================
   COIN DISPLAY (from original)
   ============================================================================ */
.coin {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  margin-right: 4px;
  font-size: 0.9rem;
}

.coin-gold {
  color: #9c6b00;
  background: #fff7e0;
  border: 1px solid #f1d38a;
}

.coin-silver {
  color: #5b6a7a;
  background: #eef2f7;
  border: 1px solid #cfd8e3;
}

.coin-copper {
  color: #7a3b1a;
  background: #f5e9e4;
  border: 1px solid #ddb7a4;
}

/* ============================================================================
   UTILITIES
   ============================================================================ */
.muted {
  color: #6e7f9b;
  font-size: 0.95rem;
  font-style: italic;
}

/* ============================================================================
   CHARACTER DASHBOARD STYLES
   ============================================================================ */

/* Character Profile Card */
.char-profile-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.char-header {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e6eefb;
}

.char-avatar {
  flex-shrink: 0;
}

.char-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.char-info {
  flex: 1;
}

.char-name {
  margin: 0 0 8px 0;
  font-size: 2rem;
  font-weight: 700;
  color: #2456a5;
}

.char-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.char-identity {
  font-size: 1rem;
  color: #334e88;
  font-weight: 500;
  line-height: 1.5;
}

.char-level,
.char-class,
.char-race {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.char-level {
  background: #eef4ff;
  color: #2456a5;
  border: 1px solid #d7e3fb;
}

.char-class {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.char-race {
  background: #f5f3ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.char-guild {
  color: #6e7f9b;
  font-size: 0.95rem;
  font-weight: 500;
}

.char-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.char-stat-item {
  text-align: center;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e6eefb;
}

.stat-label {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

/* Stats Dashboard */
.stats-dashboard-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.stats-dashboard-card h3 {
  margin: 0 0 20px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-bar-item {
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border: 1px solid #e6eefb;
}

.stat-bar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.stat-icon {
  font-size: 1.3rem;
}

.stat-name {
  flex: 1;
  font-weight: 600;
  color: #334e88;
  font-size: 0.95rem;
}

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

.stat-bar {
  height: 8px;
  background: #e6eefb;
  border-radius: 4px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, #3182ce 0%, #2456a5 100%);
  transition: width 0.5s ease-out;
  border-radius: 4px;
}

/* Progression Card */
.progression-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.progression-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.progression-canvas {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  background: #f7fafc;
}

.progression-info {
  margin-top: 12px;
  padding: 12px;
  background: #eef4ff;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #334e88;
  text-align: center;
}

/* Leveling Speed Card */
.speed-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.speed-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.speed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.speed-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.speed-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.speed-level {
  font-weight: 700;
  color: #2456a5;
  font-size: 0.95rem;
}

.speed-time {
  color: #334e88;
  font-weight: 500;
  font-size: 0.9rem;
}

.speed-rate {
  background: #eef4ff;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  color: #2456a5;
  font-size: 0.85rem;
  border: 1px solid #d7e3fb;
}

.speed-average {
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #eef4ff 0%, #d7e3fb 100%);
  border-radius: 10px;
  text-align: center;
  color: #334e88;
  font-size: 1rem;
  border: 1px solid #d7e3fb;
}

.speed-average strong {
  color: #2456a5;
  font-size: 1.1rem;
}

/* Milestones Card */
.milestones-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.milestones-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.milestone-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.milestone-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  padding: 14px;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.milestone-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.milestone-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #3182ce 0%, #2456a5 100%);
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(49, 130, 206, 0.2);
}

.milestone-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.milestone-title {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
}

.milestone-desc {
  color: #6e7f9b;
  font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .char-header {
    flex-direction: column;
    text-align: center;
  }

  .char-meta {
    justify-content: center;
  }

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

/* ============================================================================
   CURRENCIES / ECONOMY STYLES
   ============================================================================ */
/* Enhanced Auction Analytics Styles */

/* Analytics Grid Layout */
.analytics-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

.analytics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.analytics-row.full-width {
  grid-template-columns: 1fr;
}

.auction-analytics-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.auction-analytics-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auction-analytics-card h4 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 500;
  color: #475569;
}

/* Sell-Through by Duration */
.sell-through-chart {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.duration-bar-item {
  display: grid;
  grid-template-columns: 60px 1fr 140px;
  gap: 12px;
  align-items: center;
}

.duration-label {
  font-weight: 600;
  color: #334155;
  text-align: right;
}

.duration-bar-bg {
  height: 32px;
  background: #f1f5f9;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.duration-bar-fill {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  transition: width 0.3s ease;
  border-radius: 6px;
}

.duration-bar-text {
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.duration-stats {
  font-size: 0.85rem;
  color: #64748b;
  text-align: right;
}

/* Market Seasonality Heatmaps */
.seasonality-container {
  display: flex;
  gap: 32px;
}

.seasonality-section {
  flex: 1;
}

.day-heatmap,
.hour-heatmap {
  display: grid;
  gap: 8px;
}

.day-heatmap {
  grid-template-columns: repeat(7, 1fr);
}

.hour-heatmap {
  grid-template-columns: repeat(3, 1fr);
}

.heat-cell {
  padding: 16px 12px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s;
}

.heat-cell:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.heat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.heat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

/* Scatter Plot */
.scatter-plot-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scatter-canvas {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.scatter-legend {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #475569;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* Price History Charts */
.price-history-charts {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.price-history-item {
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.price-history-item h4 {
  color: #1e293b;
  font-size: 1rem;
  font-weight: 600;
}

.price-history-item canvas {
  margin-top: 12px;
  display: block;
}

/* Undercut Ladder */
.undercut-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.undercut-item {
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.undercut-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

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

.position-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.position-badge.competitive {
  background: #dcfce7;
  color: #166534;
}

.position-badge.overpriced {
  background: #fef3c7;
  color: #92400e;
}

.undercut-pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-label {
  font-size: 0.85rem;
  color: #64748b;
}

.price-value {
  font-weight: 600;
  color: #1e293b;
}

.undercut-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.undercut-option {
  background: white;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.undercut-option span {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 4px;
}

.undercut-option strong {
  display: block;
  color: #1e293b;
  font-size: 0.9rem;
}

/* Profit Calculator */
.profit-calculator .calculator-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calc-input-group {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  align-items: center;
}

.calc-input-group label {
  font-size: 0.9rem;
  color: #475569;
  font-weight: 500;
}

.calc-input-group input,
.calc-input-group select {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
}

.calc-input-group input:focus,
.calc-input-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.calc-results {
  margin-top: 8px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.calc-result-row:not(:last-child) {
  border-bottom: 1px solid #e2e8f0;
}

.calc-result-row span {
  font-size: 0.9rem;
  color: #64748b;
}

.calc-result-row strong {
  font-size: 1rem;
  font-weight: 600;
}

.calc-total {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 2px solid #cbd5e1 !important;
}

.calc-total span {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

.calc-total strong {
  font-size: 1.25rem;
}

.profit-value.positive {
  color: #16a34a;
}

.profit-value.negative {
  color: #dc2626;
}

/* Performance Table */
.performance-table-container {
  overflow-x: auto;
}

.performance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.performance-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.performance-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.performance-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.performance-table tbody tr:hover {
  background: #f8fafc;
}

.performance-table .item-name {
  font-weight: 600;
  color: #1e293b;
}

.performance-table .success-rate {
  font-weight: 600;
}

.performance-table .success-rate.excellent {
  color: #16a34a;
}

.performance-table .success-rate.good {
  color: #f59e0b;
}

.performance-table .success-rate.poor {
  color: #dc2626;
}

/* Competitor Analysis */
.competitor-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.competitor-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.competitor-rank {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  font-weight: 700;
  border-radius: 8px;
  font-size: 1rem;
}

.competitor-info {
  flex: 1;
}

.competitor-name {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.competitor-stats {
  font-size: 0.85rem;
  color: #64748b;
}

/* Repost Tracker */
.repost-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.repost-item {
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.repost-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.repost-name {
  font-weight: 600;
  color: #1e293b;
}

.repost-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.repost-badge.sold {
  background: #dcfce7;
  color: #166534;
}

.repost-badge.expired {
  background: #fee2e2;
  color: #991b1b;
}

.repost-stats {
  font-size: 0.85rem;
  color: #64748b;
}

/* Utility Classes */
.positive {
  color: #16a34a;
}

.negative {
  color: #dc2626;
}

.muted {
  color: #94a3b8;
  font-style: italic;
}

/* Existing styles compatibility */
.coin {
  font-weight: 600;
  white-space: nowrap;
}

.coin-gold {
  color: #f59e0b;
}

.coin-silver {
  color: #94a3b8;
}

.coin-copper {
  color: #a16207;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .analytics-row {
    grid-template-columns: 1fr;
  }

  .seasonality-container {
    flex-direction: column;
  }

  .undercut-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .auction-analytics-card {
    padding: 16px;
  }

  .duration-bar-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .duration-label {
    text-align: left;
  }

  .duration-stats {
    text-align: left;
  }

  .calc-input-group {
    grid-template-columns: 1fr;
  }

  .undercut-pricing {
    grid-template-columns: 1fr;
  }

  .performance-table {
    font-size: 0.8rem;
  }

  .performance-table th,
  .performance-table td {
    padding: 8px;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.auction-analytics-card {
  animation: fadeIn 0.3s ease-out;
}

.analytics-row:nth-child(1) .auction-analytics-card {
  animation-delay: 0.05s;
}

.analytics-row:nth-child(2) .auction-analytics-card {
  animation-delay: 0.1s;
}

.analytics-row:nth-child(3) .auction-analytics-card {
  animation-delay: 0.15s;
}

.analytics-row:nth-child(4) .auction-analytics-card {
  animation-delay: 0.2s;
}

.analytics-row:nth-child(5) .auction-analytics-card {
  animation-delay: 0.25s;
}

/* Loading state */
.auction-analytics-card.loading {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

/* Empty state */
.auction-analytics-card .muted {
  text-align: center;
  padding: 40px 20px;
  font-size: 0.9rem;
}

/* ===== G/S/C Input Styles ===== */
.gsc-input {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gsc-input input[type="number"] {
  width: 60px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.95rem;
}

.gsc-input .coin-label {
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 15px;
}

.coin-label.coin-gold {
  color: #f59e0b;
}

.coin-label.coin-silver {
  color: #9ca3af;
}

.coin-label.coin-copper {
  color: #b45309;
}

/* ===== Price History Legend ===== */
.price-legend {
  display: flex;
  gap: 16px;
  margin: 12px 0;
  padding: 8px;
  background: #f9fafb;
  border-radius: 4px;
  font-size: 0.85rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* ===== Enhanced Competitor Analysis ===== */
.competitor-analysis-card .competitor-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fafafa;
}

.competitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.competitor-card {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.competitor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
}

.competitor-rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.competitor-name-lg {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
  padding-right: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.competitor-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.competitor-stat {
  text-align: center;
}

.competitor-stat .stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #059669;
  margin-bottom: 2px;
}

.competitor-stat .stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.competitor-items-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.competitor-item-mini {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: white;
  border-radius: 6px;
  font-size: 0.85rem;
  border: 1px solid #f3f4f6;
}

.item-name-mini {
  color: #374151;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 8px;
}

.item-price-mini {
  color: #059669;
  font-weight: 600;
  white-space: nowrap;
}

.competitor-more-mini {
  color: #6b7280;
  font-size: 0.8rem;
  font-style: italic;
  text-align: center;
  padding: 4px 8px;
}

.competitor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.competitor-summary {
  color: #6b7280;
  font-size: 0.85rem;
  margin-left: auto;
}

.competitor-items {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.competitor-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: white;
  border-radius: 4px;
  font-size: 0.9rem;
}

.competitor-item-row .item-name {
  color: #374151;
  font-weight: 500;
}

.competitor-item-row .item-price {
  color: #059669;
  font-weight: 600;
}

.competitor-more {
  color: #6b7280;
  font-size: 0.85rem;
  font-style: italic;
  padding: 4px 8px;
  text-align: center;
}

/* ===== Responsive Updates ===== */
@media (max-width: 640px) {
  .gsc-input {
    flex-direction: column;
    align-items: stretch;
  }

  .gsc-input input[type="number"] {
    width: 100%;
  }

  .price-legend {
    flex-direction: column;
    gap: 8px;
  }

  .competitor-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .competitor-summary {
    margin-left: 0;
  }

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

/* ===== Auction History Table ===== */
.auction-history-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auction-history-card h2 {
  margin: 0 0 20px 0;
  color: #1e3a8a;
  font-size: 1.5rem;
}

.history-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

.history-search {
  flex: 1;
  min-width: 250px;
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.history-search:focus {
  outline: none;
  border-color: #3b82f6;
}

.history-stats {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
}

.history-stats span {
  color: #6b7280;
}

.history-stats strong {
  color: #111827;
  font-weight: 600;
}

.table-container {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 20px;
}

.auction-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.auction-history-table thead {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
}

.auction-history-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  position: relative;
  white-space: nowrap;
}

.auction-history-table th:hover {
  background: rgba(255, 255, 255, 0.1);
}

.auction-history-table th.sorted {
  background: rgba(255, 255, 255, 0.15);
}

.sort-arrow {
  margin-left: 4px;
  font-size: 0.8em;
  opacity: 0.7;
}

.auction-history-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s;
}

.auction-history-table tbody tr:hover {
  background-color: #f9fafb;
}

.auction-history-table tbody tr:last-child {
  border-bottom: none;
}

.auction-history-table td {
  padding: 12px 16px;
  color: #374151;
}

.item-name-cell {
  font-weight: 500;
  color: #1e3a8a;
}

.auction-history-table td.center {
  text-align: center;
}

.history-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.page-btn {
  padding: 8px 16px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.page-btn:hover:not(:disabled) {
  background: #2563eb;
}

.page-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

#pageInfo {
  color: #6b7280;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .history-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .history-search {
    min-width: 100%;
  }

  .history-stats {
    flex-direction: column;
    gap: 8px;
  }

  .auction-history-table {
    font-size: 0.8rem;
  }

  .auction-history-table th,
  .auction-history-table td {
    padding: 8px 12px;
  }
}

/* ===== Profit/Loss Display with Arrows ===== */
.profit-gain {
  color: #059669;
  font-weight: 600;
}

.profit-loss {
  color: #dc2626;
  font-weight: 600;
}

.profit-gain::before,
.profit-loss::before {
  font-weight: 700;
  margin-right: 2px;
}

/* Tab Navigation */
.currency-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.currency-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.currency-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.currency-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

/* Financial Health Card */
.finance-health-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.finance-title {
  margin: 0 0 24px 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #2456a5;
}

.finance-stats-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 20px;
}

.finance-stat-main {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff !important;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.finance-stat-main .stat-label {
  font-size: 1.3rem;
  color: #fff !important;
  opacity: 0.95;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value-huge {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff !important;
}

/* Make coins more readable on green background */
.stat-value-huge .coin-gold {
  color: #fef3c7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.stat-value-huge .coin-silver {
  color: #f3f4f6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.stat-value-huge .coin-copper {
  color: #fed7aa;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.finance-stat {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  text-align: center;
}

.finance-stat .stat-label {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.finance-stat .stat-value {
  font-size: 1.3rem;
  font-weight: 700;
}

.stat-value.positive {
  color: #10b981;
}

.stat-value.negative {
  color: #ef4444;
}

/* Coin Styles */
.coin {
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
  margin: 0 2px;
}

.coin-gold {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
}

.coin-silver {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #9ca3af;
}

.coin-copper {
  background: #fed7aa;
  color: #7c2d12;
  border: 1px solid #f97316;
}

/* Prevent coin wrapping in stat displays */
.stat-value-huge,
.stat-value,
.gph-value,
.calc-text {
  white-space: nowrap;
}

/* Override for green background - white coins with subtle backgrounds */
.stat-value-huge .coin-gold {
  background: rgba(254, 243, 199, 0.25);
  color: #fef3c7;
  border: 1px solid rgba(251, 191, 36, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.stat-value-huge .coin-silver {
  background: rgba(243, 244, 246, 0.25);
  color: #f3f4f6;
  border: 1px solid rgba(156, 163, 175, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.stat-value-huge .coin-copper {
  background: rgba(254, 215, 170, 0.25);
  color: #fed7aa;
  border: 1px solid rgba(249, 115, 22, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Net Worth Chart */
.networth-chart-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.networth-chart-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.networth-canvas {
  width: 100%;
  height: 300px;
  /* Increased from 200px for full-width display */
  border-radius: 8px;
  background: #f7fafc;
}

/* Gold Per Hour Table */
.gph-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 800px;
  /* Increased from 500px for full-width display with 20 rows */
  overflow-y: auto;
}

.gph-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.gph-table {
  width: 100%;
  border-collapse: collapse;
}

.gph-table thead {
  background: #f7fafc;
  position: sticky;
  top: 50px;
  z-index: 1;
}

.gph-table th {
  text-align: left;
  padding: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6e7f9b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e6eefb;
}

.gph-table td {
  padding: 12px;
  border-bottom: 1px solid #f0f4f8;
  color: #334e88;
  font-size: 0.95rem;
}

.gph-table tbody tr:hover {
  background: #f7fafc;
}

.gph-value {
  font-weight: 700;
  color: #10b981;
}

.gph-average {
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #eef4ff 0%, #d7e3fb 100%);
  border-radius: 10px;
  text-align: center;
  color: #334e88;
  font-size: 1rem;
  border: 1px solid #d7e3fb;
}

.gph-average strong {
  color: #10b981;
  font-size: 1.1rem;
}

/* Milestones */
.milestones-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.milestones-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.milestone-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.milestone-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  padding: 14px;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.milestone-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.milestone-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(251, 191, 36, 0.3);
}

.milestone-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.milestone-title {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
}

.milestone-desc {
  color: #6e7f9b;
  font-size: 0.85rem;
}

/* Epic Flying Calculator */
.epic-flying-calc {
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
  border-radius: 12px;
  border: 2px solid #fb923c;
}

.calc-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #c2410c;
  margin-bottom: 12px;
  text-align: center;
}

.calc-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-bar {
  height: 24px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #fb923c;
}

.calc-fill {
  height: 100%;
  background: linear-gradient(90deg, #fb923c 0%, #f97316 100%);
  transition: width 0.5s ease-out;
}

.calc-text {
  text-align: center;
  font-weight: 600;
  color: #c2410c;
  font-size: 0.95rem;
}

/* Recent Loot */
.recent-loot-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.recent-loot-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.loot-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.loot-item {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border-radius: 10px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.loot-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.loot-name {
  font-weight: 600;
  font-size: 0.95rem;
}

/* WoW Item Quality Colors */
.quality-poor {
  color: #9d9d9d;
}

.quality-common {
  color: #334e88;
}

.quality-uncommon {
  color: #1eff00;
  font-weight: 700;
}

.quality-rare {
  color: #0070dd;
  font-weight: 700;
}

.quality-epic {
  color: #a335ee;
  font-weight: 700;
}

.quality-legendary {
  color: #ff8000;
  font-weight: 700;
}

.loot-source {
  color: #6e7f9b;
  font-size: 0.85rem;
}

.loot-time {
  color: #6e7f9b;
  font-size: 0.85rem;
  font-style: italic;
}

/* Responsive */
@media (max-width: 1200px) {
  .finance-stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .gph-table {
    font-size: 0.85rem;
  }

  .gph-table th,
  .gph-table td {
    padding: 8px;
  }
}

/* ============================================================================
   AUCTION HOUSE STYLES
   ============================================================================ */

/* Auction Performance Card */
.auction-performance-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.auction-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.auction-stat {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e6eefb;
  text-align: center;
}

/* Active Auctions */
.active-auctions-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  max-height: 500px;
  overflow-y: auto;
}

.active-auctions-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.auction-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auction-item {
  display: grid;
  grid-template-columns: 2fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f7fafc;
  border-radius: 10px;
  border: 1px solid #e6eefb;
  transition: all 0.2s;
}

.auction-item:hover {
  background: #eef4ff;
  border-color: #d7e3fb;
  transform: translateX(4px);
}

.auction-name {
  font-weight: 600;
  color: #2456a5;
  font-size: 0.95rem;
}

.auction-price {
  font-weight: 700;
  color: #10b981;
  font-size: 0.95rem;
}

.auction-time {
  color: #6e7f9b;
  font-size: 0.85rem;
  font-style: italic;
}

/* Success Rate Card */
.success-rate-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.success-rate-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.success-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.success-circle {
  display: flex;
  justify-content: center;
  align-items: center;
  /* This ensures the SVG fills available space */
  width: 100%;
  max-width: 280px;
}

.success-circle svg {
  width: 100%;
  height: auto;
  /* This prevents any layout shift */
  display: block;
}

.success-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  width: 100%;
}

.success-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.success-label {
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.success-value {
  font-size: 1.75rem;
  font-weight: 700;
}

.success-value.sold {
  color: #10b981;
}

.success-value.expired {
  color: #ef4444;
}

/* Responsive adjustment for smaller screens */
@media (max-width: 768px) {
  .success-circle {
    max-width: 240px;
  }

  .success-circle svg {
    width: 100%;
    height: auto;
  }

  .success-stats {
    gap: 24px;
  }

  .success-value {
    font-size: 1.5rem;
  }
}

/* Best Sellers Table */
.best-sellers-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.best-sellers-card h3 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.25rem;
}

.best-sellers-table {
  width: 100%;
  border-collapse: collapse;
}

.best-sellers-table thead {
  background: #f7fafc;
}

.best-sellers-table th {
  text-align: left;
  padding: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6e7f9b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e6eefb;
}

.best-sellers-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #f0f4f8;
  color: #334e88;
  font-size: 0.95rem;
}

.best-sellers-table tbody tr:hover {
  background: #f7fafc;
}

.best-sellers-table .rank {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #3182ce 0%, #2456a5 100%);
  color: #fff;
  border-radius: 8px;
  text-align: center;
  line-height: 32px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 12px;
}

@media (max-width: 1200px) {
  .auction-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .currency-tabs {
    flex-direction: column;
  }

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

/* Configuration Upload Progress Bar */

.upload-progress-container {
  max-width: 600px;
  margin: 40px auto;
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.08);
}

.progress-bar-wrapper {
  margin: 24px 0;
}

.progress-bar-container {
  height: 40px;
  background: #e6eefb;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(45deg,
      #2456a5 25%,
      #ffffff 25%,
      #ffffff 50%,
      #2456a5 50%,
      #2456a5 75%,
      #ffffff 75%,
      #ffffff);
  background-size: 40px 40px;
  border-radius: 20px;
  transition: width 0.3s ease;
  animation: candy-cane 1s linear infinite;
  box-shadow: 0 2px 8px rgba(36, 86, 165, 0.3);
}

@keyframes candy-cane {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 40px 40px;
  }
}

.progress-text {
  text-align: center;
  margin-top: 16px;
  font-size: 1rem;
  color: #2456a5;
  font-weight: 600;
  min-height: 24px;
}

.progress-message {
  text-align: center;
  margin-top: 8px;
  font-size: 0.9rem;
  color: #6e7f9b;
  font-style: italic;
  min-height: 20px;
}

/* ============================================================================
   TRAVEL LOG STYLES (Matching Currencies Design)
   ============================================================================ */

/* Container */
.travel-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation (Reusing currencies style) */
.travel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.travel-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.travel-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.travel-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

/* Tab Content */
.travel-tab-content {
  display: none;
}

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

.travel-content-wrapper {
  margin-top: 24px;
}

/* ===== Journal Tab (Overview Stats) ===== */

.travel-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.travel-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.travel-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

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

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

.stat-label {
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-sublabel {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 4px;
}

/* Favorite Zone Card */
.favorite-zone-card {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #fbbf24;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
  margin-bottom: 24px;
}

.favorite-zone-card h3 {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  color: #92400e;
}

.favorite-zone-name {
  font-size: 2rem;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 12px;
}

.favorite-zone-stats {
  font-size: 1rem;
  color: #92400e;
  font-weight: 600;
}

/* Zone Timeline Graph */
.zone-timeline-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  margin-bottom: 24px;
}

.zone-timeline-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.zone-timeline-canvas {
  width: 100%;
  height: auto;
  max-width: 1000px;
  display: block;
}

/* ===== Log Tab (Searchable Table) ===== */

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.log-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.log-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.zone-search-input,
.date-input {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.zone-search-input {
  min-width: 200px;
}

.date-input {
  min-width: 140px;
}

.zone-search-input:focus,
.date-input:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.clear-filters-btn {
  padding: 8px 16px;
  background: #f0f4f8;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  color: #2456a5;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-filters-btn:hover {
  background: #e6eefb;
  border-color: #2456a5;
}

.log-table-container {
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  margin-bottom: 12px;
}

.pagination-info {
  text-align: right;
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
}

.travel-log-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.travel-log-table thead {
  background: linear-gradient(135deg, #2456a5 0%, #1e4a8f 100%);
  color: #fff;
}

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

.travel-log-table tbody tr {
  border-bottom: 1px solid #e6eefb;
  transition: background 0.15s;
}

.travel-log-table tbody tr:hover {
  background: #f7fafc;
}

.travel-log-table tbody tr:last-child {
  border-bottom: none;
}

.travel-log-table td {
  padding: 12px 16px;
  color: #374151;
}

.travel-log-table td.muted {
  color: #9ca3af;
  font-size: 0.9rem;
}

/* ===== Heatmap Tab ===== */

.heatmap-section,
.transitions-section,
.subzone-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.heatmap-section h3,
.transitions-section h3,
.subzone-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

/* Heatmap Bars */
.heatmap-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.heatmap-bar-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.heatmap-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.zone-name {
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.zone-percentage {
  font-weight: 700;
  color: #2456a5;
  font-size: 0.9rem;
}

.heatmap-bar-track {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.heatmap-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.5s ease-out;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.heatmap-stats {
  font-size: 0.85rem;
  color: #6e7f9b;
}

/* Zone Transitions */
.transitions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transition-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e6eefb;
}

.transition-route {
  display: flex;
  align-items: center;
  gap: 12px;
}

.from-zone,
.to-zone {
  font-weight: 600;
  color: #374151;
}

.transition-arrow {
  color: #2456a5;
  font-size: 1.2rem;
}

.transition-count {
  font-weight: 600;
  color: #2456a5;
  font-size: 0.9rem;
  background: #eef4ff;
  padding: 4px 12px;
  border-radius: 12px;
}

/* Subzone Table */
.subzone-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.subzone-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.subzone-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.subzone-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.subzone-table tbody tr:hover {
  background: #f7fafc;
}

.subzone-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
  .travel-stats-grid {
    grid-template-columns: 1fr;
  }

  .travel-tabs {
    flex-wrap: wrap;
  }

  .travel-tab {
    flex: 1;
    min-width: 100px;
  }
}

/* ============================================================================
   PROGRESSION / RAIDS STYLES
   ============================================================================ */

/* Container */
.prog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation */
.prog-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.prog-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.prog-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.prog-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

.prog-content-wrapper {
  margin-top: 24px;
}

/* ===== Overview Tab ===== */

.prog-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.prog-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.prog-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

/* Raid Progression */
.raid-progression-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.raid-progression-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.raid-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.raid-card:last-child {
  margin-bottom: 0;
}

.raid-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 12px;
}

.raid-difficulty-row {
  display: grid;
  grid-template-columns: 120px 1fr 80px;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.raid-difficulty-row:last-child {
  margin-bottom: 0;
}

.diff-name {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.raid-progress-bar {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.raid-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  transition: width 0.5s ease-out;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.raid-progress-text {
  font-weight: 700;
  color: #2456a5;
  font-size: 0.9rem;
  text-align: right;
}

/* Difficulty Breakdown */
.difficulty-breakdown-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.difficulty-breakdown-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
  align-self: flex-start;
}

.difficulty-pie-chart {
  margin-bottom: 20px;
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 400px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  font-weight: 600;
  color: #374151;
}

.legend-value {
  color: #6e7f9b;
  font-weight: 600;
}

/* ===== Boss Kills Tab ===== */

.boss-kills-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.boss-kills-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.boss-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.boss-search-input,
.difficulty-filter {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.boss-search-input {
  min-width: 220px;
}

.difficulty-filter {
  min-width: 160px;
}

.boss-search-input:focus,
.difficulty-filter:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.boss-kills-table-container {
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  margin-bottom: 12px;
}

.boss-kills-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.boss-kills-table thead {
  background: linear-gradient(135deg, #2456a5 0%, #1e4a8f 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.boss-kills-table tbody tr {
  border-bottom: 1px solid #e6eefb;
  transition: background 0.15s;
}

.boss-kills-table tbody tr:hover {
  background: #f7fafc;
}

.boss-kills-table td {
  padding: 12px 16px;
  color: #374151;
}

.difficulty-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.diff-normal {
  background: #e0f2fe;
  color: #0369a1;
}

.diff-heroic {
  background: #fef3c7;
  color: #92400e;
}

.diff-mythic {
  background: #fce7f3;
  color: #9f1239;
}

/* ===== Lockouts Tab ===== */

.lockouts-section,
.lockout-history-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.lockouts-section h3,
.lockout-history-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.lockouts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.lockout-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
}

.lockout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.lockout-instance {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
}

.lockout-difficulty {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6e7f9b;
  background: #e6eefb;
  padding: 4px 8px;
  border-radius: 4px;
}

.lockout-progress {
  margin-bottom: 12px;
}

.lockout-progress-bar {
  height: 20px;
  background: #e6eefb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
}

.lockout-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-radius: 10px;
  transition: width 0.5s ease-out;
}

.lockout-progress-text {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 600;
}

.lockout-reset {
  font-size: 0.9rem;
  color: #374151;
  font-weight: 600;
}

.extended-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Lockout History Table */
.lockout-history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.lockout-history-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.lockout-history-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.lockout-history-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.lockout-history-table tbody tr:hover {
  background: #f7fafc;
}

.lockout-history-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
  .prog-stats-grid {
    grid-template-columns: 1fr;
  }

  .prog-tabs {
    flex-wrap: wrap;
  }

  .prog-tab {
    flex: 1;
    min-width: 100px;
  }

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

/* ============================================================================
   QUESTS STYLES
   ============================================================================ */

/* Container */
.quest-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation */
.quest-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.quest-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.quest-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.quest-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

.quest-content-wrapper {
  margin-top: 24px;
}

/* ===== Overview Tab ===== */

.quest-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.quest-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.quest-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

/* Most Rewarding Quest Card */
.most-rewarding-quest-card {
  background: linear-gradient(135deg, #ffe064 0%, #775f00 100%);
  border: 2px solid #fbbf24;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
  margin-bottom: 24px;
}

.most-rewarding-quest-card h3 {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  color: #92400e;
}

.rewarding-quest-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 12px;
}

.rewarding-quest-details {
  display: flex;
  gap: 20px;
  justify-content: center;
  font-size: 1.1rem;
  color: #92400e;
  font-weight: 600;
}

/* Quest Trends */
.quest-trends-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.quest-trends-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.quest-trends-canvas {
  width: 100%;
  height: auto;
  max-width: 1000px;
  display: block;
}

/* Quests by Zone */
.quests-by-zone-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.quests-by-zone-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.zone-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zone-bar-container {
  display: grid;
  grid-template-columns: 200px 1fr 60px;
  align-items: center;
  gap: 12px;
}

.zone-bar-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.zone-bar-track {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
}

.zone-bar-fill {
  height: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  transition: width 0.5s ease-out;
}

.zone-bar-count {
  font-weight: 700;
  color: #2456a5;
  text-align: right;
}

/* ===== Quest Log Tab ===== */

.quest-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.quest-log-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.quest-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.quest-search-input,
.level-input {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.quest-search-input {
  min-width: 220px;
}

.level-input {
  width: 90px;
}

.quest-search-input:focus,
.level-input:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.quest-log-table-container {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  margin-bottom: 24px;
}

.quest-log-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.quest-log-table thead {
  background: linear-gradient(135deg, #2456a5 0%, #1e4a8f 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.quest-log-table tbody tr {
  border-bottom: 1px solid #e6eefb;
  transition: background 0.15s;
}

.quest-log-table tbody tr:hover {
  background: #f7fafc;
}

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

/* Notable Quests */
.notable-quests-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.notable-quests-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.notable-quests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.notable-quest-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
}

.notable-quest-card h4 {
  margin: 0 0 12px 0;
  color: #2456a5;
  font-size: 1rem;
}

.notable-quest-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notable-quest-card li {
  padding: 6px 0;
  color: #374151;
  font-size: 0.9rem;
  border-bottom: 1px solid #e6eefb;
}

.notable-quest-card li:last-child {
  border-bottom: none;
}

/* ===== Rewards Tab ===== */

.reward-quality-section,
.reward-slot-section,
.top-rewards-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.reward-quality-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reward-quality-section h3,
.reward-slot-section h3,
.top-rewards-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
  align-self: flex-start;
}

.quality-pie-chart {
  margin-bottom: 20px;
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 400px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  font-weight: 600;
  color: #374151;
}

.legend-value {
  color: #6e7f9b;
  font-weight: 600;
}

/* Slot Distribution */
.slot-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slot-bar-container {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  align-items: center;
  gap: 12px;
}

.slot-bar-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.slot-bar-track {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
}

.slot-bar-fill {
  height: 100%;
  background: linear-gradient(135deg, #3182ce 0%, #1e4a8f 100%);
  border-radius: 12px;
  transition: width 0.5s ease-out;
}

.slot-bar-count {
  font-weight: 700;
  color: #2456a5;
  text-align: right;
}

/* Top Rewards Gallery */
.reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.reward-card {
  background: linear-gradient(135deg, #262b33 0%, #1e5275 100%);
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 12px;
}

.reward-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.reward-count {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .quest-stats-grid {
    grid-template-columns: 1fr;
  }

  .quest-tabs {
    flex-wrap: wrap;
  }

  .quest-tab {
    flex: 1;
    min-width: 100px;
  }

  .zone-bar-container,
  .slot-bar-container {
    grid-template-columns: 150px 1fr 50px;
  }

  .notable-quests-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   PROFESSIONS / SKILLS STYLES
   ============================================================================ */

/* Container */
.prof-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation */
.prof-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.prof-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.prof-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.prof-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

.prof-content-wrapper {
  margin-top: 24px;
}

/* ===== Overview Tab ===== */

.prof-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.prof-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.prof-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

/* Professions Section */
.professions-section,
.secondary-section,
.recipe-counts-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.professions-section h3,
.secondary-section h3,
.recipe-counts-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.profession-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.profession-card {
  background: linear-gradient(135deg, #f7fafc 0%, #eef4ff 100%);
  border: 1px solid #d7e3fb;
  border-radius: 8px;
  padding: 16px;
}

.profession-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.profession-name {
  font-weight: 700;
  color: #2456a5;
  font-size: 1.1rem;
}

.profession-rank {
  font-weight: 600;
  color: #6e7f9b;
  font-size: 0.95rem;
}

.profession-progress-bar {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}

.profession-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  transition: width 0.5s ease-out;
}

.profession-stats {
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
}

/* Secondary Skills */
.secondary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.secondary-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
}

.secondary-name {
  font-weight: 700;
  color: #374151;
  margin-bottom: 12px;
  font-size: 1rem;
}

.secondary-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.secondary-progress-bar {
  flex: 1;
  height: 20px;
  background: #e6eefb;
  border-radius: 10px;
  overflow: hidden;
}

.secondary-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #3182ce 0%, #1e4a8f 100%);
  border-radius: 10px;
  transition: width 0.5s ease-out;
}

.secondary-rank {
  font-weight: 600;
  color: #2456a5;
  font-size: 0.9rem;
  min-width: 60px;
  text-align: right;
}

/* Recipe Counts Table */
.recipe-counts-table {
  width: 100%;
  border-collapse: collapse;
}

.recipe-counts-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.recipe-counts-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.recipe-counts-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.recipe-counts-table tbody tr:hover {
  background: #f7fafc;
}

.recipe-counts-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

/* ===== Recipes Tab ===== */

.recipes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.recipes-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.recipe-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.recipe-search-input,
.profession-filter {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.recipe-search-input {
  min-width: 220px;
}

.profession-filter {
  min-width: 160px;
}

.recipe-search-input:focus,
.profession-filter:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.recipe-cards-container {
  margin-bottom: 24px;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.recipe-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

.recipe-card-name {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
  margin-bottom: 8px;
}

.recipe-card-profession {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 600;
  margin-bottom: 6px;
}

.recipe-card-type {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 4px;
}

.recipe-card-cooldown {
  font-size: 0.85rem;
  color: #f59e0b;
  font-weight: 600;
  margin-top: 8px;
}

/* Notable Recipes */
.notable-recipes-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.notable-recipe-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.notable-recipe-card h4 {
  margin: 0 0 16px 0;
  color: #2456a5;
  font-size: 1.1rem;
}

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

.notable-recipe-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f7fafc;
  border-radius: 6px;
  border: 1px solid #e6eefb;
}

.recipe-name {
  font-weight: 600;
  color: #374151;
  flex: 1;
}

.recipe-prof,
.recipe-cooldown {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .prof-stats-grid {
    grid-template-columns: 1fr;
  }

  .prof-tabs {
    flex-wrap: wrap;
  }

  .prof-tab {
    flex: 1;
    min-width: 100px;
  }

  .profession-cards,
  .secondary-cards,
  .recipe-grid {
    grid-template-columns: 1fr;
  }

  .notable-recipes-section {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   ACHIEVEMENTS STYLES
   ============================================================================ */

/* Container */
.ach-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Navigation */
.ach-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.ach-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.ach-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.ach-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

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

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

.ach-content-wrapper {
  margin-top: 24px;
}

/* ===== Overview Tab ===== */

.ach-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.ach-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ach-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

/* Categories */
.category-section,
.recent-achievements-section,
.highest-achievements-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.category-section h3,
.recent-achievements-section h3,
.highest-achievements-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.category-card {
  background: linear-gradient(135deg, #f7fafc 0%, #eef4ff 100%);
  border: 1px solid #d7e3fb;
  border-radius: 8px;
  padding: 16px;
}

.category-name {
  font-weight: 700;
  color: #2456a5;
  font-size: 1rem;
  margin-bottom: 12px;
}

.category-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
}

/* Recent Achievements */
.recent-achievements-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-achievement-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  gap: 16px;
}

.achievement-content {
  flex: 1;
}

.achievement-name {
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 4px;
}

.achievement-desc {
  font-size: 0.85rem;
  color: #6e7f9b;
}

.achievement-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.achievement-points {
  font-weight: 700;
  color: #f59e0b;
  font-size: 0.95rem;
}

.achievement-date {
  font-size: 0.85rem;
  color: #9ca3af;
}

/* Highest Achievements Table */
.highest-achievements-table {
  width: 100%;
  border-collapse: collapse;
}

.highest-achievements-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.highest-achievements-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.highest-achievements-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.highest-achievements-table tbody tr:hover {
  background: #f7fafc;
}

.highest-achievements-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

.points-cell {
  color: #f59e0b;
  font-weight: 700;
}

/* ===== Collections Tab ===== */

.mounts-section,
.pets-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.mounts-section h3,
.pets-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.collection-card {
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.collection-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

.collection-card.active-mount,
.collection-card.active-pet {
  border: 2px solid #10b981;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.collection-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
}

.collection-icon-placeholder {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: #e6eefb;
  border-radius: 8px;
}

.collection-name {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.active-badge {
  margin-top: 8px;
  padding: 4px 8px;
  background: #10b981;
  color: #fff;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ===== Timeline Tab ===== */

.spam-days-section,
.monthly-graph-section,
.timeline-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.spam-days-section h3,
.monthly-graph-section h3,
.timeline-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

/* Spam Days */
.spam-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.spam-day-card {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #fbbf24;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.spam-day-date {
  font-weight: 700;
  color: #92400e;
  font-size: 1rem;
  margin-bottom: 8px;
}

.spam-day-stats {
  font-size: 0.9rem;
  color: #78350f;
  font-weight: 600;
}

.spam-day-count {
  margin-bottom: 4px;
}

/* Monthly Graph */
.monthly-graph-canvas {
  width: 100%;
  height: auto;
  max-width: 1000px;
  display: block;
}

/* Timeline */
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.timeline-search {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  min-width: 250px;
  transition: border-color 0.2s;
}

.timeline-search:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 600px;
  overflow-y: auto;
}

.timeline-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #f7fafc;
  border: 1px solid #e6eefb;
  border-radius: 8px;
}

.timeline-date {
  min-width: 120px;
  font-weight: 600;
  color: #6e7f9b;
  font-size: 0.9rem;
}

.timeline-achievement {
  flex: 1;
}

.timeline-name {
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 6px;
}

.timeline-points {
  font-size: 0.85rem;
  color: #f59e0b;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .ach-stats-grid {
    grid-template-columns: 1fr;
  }

  .ach-tabs {
    flex-wrap: wrap;
  }

  .ach-tab {
    flex: 1;
    min-width: 100px;
  }

  .category-grid,
  .collection-grid,
  .spam-days-grid {
    grid-template-columns: 1fr;
  }

  .recent-achievement-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .achievement-meta {
    align-items: flex-start;
  }

  .timeline-item {
    flex-direction: column;
    gap: 8px;
  }

  .timeline-date {
    min-width: auto;
  }
}

/* ===== ITEMS PAGE STYLES - CONSOLIDATED & FIXED ===== */

/* Tab styling */
.items-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 8px;
}

.items-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 500;
  font-size: 1rem;
  color: #6b7280;
  transition: all 0.2s;
}

.items-tab:hover {
  color: #1e3a8a;
  background: #f3f4f6;
  border-radius: 8px 8px 0 0;
}

.items-tab.active {
  color: #1e3a8a;
  border-bottom-color: #1e3a8a;
  font-weight: 600;
}

.items-tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

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

/* Vault Overview */
.vault-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.vault-stat-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
  padding: 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vault-stat-icon {
  font-size: 3rem;
  opacity: 0.9;
}

.vault-stat-content {
  flex: 1;
}

.vault-stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 4px;
}

.vault-stat-value {
  font-size: 2rem;
  font-weight: 700;
}

/* Vault Sections */
.vault-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.vault-section h3 {
  margin: 0 0 20px 0;
  color: #1e3a8a;
  font-size: 1.3rem;
}

/* Quality Chart */
.quality-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quality-bar {
  display: grid;
  grid-template-columns: 120px 1fr 80px;
  align-items: center;
  gap: 12px;
}

.quality-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.quality-bar-fill {
  height: 24px;
  border-radius: 4px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.quality-bar:hover .quality-bar-fill {
  opacity: 1;
}

.quality-count {
  text-align: right;
  font-weight: 700;
  color: #111827;
}

/* Vault Items List */
.vault-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vault-item-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  transition: background 0.2s;
}

.vault-item-row:hover {
  background: #f3f4f6;
}

.vault-item-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.vault-item-ilvl {
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 600;
}

.vault-item-location {
  color: #6b7280;
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 500;
}

/* Bags/Bank/Mail - Grid Display */
.bag-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bag-container h3 {
  margin: 0 0 20px 0;
  color: #1e3a8a;
  font-size: 1.2rem;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.item-card {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.item-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.item-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  border: 2px solid #d1d5db;
}

/* Item card text - DARK version (used in bags/bank/mail) */
.item-name-dark {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  /* Quality color applied via inline style - NO text shadow needed */
}

.item-count-dark {
  font-size: 1rem;
  color: #111827;
  font-weight: 700;
}

.item-ilvl-dark {
  font-size: 0.85rem;
  color: #374151;
  margin-top: 4px;
  font-weight: 600;
}

.item-sender-dark {
  font-size: 0.8rem;
  color: #374151;
  margin-top: 4px;
  font-style: italic;
  font-weight: 500;
}

/* Combined Tab */
.combined-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.combined-container h3 {
  margin: 0 0 20px 0;
  color: #1e3a8a;
  font-size: 1.3rem;
}

.combined-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

.combined-search {
  flex: 1;
  min-width: 250px;
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.combined-search:focus {
  outline: none;
  border-color: #3b82f6;
}

.combined-count {
  color: #6b7280;
  font-size: 0.95rem;
}

.combined-count strong {
  color: #111827;
  font-weight: 600;
}

.combined-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.combined-table thead {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
}

.combined-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.combined-table th:hover {
  background: rgba(255, 255, 255, 0.1);
}

.combined-table th.sorted {
  background: rgba(255, 255, 255, 0.15);
}

.sort-arrow {
  margin-left: 4px;
  font-size: 0.8em;
  opacity: 0.7;
}

.combined-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s;
}

.combined-table tbody tr:hover {
  background-color: #f9fafb;
}

.combined-table tbody td {
  padding: 12px 16px;
  color: #111827;
}

.combined-table tbody td strong {
  font-weight: 700;
}

.combined-table td.center {
  text-align: center;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .vault-overview {
    grid-template-columns: 1fr;
  }

  .vault-item-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
  }

  .item-icon {
    width: 48px;
    height: 48px;
  }

  .combined-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .combined-search {
    min-width: 100%;
  }

  .combined-table {
    font-size: 0.8rem;
  }

  .combined-table th,
  .combined-table td {
    padding: 8px 12px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.muted {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Dashboard Tabs */
.dashboard-tabs {
  display: flex;
  gap: 8px;
  margin: 24px 0;
  border-bottom: 2px solid #e2e8f0;
  padding: 0 20px;
}

.dashboard-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #64748b;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: -2px;
}

.dashboard-tab:hover {
  color: #2456a5;
  background: #f8fafc;
}

.dashboard-tab.active {
  color: #2456a5;
  border-bottom-color: #2456a5;
  background: #f8fafc;
}

.dashboard-content-wrapper {
  padding: 20px;
}

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

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

/* Gear Tab - Paper Doll */
.paperdoll-card {
  min-height: auto;
  margin-bottom: 20px;
}

.upgrade-opportunities-card {
  width: 100%;
}

.paperdoll {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  margin-top: 20px;
}

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

.paperdoll-center {
  justify-content: center;
  gap: 20px;
}

.equipment-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: #001933;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.equipment-slot:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.equipment-slot.empty {
  opacity: 0.6;
}

.equipment-slot.needs-upgrade {
  border-color: #ff0000;
  background: #370000;
}

.slot-icon {
  width: 40px;
  height: 40px;
  border: 2px solid #9d9d9d;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: #1e293b;
  flex-shrink: 0;
  position: relative;
}

.slot-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.slot-icon.empty-slot {
  background: #e2e8f0;
  color: #94a3b8;
  border-color: #cbd5e1;
}

.slot-info {
  flex: 1;
  min-width: 0;
}

.slot-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-ilvl {
  font-size: 0.85rem;
  color: #64748b;
}

.slot-empty {
  font-size: 0.85rem;
  color: #94a3b8;
  font-style: italic;
}

.upgrade-flag {
  font-size: 0.75rem;
  color: #f59e0b;
  font-weight: 600;
}

/* Upgrade Opportunities */
.upgrade-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.upgrade-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #181400;
  border: 2px solid #ffdd00;
  border-radius: 8px;
}

.upgrade-slot {
  font-weight: 700;
  color: #92400e;
  min-width: 80px;
}

.upgrade-info {
  flex: 1;
}

.upgrade-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.upgrade-deficit {
  font-size: 0.85rem;
  color: #78350f;
  margin-top: 4px;
}

.deficit-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #dc2626;
  color: white;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
  margin-left: 8px;
}

.success-message {
  color: #16a34a;
  font-weight: 600;
  padding: 20px;
  text-align: center;
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  border-radius: 8px;
  margin-top: 16px;
}

/* Stats Tab */
.stats-bars-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.stat-bar-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-bar-label {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
}

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

.stat-bar-container {
  width: 100%;
  height: 24px;
  background: #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.3s ease;
  position: relative;
}

.stat-bar-fill.health {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

.stat-bar-fill.mana {
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
}

.stat-bar-fill.ilvl {
  background: linear-gradient(90deg, #7c3aed 0%, #a855f7 100%);
}

/* Stat Trends */
.trends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.trend-item {
  padding: 16px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  text-align: center;
}

.trend-label {
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.trend-indicator {
  font-size: 1.3rem;
  font-weight: 700;
}

.trend-indicator.up {
  color: #16a34a;
}

.trend-indicator.down {
  color: #dc2626;
}

.trend-indicator.neutral {
  color: #64748b;
}

/* Talent Points Tab */
.talents-card {
  max-width: 100%;
}

.talent-trees-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.talent-tree-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
}

.talent-tree-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.talent-tree-header h4 {
  margin: 0;
  color: #1e293b;
  font-size: 1.1rem;
}

.talent-tree-points {
  font-weight: 700;
  color: #2456a5;
  font-size: 1.1rem;
}

.talent-tree-bar-container {
  width: 100%;
  height: 20px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.talent-tree-bar {
  height: 100%;
  background: linear-gradient(90deg, #2456a5 0%, #3b6fd9 100%);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.talent-tree-percentage {
  text-align: center;
  font-weight: 600;
  color: #64748b;
  font-size: 0.9rem;
}

.talents-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.talent-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.talent-item:hover {
  border-color: #2456a5;
  box-shadow: 0 2px 8px rgba(36, 86, 165, 0.1);
}

.talent-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  position: relative;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  font-size: 1.2rem;
}

.talent-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.talent-rank {
  position: absolute;
  bottom: -6px;
  right: -6px;
  background: #2456a5;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 2px solid white;
}

.talent-info {
  flex: 1;
  min-width: 0;
}

.talent-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.talent-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .paperdoll {
    grid-template-columns: 1fr;
  }

  .paperdoll-center {
    flex-direction: row;
    justify-content: space-around;
  }

  .talent-trees-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-tabs {
    overflow-x: auto;
    padding: 0 10px;
  }

  .dashboard-tab {
    padding: 10px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
  }
}

/* ========================================
   MORTALITY SECTION STYLES - Light Theme
   ======================================== */

/* Mortality Header */
.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;
}

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

/* Death Subtitle */
.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 */
.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 */
.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 */
.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 Chart */
.death-trend-chart {
  grid-column: 1 / -1;
  width: 100%;
  height: 250px;
  margin-top: 15px;
  background: #f8fafc;
  border-radius: 8px;
}

/* Interesting Stats Grid */
.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 */
.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 */
.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 */
.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;
}

.muted {
  color: #94a3b8;
  font-style: italic;
}

/* Override dash-card for mortality to allow proper 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;
}

/* Tab content visibility */
.mortality-tab-content {
  display: none;
}

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

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

/* Responsive adjustments */
@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 some 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;
  }
}

@media (max-width: 480px) {

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

/* ==========================================================================
   WhoDASH Quests - Enhanced Styles for Quest Events & Timeline
   Add this to your existing CSS file or include it separately
   ========================================================================== */

/* Current Quest Log Section */
.current-quest-log-section {
  margin-bottom: 2rem;
}

.current-quest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.current-quest-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s;
}

.current-quest-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.current-quest-card.quest-complete {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #22c55e;
}

.quest-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.quest-card-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: #1f2937;
  flex: 1;
}

.quest-complete-badge {
  background: #22c55e;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.quest-objectives {
  margin: 0.75rem 0;
}

.objective-item {
  padding: 0.5rem;
  margin: 0.25rem 0;
  background: #f9fafb;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #4b5563;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.objective-item.objective-complete {
  background: #d1fae5;
  color: #065f46;
  text-decoration: line-through;
}

.objective-progress {
  margin-left: auto;
  font-weight: 600;
  color: #6366f1;
}

.quest-card-footer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.85rem;
}

/* Quest Event History Section */
.quest-event-history-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
}

.quest-event-timeline {
  max-height: 600px;
  overflow-y: auto;
  margin-top: 1rem;
  padding-right: 0.5rem;
}

.quest-event-timeline::-webkit-scrollbar {
  width: 8px;
}

.quest-event-timeline::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.quest-event-timeline::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.quest-event-timeline::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.quest-event-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #cbd5e1;
  transition: all 0.2s;
}

.quest-event-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.event-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 50%;
}

.event-content {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.event-kind {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: #e5e7eb;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #4b5563;
  margin-bottom: 0.25rem;
}

.event-detail {
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: #f3f4f6;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #6b7280;
}

.event-time {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Success stat card highlight */
.stat-card-success {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #22c55e !important;
}

.stat-card-success .stat-value {
  color: #16a34a;
}

/* Quest Level Distribution */
.quest-level-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.level-bars {
  margin-top: 1rem;
}

.level-bar-container {
  display: grid;
  grid-template-columns: 80px 1fr 60px;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.level-bar-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4b5563;
}

.level-bar-track {
  height: 28px;
  background: #f1f5f9;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.level-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 14px;
  transition: width 0.5s ease;
}

.level-bar-count {
  text-align: right;
  font-weight: 600;
  color: #6366f1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .current-quest-grid {
    grid-template-columns: 1fr;
  }

  .quest-event-item {
    flex-direction: column;
    gap: 0.75rem;
  }

  .event-icon {
    width: 100%;
    height: 48px;
  }

  .level-bar-container {
    grid-template-columns: 60px 1fr 50px;
    gap: 0.75rem;
  }
}

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

.quest-stat-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s;
}

.quest-stat-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 500;
}

.stat-sublabel {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

/* Canvas containers */
.quest-trends-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.quest-trends-canvas,
.quest-timeline-canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

/* ===================================================================
   Combat Analytics Styles
   =================================================================== */

/* Tab Navigation */
.combat-tabs-container {
  margin-bottom: 32px;
}

.combat-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
}

.combat-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  bottom: -2px;
}

.combat-tab:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.combat-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.combat-tab-content {
  position: relative;
}

.combat-tab-pane {
  display: none;
}

.combat-tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* Combat Overview Card */
.combat-overview-card {
  background: linear-gradient(135deg, #991b1b 0%, #450a0a 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.combat-title {
  color: #f1f5f9;
  font-size: 1.75rem;
  margin: 0 0 24px 0;
  font-weight: 600;
}

.combat-stats-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .combat-stats-grid {
    grid-template-columns: 1fr;
  }
}

.combat-stat-main {
  grid-column: span 1;
  text-align: center;
  padding: 24px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 12px;
  border: 2px solid rgba(239, 68, 68, 0.3);
}

.combat-stat {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.stat-value-huge {
  font-size: 3rem;
  font-weight: 700;
  color: #ef4444;
  margin: 8px 0;
  text-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 8px 0;
}

.stat-value.highlight {
  color: #fbbf24;
}

.stat-label {
  font-size: 0.875rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.stat-sublabel {
  font-size: 0.875rem;
  color: #cbd5e1;
  margin-top: 4px;
}

/* Chart Cards */
.dps-chart-card,
.combat-breakdown-card,
.instance-performance-card,
.dps-distribution-card,
.role-performance-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.dps-chart-card h3,
.combat-breakdown-card h3,
.instance-performance-card h3,
.dps-distribution-card h3,
.role-performance-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.dps-canvas,
.combat-breakdown-card canvas,
.instance-performance-card canvas,
.dps-distribution-card canvas {
  display: block;
  margin: 20px auto;
}

/* Pie Chart Legend */
.pie-legend {
  margin-top: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px;
  background: #f8fafc;
  border-radius: 6px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.legend-label {
  flex: 1;
  color: #475569;
  font-weight: 500;
}

.legend-value {
  color: #64748b;
  font-weight: 600;
}

/* Boss Encounters Table */
.boss-table-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.boss-table-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.boss-table-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.filter-buttons {
  display: flex;
  gap: 8px;
}

.filter-btn {
  padding: 8px 16px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.filter-btn.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.table-wrapper {
  overflow-x: auto;
  margin-bottom: 16px;
}

.boss-encounters-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.boss-encounters-table thead {
  background: #f8fafc;
}

.boss-encounters-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.boss-encounters-table th:hover {
  background: #f1f5f9;
}

.boss-encounters-table th.sorted {
  background: #e0e7ff;
  color: #3b82f6;
}

.sort-arrow {
  margin-left: 4px;
  font-size: 12px;
  color: #94a3b8;
}

.boss-encounters-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s;
}

.boss-encounters-table tbody tr:hover {
  background: #f8fafc;
}

.boss-encounters-table td {
  padding: 12px 16px;
  color: #334155;
}

.boss-name {
  font-weight: 600;
  color: #1e293b;
}

.dps-value {
  font-weight: 600;
  color: #64748b;
}

.dps-value.high-dps {
  color: #10b981;
}

.table-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.page-btn {
  padding: 8px 16px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  border-color: #3b82f6;
  color: #3b82f6;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* DPS Distribution */
.percentiles-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .percentiles-info {
    grid-template-columns: 1fr;
  }
}

.percentile-item {
  text-align: center;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
}

.percentile-label {
  display: block;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.percentile-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: #06b6d4;
}

/* Role Performance */
.role-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .role-stats-grid {
    grid-template-columns: 1fr;
  }
}

.role-stat {
  text-align: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
}

/* Section styling */
.combat-section {
  margin-bottom: 48px;
}

.section-title {
  color: #1e293b;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 3px solid #e2e8f0;
}

/* Utility classes */
.muted {
  color: #94a3b8;
  text-align: center;
  padding: 20px;
}

.positive {
  color: #10b981;
}

.negative {
  color: #ef4444;
}

/* ===================================================================
   NEW DPS-SPECIFIC COMPONENTS
   =================================================================== */

/* Burst vs Sustained Analysis */
.burst-analysis-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.burst-analysis-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.burst-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .burst-comparison {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .burst-divider {
    display: none;
  }
}

.burst-item {
  text-align: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
}

.burst-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}

.burst-desc {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 12px;
}

.burst-value {
  font-size: 2rem;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 8px;
}

.burst-value.highlight {
  color: #dc2626;
}

.burst-count {
  font-size: 0.875rem;
  color: #64748b;
}

.burst-divider {
  font-size: 1.5rem;
  font-weight: 700;
  color: #cbd5e1;
}

.burst-insight {
  padding: 16px;
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #1e40af;
}

/* Target Type Analysis */
.target-analysis-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.target-analysis-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.target-comparison {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .target-comparison {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .target-divider {
    display: none;
  }
}

.target-item {
  text-align: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
}

.target-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 12px;
}

.target-value {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.target-value.boss {
  color: #7c3aed;
}

.target-value.adds {
  color: #f97316;
}

.target-detail {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.target-count {
  font-size: 0.875rem;
  color: #94a3b8;
}

.target-divider {
  background: linear-gradient(to bottom, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
}

.target-insight {
  padding: 16px;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #92400e;
}

/* Consistency Metrics */
.consistency-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.consistency-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.consistency-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 968px) {
  .consistency-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .consistency-grid {
    grid-template-columns: 1fr;
  }
}

.consistency-item {
  text-align: center;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.consistency-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.consistency-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #334155;
}

.consistency-rating {
  font-size: 1.25rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  display: inline-block;
}

.consistency-rating.excellent {
  background: #d1fae5;
  color: #065f46;
}

.consistency-rating.good {
  background: #dbeafe;
  color: #1e40af;
}

.consistency-rating.average {
  background: #fef3c7;
  color: #92400e;
}

.consistency-rating.poor {
  background: #fee2e2;
  color: #991b1b;
}

.consistency-insight {
  padding: 16px;
  background: #f0f9ff;
  border-left: 4px solid #0ea5e9;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #075985;
}

/* ===================================================================
   Healing Analytics Styles (Green Theme for Healers)
   =================================================================== */

/* Tab Navigation */
.healing-tabs-container {
  margin-bottom: 32px;
}

.healing-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
}

.healing-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  bottom: -2px;
}

.healing-tab:hover {
  color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.healing-tab.active {
  color: #10b981;
  border-bottom-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.healing-tab-content {
  position: relative;
}

.healing-tab-pane {
  display: none;
}

.healing-tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

/* Healing Overview Card */
.healing-overview-card {
  background: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.healing-title {
  color: #f1f5f9;
  font-size: 1.75rem;
  margin: 0 0 24px 0;
  font-weight: 600;
}

.healing-stats-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .healing-stats-grid {
    grid-template-columns: 1fr;
  }
}

.healing-stat-main {
  grid-column: span 1;
  text-align: center;
  padding: 24px;
  background: rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  border: 2px solid rgba(16, 185, 129, 0.4);
}

.healing-stat {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

/* Chart Cards */
.hps-chart-card,
.healing-breakdown-card,
.instance-performance-card,
.hps-distribution-card,
.overheal-analysis-card,
.efficiency-metrics-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.hps-chart-card h3,
.healing-breakdown-card h3,
.instance-performance-card h3,
.hps-distribution-card h3,
.overheal-analysis-card h3,
.efficiency-metrics-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.hps-canvas,
.healing-breakdown-card canvas,
.instance-performance-card canvas,
.hps-distribution-card canvas {
  display: block;
  margin: 20px auto;
}

/* Healing Encounters Table */
.healing-table-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.healing-table-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.healing-table-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.healing-encounters-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.healing-encounters-table thead {
  background: #f8fafc;
}

.healing-encounters-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.healing-encounters-table th:hover {
  background: #f1f5f9;
}

.healing-encounters-table th.sorted {
  background: #d1fae5;
  color: #10b981;
}

.healing-encounters-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s;
}

.healing-encounters-table tbody tr:hover {
  background: #f8fafc;
}

.healing-encounters-table td {
  padding: 12px 16px;
  color: #334155;
}

.target-name {
  font-weight: 600;
  color: #1e293b;
}

.hps-value {
  font-weight: 600;
  color: #64748b;
}

.hps-value.high-hps {
  color: #10b981;
}

.overheal-value.low-overheal {
  color: #10b981;
  font-weight: 600;
}

.overheal-value.high-overheal {
  color: #ef4444;
  font-weight: 600;
}

/* Overheal Analysis */
.overheal-by-type {
  margin-bottom: 24px;
}

.overheal-by-type h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.type-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.type-item {
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.type-label {
  font-weight: 600;
  color: #475569;
  text-transform: capitalize;
}

.type-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #64748b;
}

.type-value.low-overheal {
  color: #10b981;
}

.type-value.high-overheal {
  color: #ef4444;
}

.type-count {
  margin-left: auto;
  color: #94a3b8;
  font-size: 0.875rem;
}

.improvement-opportunities {
  margin-top: 24px;
}

.improvement-opportunities h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.opportunities-table {
  width: 100%;
  border-collapse: collapse;
}

.opportunities-table thead {
  background: #fef2f2;
}

.opportunities-table th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: #991b1b;
  font-size: 0.875rem;
}

.opportunities-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
}

/* Efficiency Metrics */
.efficiency-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

.efficiency-section h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.efficiency-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.efficiency-item {
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #e2e8f0;
  transition: all 0.2s;
}

.efficiency-item:hover {
  background: #f1f5f9;
  border-left-color: #10b981;
}

.efficiency-target {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.efficiency-stats {
  display: flex;
  gap: 12px;
  font-size: 0.875rem;
}

.efficiency-hps {
  color: #10b981;
  font-weight: 600;
}

.efficiency-overheal {
  font-weight: 600;
}

.efficiency-date {
  color: #94a3b8;
  margin-left: auto;
}

/* Section styling */
.healing-section {
  margin-bottom: 48px;
}

/* Utility classes for healing */
.low-overheal {
  color: #10b981;
}

.high-overheal {
  color: #ef4444;
}

/* ===================================================================
   Tanking Analytics Styles (Blue/Steel Theme for Tanks)
   =================================================================== */

/* Tab Navigation */
.tanking-tabs-container {
  margin-bottom: 32px;
}

.tanking-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
}

.tanking-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  bottom: -2px;
}

.tanking-tab:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.tanking-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.tanking-tab-content {
  position: relative;
}

.tanking-tab-pane {
  display: none;
}

.tanking-tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

/* Tanking Overview Card */
.tanking-overview-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.tanking-title {
  color: #f1f5f9;
  font-size: 1.75rem;
  margin: 0 0 24px 0;
  font-weight: 600;
}

.tanking-stats-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .tanking-stats-grid {
    grid-template-columns: 1fr;
  }
}

.tanking-stat-main {
  grid-column: span 1;
  text-align: center;
  padding: 24px;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  border: 2px solid rgba(59, 130, 246, 0.4);
}

.tanking-stat {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

/* Chart Cards */
.dtps-chart-card,
.tanking-breakdown-card,
.instance-performance-card,
.dtps-distribution-card,
.death-analysis-card,
.survivability-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.dtps-chart-card h3,
.tanking-breakdown-card h3,
.instance-performance-card h3,
.dtps-distribution-card h3,
.death-analysis-card h3,
.survivability-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.dtps-canvas,
.tanking-breakdown-card canvas,
.instance-performance-card canvas,
.dtps-distribution-card canvas {
  display: block;
  margin: 20px auto;
}

/* Tanking Encounters Table */
.tanking-table-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.tanking-table-card h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.tanking-table-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tanking-encounters-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tanking-encounters-table thead {
  background: #f8fafc;
}

.tanking-encounters-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.tanking-encounters-table th:hover {
  background: #f1f5f9;
}

.tanking-encounters-table th.sorted {
  background: #dbeafe;
  color: #3b82f6;
}

.tanking-encounters-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s;
}

.tanking-encounters-table tbody tr:hover {
  background: #f8fafc;
}

.tanking-encounters-table td {
  padding: 12px 16px;
  color: #334155;
}

.dtps-value {
  font-weight: 600;
  color: #64748b;
}

.dtps-value.high-dtps {
  color: #3b82f6;
}

.outcome {
  font-weight: 600;
}

.outcome.survived {
  color: #10b981;
}

.outcome.died {
  color: #ef4444;
}

/* Death Analysis */
.death-analysis-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.death-section h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.killer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.killer-item {
  padding: 12px;
  background: #fef2f2;
  border-radius: 8px;
  border-left: 4px solid #ef4444;
  display: flex;
  align-items: center;
  gap: 8px;
}

.killer-label {
  font-weight: 600;
  color: #991b1b;
  text-transform: capitalize;
}

.killer-count {
  margin-left: auto;
  color: #dc2626;
  font-weight: 700;
}

.hotspot-table,
.recent-deaths-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.hotspot-table thead,
.recent-deaths-table thead {
  background: #fef2f2;
}

.hotspot-table th,
.recent-deaths-table th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: #991b1b;
}

.hotspot-table td,
.recent-deaths-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.death-count-cell {
  color: #dc2626;
  font-weight: 700;
}

/* Survivability Metrics */
.survivability-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

.surv-section h4 {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 1rem;
}

.surv-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.surv-item {
  padding: 12px;
  background: #f0fdf4;
  border-radius: 8px;
  border-left: 4px solid #10b981;
  transition: all 0.2s;
}

.surv-item.dangerous {
  background: #fef2f2;
  border-left-color: #ef4444;
}

.surv-item:hover {
  background: #dcfce7;
}

.surv-item.dangerous:hover {
  background: #fee2e2;
}

.surv-target {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.surv-stats {
  display: flex;
  gap: 12px;
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.surv-dtps {
  color: #3b82f6;
  font-weight: 600;
}

.surv-duration {
  color: #10b981;
  font-weight: 600;
}

.surv-duration.negative {
  color: #ef4444;
}

.surv-damage {
  color: #64748b;
}

.surv-zone {
  color: #94a3b8;
}

.surv-date {
  color: #94a3b8;
  margin-left: auto;
}

/* Section styling */
.tanking-section {
  margin-bottom: 48px;
}

/* Utility classes for tanking */
.high-dtps {
  color: #3b82f6;
}

/* ===================================================================
   Role Performance - Unified Multi-Role Analytics Styles
   =================================================================== */

/* Main Role Tabs (Top Level) */
.role-main-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  border-bottom: 3px solid #e2e8f0;
  padding-bottom: 0;
  flex-wrap: wrap;
}

.role-main-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  background: transparent;
  border: none;
  border-bottom: 4px solid transparent;
  font-size: 1.125rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  bottom: -3px;
}

.role-main-tab:hover {
  background: rgba(0, 0, 0, 0.02);
  color: #334155;
}

.role-main-tab.active {
  color: #1e293b;
  background: rgba(0, 0, 0, 0.02);
  border-bottom-color: #6366f1;
}

.role-main-tab .tab-icon {
  font-size: 1.5rem;
}

.role-main-tab .tab-label {
  font-size: 1rem;
}

/* Role Tab Panes */
.role-tab-panes {
  position: relative;
  min-height: 400px;
}

.role-pane {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.role-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* ===================================================================
   OVERVIEW TAB STYLES
   =================================================================== */

.role-overview-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 24px 0;
}

.primary-role-badge {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 1.125rem;
  margin: 0 auto 32px auto;
  text-align: center;
  display: block;
  width: fit-content;
}

.primary-role-badge.damage {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
  border: 2px solid #ef4444;
}

.primary-role-badge.tanking {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  border: 2px solid #3b82f6;
}

.primary-role-badge.healing {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border: 2px solid #10b981;
}

/* Role Stats Grid */
.role-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

@media (max-width: 1024px) {
  .role-stats-grid {
    grid-template-columns: 1fr;
  }
}

.role-stat-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.role-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.role-stat-card.damage {
  border-top: 4px solid #ef4444;
}

.role-stat-card.tanking {
  border-top: 4px solid #3b82f6;
}

.role-stat-card.healing {
  border-top: 4px solid #10b981;
}

.role-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f1f5f9;
}

.role-card-icon {
  font-size: 2rem;
}

.role-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.role-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.role-stat {
  text-align: center;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.role-stat-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 4px;
}

.role-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.role-stat-value.positive {
  color: #10b981;
}

.role-stat-value.negative {
  color: #ef4444;
}

.role-card-footer {
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

/* Role Distribution Chart */
.role-distribution-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 32px;
  text-align: center;
}

.role-distribution-card h3 {
  margin: 0 0 24px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.role-distribution-card canvas {
  display: block;
  margin: 0 auto 24px auto;
}

/* Pie Legend */
.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  font-weight: 600;
  color: #334155;
}

.legend-value {
  color: #64748b;
  font-size: 0.875rem;
}

/* Role Insights */
.role-insights {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.role-insights h3 {
  margin: 0 0 20px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.insight-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insight-list li {
  padding: 12px 16px;
  background: #f8fafc;
  border-left: 4px solid #6366f1;
  border-radius: 8px;
  color: #334155;
  line-height: 1.6;
}

.insight-list li strong {
  color: #1e293b;
  font-weight: 700;
}

.insight-list li strong.positive {
  color: #10b981;
}

.insight-list li strong.negative {
  color: #ef4444;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .role-main-tabs {
    gap: 8px;
  }

  .role-main-tab {
    padding: 12px 16px;
    font-size: 0.9375rem;
  }

  .role-main-tab .tab-icon {
    font-size: 1.25rem;
  }

  .role-main-tab .tab-label {
    font-size: 0.875rem;
  }

  .role-overview-title {
    font-size: 1.5rem;
  }

  .primary-role-badge {
    font-size: 1rem;
    padding: 10px 20px;
  }

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

/* ===========================================================================
   STYLE.CSS FIXES - Text Contrast and Visual Improvements
   ========================================================================== */

/* FIX #3: Enhanced Equipment Slot Backgrounds */
.equipment-slot.dark-bg {
  background: linear-gradient(135deg, #111314 0%, #3a4567 100%);
  padding: 8px;
  border-radius: 8px;
}

.equipment-slot.dark-bg .slot-ilvl {
  color: #e0e7ff !important;
  font-weight: 600;
}

/* FIX #1: Enhanced Quick Stats Styling */
.quick-stats-grid.enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.quick-stat.enhanced-stat {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.quick-stat.enhanced-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(36, 86, 165, 0.15);
  border-color: #3182ce;
}

.quick-stat.enhanced-stat .stat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.quick-stat.enhanced-stat .quick-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.quick-stat.enhanced-stat .quick-stat-label {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* FIX #2: Leveling Speed Vertical Bar Chart */
.leveling-speed-chart {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 180px;
  padding: 20px 10px 10px;
  background: linear-gradient(to bottom, #f7fafc 0%, #ffffff 100%);
  border-radius: 8px;
  margin: 16px 0;
}

.speed-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 60px;
}

.speed-bar-container {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.speed-bar {
  width: 70%;
  background: linear-gradient(to top, #3182ce 0%, #60a5fa 100%);
  border-radius: 4px 4px 0 0;
  transition: all 0.3s ease;
  box-shadow: 0 -2px 4px rgba(49, 130, 206, 0.3);
}

.speed-bar:hover {
  background: linear-gradient(to top, #2563eb 0%, #3b82f6 100%);
  box-shadow: 0 -4px 8px rgba(37, 99, 235, 0.4);
}

.speed-bar-label {
  margin-top: 8px;
  font-size: 0.75rem;
  color: #475569;
  font-weight: 600;
  text-align: center;
}

.speed-average {
  text-align: center;
  margin-top: 16px;
  padding: 12px;
  background: #eef4ff;
  border-radius: 6px;
  color: #334155;
  font-size: 0.95rem;
}

.speed-average strong {
  color: #2456a5;
  font-weight: 700;
}

/* FIX #7: Highlights List Icon Alignment */
.highlights-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
}

.highlights-list li {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e6eefb;
}

.highlights-list li:last-child {
  border-bottom: none;
}

.highlights-list .hl-icon {
  font-size: 1.5rem;
  margin-right: 12px;
  min-width: 32px;
  text-align: center;
}

.highlights-list .hl-label {
  color: #64748b;
  margin-right: 8px;
  flex: 1;
}

.highlights-list strong {
  color: #2456a5;
  font-weight: 700;
  margin-left: auto;
}

/* FIX #9, #11, #12, #19, #20: Text Contrast Improvements for Travel Log, Professions, Achievements, Progression, Quests */
.stat-value,
.travel-stat-card .stat-value,
.profession-stat-value,
.achievement-stat-value,
.progression-stat-value,
.quest-stat-value {
  color: #1e40af !important;
  /* Darker blue for better contrast */
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Ensure all stat labels have good contrast */
.stat-label,
.travel-stat-card .stat-label,
.profession-stat-label,
.achievement-stat-label,
.progression-stat-label,
.quest-stat-label {
  color: #475569 !important;
  font-weight: 600 !important;
}

/* Fix for zone percentages and counts in Travel Log */
.zone-percentage,
.zone-bar-count {
  color: #1e40af !important;
  font-weight: 700 !important;
}

/* Fix for any light text on light backgrounds */
.light-bg .text-stat,
.travel-stats-grid .stat-value,
.profession-card .stat-value,
.achievement-card .stat-value,
.progression-card .stat-value,
.quest-card .stat-value {
  color: #1e3a8a !important;
  font-weight: 700 !important;
}

/* Improve readability of all numbers in stats cards */
.stat-number,
.count-display,
.value-display {
  color: #1e40af;
  font-weight: 700;
  font-size: 1.1em;
}

/* Make sure sub-labels are also readable */
.stat-sublabel,
.count-sublabel {
  color: #64748b;
  font-weight: 500;
}

/* Override for Combat/Damage Overview - White text, no shadows */
.combat-overview-card .stat-value,
.combat-overview-card .stat-label {
  color: #ffffff !important;
  text-shadow: none !important;
}

/* Override for Tanking Overview - White text, no shadows */
.tanking-overview-card .stat-value,
.tanking-overview-card .stat-label {
  color: #ffffff !important;
  text-shadow: none !important;
}

/* Override for Healing Overview - White text, no shadows */
.healing-overview-card .stat-value,
.healing-overview-card .stat-label {
  color: #ffffff !important;
  text-shadow: none !important;
}

/* Make trend charts responsive */
.dps-canvas,
.hps-canvas,
.dtps-canvas {
  display: block;
  margin: 20px auto;
}

/* Dashboard Styles - Minimal Enhancement */

/* Quick Stats Grid with Icon Boxes */
.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.quick-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.quick-stat:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.quick-stat-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.quick-stat-content {
  flex: 1;
  min-width: 0;
}

.quick-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}

.quick-stat-label {
  font-size: 13px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Leveling Speed Bar Graph - Increased Size */
.level-speed-bars {
  margin-top: 8px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.level-speed-bar {
  display: grid;
  grid-template-columns: 60px 1fr 80px;
  gap: 12px;
  align-items: center;
}

.level-speed-label {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-align: right;
}

.level-speed-bar-track {
  height: 28px;
  background: transparent;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.level-speed-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1976d2, #42a5f5);
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  min-width: 2px;
}

.level-speed-time {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* Recent Milestones - Smaller, Scrollable */
.milestone-timeline {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Custom scrollbar styling */
.milestone-timeline::-webkit-scrollbar {
  width: 8px;
}

.milestone-timeline::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.milestone-timeline::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.milestone-timeline::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.milestone-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 6px;
  flex-shrink: 0;
}

.milestone-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFA000;
  border-radius: 8px;
}

.milestone-content {
  flex: 1;
  min-width: 0;
}

.milestone-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.milestone-desc {
  font-size: 12px;
  color: #666;
}

/* Highlight important milestones */
.milestone-important .milestone-icon {
  background: #E91E63;
}

/* ===================================================================
   Enhanced Mortality Section Styles
   Styles for confidence badges, death cards, killing blows, etc.
   =================================================================== */

/* 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;
}

.conf-none {
  background: #ef4444;
}

.confidence-score-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 1.1em;
  font-weight: 700;
  color: white;
}

.confidence-score-mini {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 600;
  color: white;
}

/* Confidence Distribution */
.confidence-bars {
  margin: 16px 0;
}

.confidence-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.confidence-bar-label {
  font-size: 0.9em;
  font-weight: 600;
  color: #475569;
  text-transform: capitalize;
}

.confidence-bar-container {
  background: #e2e8f0;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
}

.confidence-bar-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.confidence-bar-value {
  font-size: 0.9em;
  font-weight: 600;
  color: #1e293b;
  text-align: right;
}

.accuracy-summary {
  margin-top: 20px;
  padding: 16px;
  background: #f1f5f9;
  border-radius: 8px;
  text-align: center;
}

.accuracy-score {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 1.1em;
}

.accuracy-label {
  font-weight: 600;
  color: #475569;
}

.accuracy-value {
  font-size: 1.5em;
  font-weight: 700;
  color: #22c55e;
}

/* Detection Methods Table */
.detection-methods-table {
  width: 100%;
  border-collapse: collapse;
}

.detection-methods-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f1f5f9;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #cbd5e1;
}

.detection-methods-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.detection-methods-table tr:hover {
  background: #f8fafc;
}

/* Death Statistics Enhancements */
.death-stats-secondary {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9em;
}

.stat-label {
  color: #64748b;
  font-weight: 500;
}

.stat-value {
  font-weight: 700;
  color: #1e293b;
}

/* Lethal Spell Showcase */
.lethal-spell-showcase {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 12px;
  margin: 16px 0;
}

.spell-icon {
  font-size: 3em;
  margin-bottom: 8px;
}

.spell-name {
  font-size: 1.3em;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 12px;
}

.spell-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
}

.spell-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spell-stat-value {
  font-size: 1.5em;
  font-weight: 700;
  color: #92400e;
}

.spell-stat-label {
  font-size: 0.85em;
  color: #78350f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.additional-stats {
  margin-top: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}

/* Chart Legend */
.chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

/* Interesting Stats */
.interesting-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-item-large {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f1f5f9;
  border-radius: 8px;
}

.stat-icon {
  font-size: 2.5em;
}

.stat-content {
  flex: 1;
}

.stat-value-large {
  font-size: 1.8em;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.stat-label-large {
  font-size: 0.9em;
  color: #64748b;
  margin-top: 4px;
}

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

@media (max-width: 768px) {
  .deaths-grid {
    grid-template-columns: 1fr;
  }
}

/* Death Card */
.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;
}

/* Mortality Header */
.mortality-header {
  text-align: center;
  margin-bottom: 32px;
}

.mortality-header h1 {
  font-size: 2.5em;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.mortality-subtitle {
  font-size: 1.1em;
  color: #64748b;
}

/* Death Subtitle */
.death-subtitle {
  text-align: center;
  font-size: 1.2em;
  font-weight: 600;
  color: #3b82f6;
  margin-bottom: 20px;
}

/* Death Stats Grid */
.death-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 20px 0;
}

@media (max-width: 768px) {
  .death-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.death-stat-item {
  text-align: center;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.death-stat-value {
  font-size: 2em;
  font-weight: 700;
  color: #d32f2f;
  line-height: 1;
}

.death-stat-label {
  font-size: 0.85em;
  color: #64748b;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Arch Nemesis */
.arch-nemesis-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nemesis-main {
  text-align: center;
}

.nemesis-name {
  font-size: 1.8em;
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 4px;
}

.nemesis-subtitle {
  font-size: 0.9em;
  color: #64748b;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nemesis-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.nemesis-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

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

.danger-zone {
  padding: 16px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-radius: 8px;
  text-align: center;
}

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

.danger-zone-name {
  font-size: 1.3em;
  font-weight: 700;
  color: #7f1d1d;
  margin-bottom: 4px;
}

.danger-zone-deaths {
  font-size: 0.9em;
  color: #991b1b;
}

/* Boss Death Table */
.boss-death-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.boss-death-table th {
  text-align: left;
  padding: 12px;
  background: #f1f5f9;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #cbd5e1;
}

.boss-death-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.boss-death-table tr:hover {
  background: #f8fafc;
}

.boss-name {
  font-weight: 700;
  color: #1e293b;
}

/* Hardest Boss Card */
.hardest-boss-card {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 2px solid #fca5a5;
}

.hardest-boss-content {
  text-align: center;
}

.hardest-boss-name {
  font-size: 2em;
  font-weight: 700;
  color: #7f1d1d;
  margin-bottom: 12px;
}

.hardest-boss-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
}

.boss-stat-value {
  font-size: 3em;
  font-weight: 700;
  color: #dc2626;
  line-height: 1;
}

.boss-stat-label {
  font-size: 0.9em;
  color: #991b1b;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.boss-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #fca5a5;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
}

.timeline-label {
  font-weight: 600;
  color: #991b1b;
}

.timeline-value {
  color: #7f1d1d;
}

/* Muted text */
.muted {
  color: #94a3b8;
}

/* Dashboard utilities */
.dashboard-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

.dashboard-section {
  width: 100%;
}

.dash-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dash-card h3 {
  font-size: 1.2em;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .death-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .spell-stats {
    flex-direction: column;
    gap: 12px;
  }

  .confidence-bar-row {
    grid-template-columns: 100px 1fr 80px;
  }
}

/* ============================== Bazaar-Specific Styles ============================== */

/* Bazaar character selector option */
.charselect-item.bazaar-option {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-left: 3px solid #2456a5;
}

.charselect-item.bazaar-option:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.charselect-item.bazaar-option.active {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-left-color: #1e40af;
}

/* Stat cards */
.stat-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.stat-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
}

/* Gold pills */
.gold-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.gold-pill .char-name {
  font-weight: 600;
  color: #334155;
}

.gold-pill .gold-value {
  color: #f59e0b;
  font-weight: 700;
}

/* Quality badges */
.quality-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.quality-poor {
  background: #9d9d9d;
  color: white;
}

.quality-common {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
}

.quality-uncommon {
  background: #1eff00;
  color: #064e3b;
}

.quality-rare {
  background: #0070dd;
  color: white;
}

.quality-epic {
  background: #a335ee;
  color: white;
}

.quality-legendary {
  background: #ff8000;
  color: white;
}

/* Lockout cards */
.lockout-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
}

.lockout-instance {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: #1e293b;
}

.lockout-info {
  display: flex;
  gap: 8px;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.lockout-timer {
  font-size: 0.8rem;
  color: #f59e0b;
  font-weight: 600;
}

/* WhoDAT table styling (if not already in main styles) */
.whodat-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.whodat-table thead {
  background: #f8fafc;
}

.whodat-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
}

.whodat-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.whodat-table tbody tr:hover {
  background: #f8fafc;
}

.whodat-table tbody tr:last-child td {
  border-bottom: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .stat-card {
    padding: 12px;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .gold-pill {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .whodat-table {
    font-size: 0.8rem;
  }

  .whodat-table th,
  .whodat-table td {
    padding: 8px 12px;
  }
}

/* ============================================================================
   SOCIAL SECTION STYLES
   ============================================================================ */

/* Tab System */
.social-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.social-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.social-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.social-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

.social-tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

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

/* Hero Stats - The True Adventure */
.social-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.hero-stat-card {
  background: linear-gradient(135deg, #eef4ff 0%, #ffffff 100%);
  border: 2px solid #d4e3fc;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(36, 86, 165, 0.08);
  transition: all 0.3s;
}

.hero-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(36, 86, 165, 0.15);
}

.hero-stat-card.hero-primary {
  background: linear-gradient(135deg, #fff3cd 0%, #ffffff 100%);
  border-color: #ffc107;
}

.hero-stat-card.hero-secondary {
  background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
  border-color: #2196f3;
}

.hero-stat-card.hero-tertiary {
  background: linear-gradient(135deg, #f3e5f5 0%, #ffffff 100%);
  border-color: #9c27b0;
}

.hero-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.hero-value {
  font-size: 3rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.hero-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.hero-sublabel {
  font-size: 0.9rem;
  color: #6e7f9b;
}

/* Fun Facts Grid */
.social-fun-facts {
  margin-bottom: 40px;
}

.social-fun-facts h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
  text-align: center;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.fact-card {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: all 0.2s;
}

.fact-card:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.fact-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.fact-value {
  font-size: 2rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.fact-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.fact-subtitle {
  font-size: 0.85rem;
  color: #6e7f9b;
}

/* Charts */
.social-chart-section {
  margin-bottom: 40px;
}

.social-chart-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
  text-align: center;
}

.class-pie-chart {
  position: relative;
}

.chart-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  color: #2c3e50;
  font-weight: 500;
}

.legend-value {
  color: #6e7f9b;
  font-weight: 600;
}

/* Size Bar Chart */
.size-bar-chart {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
}

.size-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.size-bar-row:last-child {
  margin-bottom: 0;
}

.size-label {
  font-weight: 600;
  color: #2c3e50;
  text-align: right;
}

.size-bar-container {
  background: #f0f4f8;
  border-radius: 8px;
  height: 32px;
  position: relative;
}

.size-bar {
  background: linear-gradient(90deg, #3182ce 0%, #2456a5 100%);
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  min-width: 80px;
  transition: width 0.3s ease;
}

.size-count {
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Companions List */
.companions-section {
  margin-bottom: 40px;
}

.companions-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
}

.companions-list {
  display: grid;
  gap: 12px;
}

.companion-card {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 16px;
  align-items: center;
  transition: all 0.2s;
}

.companion-card:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.companion-rank {
  font-size: 1.5rem;
  font-weight: 700;
  color: #6e7f9b;
  text-align: center;
}

.companion-info {
  flex: 1;
}

.companion-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.companion-class {
  font-size: 0.9rem;
  color: #6e7f9b;
}

.companion-stats {
  text-align: right;
}

.companion-count {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2456a5;
}

.companion-label {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 4px;
}

.companion-last {
  font-size: 0.8rem;
  color: #999;
}

/* Instance Grid */
.instances-section {
  margin-bottom: 40px;
}

.instances-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
}

.instance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.instance-card {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s;
}

.instance-card:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
  transform: translateY(-2px);
}

.instance-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.instance-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
}

.difficulty-badge {
  display: inline-block;
  background: #ffc107;
  color: #000;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
}

.instance-stats {
  margin-top: 12px;
}

.instance-runs {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 4px;
}

.instance-detail {
  font-size: 0.85rem;
  color: #6e7f9b;
  margin-bottom: 2px;
}

.instance-last {
  font-size: 0.8rem;
  color: #999;
}

/* Friends Section */
.friends-section {
  margin-bottom: 40px;
}

.friends-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
}

.friends-list {
  display: grid;
  gap: 12px;
}

.friend-card {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.friend-card:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.friend-info {
  flex: 1;
}

.friend-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.friend-details {
  font-size: 0.9rem;
  color: #6e7f9b;
}

.friend-time {
  font-size: 0.9rem;
  color: #999;
  text-align: right;
}

/* Activity Heatmap */
.heatmap-section {
  margin-bottom: 40px;
}

.heatmap-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
  text-align: center;
}

.hour-heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 8px;
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
}

.hour-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
}

.hour-cell:hover {
  transform: scale(1.1);
  z-index: 10;
}

.hour-label {
  font-size: 0.7rem;
  margin-bottom: 4px;
}

.hour-count {
  font-size: 1rem;
}

/* Day Chart */
.day-section {
  margin-bottom: 40px;
}

.day-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
  text-align: center;
}

.day-chart {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 20px;
}

.day-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.day-bar-row:last-child {
  margin-bottom: 0;
}

.day-label {
  font-weight: 600;
  color: #2c3e50;
  text-align: right;
}

.day-bar-container {
  background: #f0f4f8;
  border-radius: 8px;
  height: 36px;
  position: relative;
}

.day-bar {
  background: linear-gradient(90deg, #9c27b0 0%, #7b1fa2 100%);
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  min-width: 60px;
  transition: width 0.3s ease;
}

.day-count {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Timeline Feed */
.timeline-feed-section {
  margin-bottom: 40px;
}

.timeline-feed-section h3 {
  font-size: 1.5rem;
  color: #2456a5;
  margin-bottom: 20px;
}

.timeline-feed {
  display: grid;
  gap: 16px;
}

.timeline-item {
  background: #fff;
  border: 2px solid #e6eefb;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  transition: all 0.2s;
}

.timeline-item:hover {
  border-color: #3182ce;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.1);
}

.timeline-icon {
  font-size: 1.5rem;
  text-align: center;
}

.timeline-content {
  flex: 1;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: #2c3e50;
  font-weight: 600;
}

.timeline-time {
  font-size: 0.85rem;
  color: #999;
  font-weight: 400;
}

.timeline-location {
  font-size: 0.9rem;
  color: #6e7f9b;
  margin-bottom: 8px;
}

.timeline-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #f0f4f8;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* Group Brackets Tab Styles */
.brackets-controls {
  background: linear-gradient(135deg, #eef4ff 0%, #f7fafc 100%);
  border: 1px solid #d4e3fc;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
}

.brackets-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.brackets-search-bar input[type="text"] {
  flex: 2;
  min-width: 250px;
  padding: 10px 16px;
  border: 1px solid #bcd0ee;
  border-radius: 8px;
  font-size: 1rem;
  background: #ffffff;
  margin: 0;
}

.brackets-search-bar input[type="date"] {
  flex: 1;
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid #bcd0ee;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #ffffff;
  margin: 0;
}

.brackets-search-bar button {
  padding: 10px 20px;
  font-size: 0.95rem;
  margin: 0;
}

.brackets-content {
  background: linear-gradient(135deg, #a8d0ff 0%, #86c5ff 100%);
  border-radius: 16px;
  padding: 30px;
  min-height: 400px;
}

.bracket-section {
  margin-bottom: 40px;
}

.bracket-section:last-child {
  margin-bottom: 0;
}

.bracket-section h3 {
  color: #ffffff;
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bracket-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tournament-bracket {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.bracket-main {
  background: #ffffff;
  color: #2456a5;
  border: 2px solid #2456a5;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  min-width: 200px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bracket-connector {
  width: 40px;
  height: 3px;
  background: #ffffff;
  position: relative;
}

.bracket-connector::after {
  content: '';
  position: absolute;
  right: -6px;
  top: -3px;
  width: 0;
  height: 0;
  border-left: 6px solid #ffffff;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.bracket-members {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1;
}

.bracket-member {
  background: #ffffff;
  color: #333333;
  border: 2px solid #2456a5;
  border-radius: 8px;
  padding: 12px;
  min-width: 160px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}

.member-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--class-color, #333333);
}

.member-role {
  font-size: 0.9rem;
  color: #666666;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.member-class-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #999999;
  border-radius: 0 0 6px 6px;
  font-size: 0.75rem;
  color: #ffffff;
  text-align: center;
  line-height: 4px;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.bracket-extra {
  background: #f0f0f0;
  border: 1px solid #cccccc;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.8rem;
  color: #666666;
  margin-top: 6px;
  text-align: center;
}

.bracket-time {
  color: #ffffff;
  font-size: 0.9rem;
  opacity: 0.8;
  text-align: center;
  min-width: 120px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.brackets-loading {
  text-align: center;
  padding: 60px 20px;
  color: #2456a5;
  font-size: 1.2rem;
}

.loading-spinner {
  animation: pulse 2s infinite;
}

.no-results {
  text-align: center;
  color: #ffffff;
  font-size: 1.1rem;
  padding: 40px;
  opacity: 0.8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .social-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .social-tab {
    padding: 10px 16px;
    font-size: 0.9rem;
    white-space: nowrap;
  }

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

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

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

  .companion-card {
    grid-template-columns: 40px 1fr;
    gap: 12px;
  }

  .companion-stats {
    grid-column: 2;
    text-align: left;
    margin-top: 8px;
  }

  .hour-heatmap {
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  }

  .size-bar-row,
  .day-bar-row {
    grid-template-columns: 100px 1fr;
    gap: 12px;
  }

  /* Group Brackets responsive */
  .brackets-search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .brackets-search-bar input[type="text"],
  .brackets-search-bar input[type="date"] {
    min-width: 100%;
    flex: none;
  }

  .tournament-bracket {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .bracket-connector {
    width: 3px;
    height: 20px;
    transform: rotate(90deg);
  }

  .bracket-connector::after {
    right: -3px;
    top: -6px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #ffffff;
    border-bottom: none;
  }

  .bracket-main {
    min-width: 100%;
    order: -1;
  }

  .bracket-members {
    justify-content: center;
  }

  .bracket-member {
    min-width: 140px;
  }

  .bracket-time {
    min-width: 100%;
    order: 1;
  }
}

/* ============================================
   GUILD HALL STYLING
   Single Guild Hall entry in character selector
   ============================================ */

/* Guild Hall specific styling */
.guild-hall-option .char-name {
  color: #654321;
  font-weight: 600;
}

.guild-hall-option .char-emoji {
  filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.6));
}

.guild-hall-option:hover .char-emoji {
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
}

/* Mortality Analysis - Scoped Styles */
#tab-mortality {
  /* All styles are scoped to the mortality tab */
}

/* ==== 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 AREAS ==== */
#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: end;
  height: 120px;
  padding: 1rem 0;
}

#tab-mortality .timeline-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

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

#tab-mortality .timeline-bar .bar-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

/* ==== DEATH CARDS ==== */
#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 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;
}

/* ==== UTILITY CLASSES ==== */
#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;
}

/* ==== RESPONSIVE DESIGN ==== */
@media (max-width: 768px) {
  #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;
  }
}

@media (max-width: 480px) {
  #tab-mortality .stats-grid {
    grid-template-columns: 1fr;
  }

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

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

/* ============================================================
   WhoDASH Landing / Login Page
   Applied via body.wd-landing-page (toggled by main.js)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700;900&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300&display=swap');

body.wd-landing-page {
  background: linear-gradient(135deg, #1a3a6e 0%, #1e4fa0 45%, #2d7dd2 100%) !important;
  min-height: 100vh;
}

body.wd-landing-page .topbar {
  display: none !important;
}

body.wd-landing-page .container {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

#whodash-landing {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

#whodash-landing::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 15% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 65%),
    radial-gradient(ellipse 50% 70% at 85% 60%, rgba(10, 25, 60, 0.28) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.wd-hero {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 60px;
  position: relative;
  z-index: 1;
}

.wd-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  animation: wdHeroIn 0.6s ease both 0s;
}

.wd-eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
}

.wd-logo {
  font-family: 'Cinzel', serif;
  font-size: clamp(3.8rem, 7vw, 6.5rem);
  font-weight: 900;
  color: #fff;
  line-height: 0.88;
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
  text-shadow: 0 2px 40px rgba(10, 30, 90, 0.5);
  animation: wdHeroIn 0.6s ease both 0.07s;
}

.wd-logo span {
  color: #7ec8ff;
  text-shadow: 0 0 40px rgba(126, 200, 255, 0.4);
}

.wd-tagline {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(255, 255, 255, 0.65);
  margin: 18px 0 52px 0;
  line-height: 1.55;
  animation: wdHeroIn 0.6s ease both 0.14s;
}

.wd-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 480px;
}

.wd-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  animation: wdFeatureIn 0.55s ease both;
}

.wd-feature:nth-child(1) {
  animation-delay: 0.18s;
}

.wd-feature:nth-child(2) {
  animation-delay: 0.28s;
}

.wd-feature:nth-child(3) {
  animation-delay: 0.38s;
}

.wd-feature:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(126, 200, 255, 0.35);
  transform: translateY(-2px);
}

.wd-feature-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1.4;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));
}

.wd-feature-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wd-feature-text strong {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.92);
  text-transform: uppercase;
}

.wd-feature-text span {
  font-family: 'Crimson Pro', serif;
  font-size: 0.93rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

.wd-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(to bottom,
      transparent 0%,
      rgba(255, 255, 255, 0.18) 25%,
      rgba(255, 255, 255, 0.18) 75%,
      transparent 100%);
  flex-shrink: 0;
  z-index: 1;
  margin: 40px 0;
}

.wd-auth-panel {
  flex: 0 0 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  z-index: 1;
}

.wd-auth-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 32px 80px rgba(8, 20, 60, 0.45), 0 2px 0 rgba(255, 255, 255, 0.9) inset;
  animation: wdCardIn 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) both 0.08s;
}

.wd-auth-title {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a3a6e;
  margin: 0 0 5px 0;
  letter-spacing: 0.04em;
}

.wd-auth-subtitle {
  font-family: 'Crimson Pro', serif;
  font-size: 0.95rem;
  color: #7a8fa8;
  margin: 0 0 26px 0;
}

.wd-auth-card form {
  display: flex;
  flex-direction: column;
}

.wd-auth-card input[type="text"],
.wd-auth-card input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 14px;
  border: 1.5px solid #d8e8f5;
  border-radius: 10px;
  font-size: 0.96rem;
  font-family: 'Crimson Pro', serif;
  background: #f5f9fd;
  color: #1a3a6e;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

.wd-auth-card input[type="text"]:focus,
.wd-auth-card input[type="password"]:focus {
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.13);
  background: #fff;
}

.wd-auth-card input::placeholder {
  color: #b0bfcc;
  font-style: italic;
}

.wd-btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2d7dd2 0%, #1a3a6e 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 4px 20px rgba(29, 78, 160, 0.4);
  margin: 4px 0 0 0;
}

.wd-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(29, 78, 160, 0.5);
}

.wd-btn-primary:active {
  transform: translateY(0);
}

.wd-btn-secondary {
  width: 100%;
  padding: 11px;
  background: transparent;
  color: #2d7dd2;
  border: 1.5px solid #c5d8ee;
  border-radius: 10px;
  font-family: 'Cinzel', serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
  margin: 8px 0 0 0;
}

.wd-btn-secondary:hover {
  background: #eef5fc;
  border-color: #2d7dd2;
}

.wd-auth-card #loginError,
.wd-auth-card #registerError {
  color: #c53030;
  font-family: 'Crimson Pro', serif;
  font-size: 0.9rem;
  margin: 10px 0 0 0;
  min-height: 18px;
}

.wd-auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 10px;
  color: #b0bfcc;
  font-size: 0.78rem;
  font-family: 'Crimson Pro', serif;
  letter-spacing: 0.05em;
}

.wd-auth-divider::before,
.wd-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2ecf5;
}

@keyframes wdHeroIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

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

@keyframes wdFeatureIn {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }

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

@keyframes wdCardIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.96);
  }

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

@media (max-width: 860px) {
  #whodash-landing {
    flex-direction: column;
  }

  .wd-hero {
    padding: 52px 32px 36px;
  }

  .wd-divider {
    width: 100%;
    height: 1px;
    margin: 0 40px;
    align-self: auto;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.18) 25%, rgba(255, 255, 255, 0.18) 75%, transparent 100%);
  }

  .wd-auth-panel {
    flex: unset;
    padding: 36px 24px 52px;
  }
}

/* ── Remember-me checkbox ── */
.wd-remember {
  margin: 2px 0 16px 0;
}

.wd-remember-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: 'Crimson Pro', serif;
  font-size: 0.93rem;
  color: #5a6f88;
  user-select: none;
}

.wd-remember-label:hover .wd-remember-box {
  border-color: #3182ce;
  background: #f0f7ff;
}

/* Hide native checkbox */
.wd-remember-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0 !important;
}

/* Custom checkbox box */
.wd-remember-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1.5px solid #c5d8ee;
  border-radius: 5px;
  background: #f5f9fd;
  transition: border-color 0.15s, background 0.15s;
}

/* Checkmark via ::after */
.wd-remember-box::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid transparent;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  transition: border-color 0.15s;
}

.wd-remember-checkbox:checked+.wd-remember-box {
  background: #2d7dd2;
  border-color: #2d7dd2;
}

.wd-remember-checkbox:checked+.wd-remember-box::after {
  border-color: #fff;
}

.wd-remember-checkbox:focus-visible+.wd-remember-box {
  outline: 2px solid #3182ce;
  outline-offset: 2px;
}
/* ============================================================================
   WD-TOOLTIP SYSTEM
   Floating tooltip for recipe / item / spell mouseovers.
   Styled to match WhoDASH dashboard — not WoW's default parchment look.
   ============================================================================ */

.wd-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  max-width: 320px;
  min-width: 180px;
  background: #0f1d35;
  border: 1px solid #2456a5;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(36, 86, 165, 0.25);
  padding: 0;
  overflow: hidden;
  font-size: 0.88rem;
  font-family: inherit;
  color: #c9d8f0;
  line-height: 1.45;
}

.wd-tooltip-loading {
  padding: 12px 16px;
  color: #6e9bd4;
  font-style: italic;
  font-size: 0.85rem;
}

/* Header: icon + name */
.wd-tooltip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #1e3a5f;
  background: #162b4a;
}

.wd-tooltip-icon {
  width: 36px;
  height: 36px;
  border-radius: 5px;
  border: 1px solid #2456a5;
  flex-shrink: 0;
  object-fit: cover;
}

.wd-tooltip-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
}

/* Item quality color classes */
.wd-tooltip-name.q-poor {
  color: #9d9d9d;
}

.wd-tooltip-name.q-common {
  color: #ffffff;
}

.wd-tooltip-name.q-uncommon {
  color: #1eff00;
}

.wd-tooltip-name.q-rare {
  color: #0070dd;
}

.wd-tooltip-name.q-epic {
  color: #a335ee;
}

.wd-tooltip-name.q-legendary {
  color: #ff8000;
}

.wd-tooltip-name.q-artifact {
  color: #e6cc80;
}

.wd-tooltip-name.q-heirloom {
  color: #00ccff;
}

/* Stat lines */
.wd-tooltip-stats {
  padding: 10px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wd-tooltip-stat {
  color: #c9d8f0;
  font-size: 0.84rem;
}

.wd-tooltip-stat--bonus {
  color: #58d68d;
  font-weight: 600;
}

.wd-tooltip-stat--req {
  color: #e57373;
  font-size: 0.82rem;
}

.wd-tooltip-stat--use {
  color: #5dade2;
}

.wd-tooltip-stat--flavor {
  color: #9b8ea0;
  font-style: italic;
  font-size: 0.82rem;
}

/* Footer: wowhead link */
.wd-tooltip-footer {
  padding: 8px 14px;
  border-top: 1px solid #1e3a5f;
  background: #0d1929;
}

.wd-tooltip-link {
  color: #4a90d9;
  font-size: 0.78rem;
  text-decoration: none;
  pointer-events: auto;
}

.wd-tooltip-link:hover {
  text-decoration: underline;
  color: #7ab3e8;
}

/* ============================================================================
   RECIPE LIST — New grouped, Wowhead-inspired layout
   ============================================================================ */

/* Container */
.recipes-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 8px;
}

/* Per-profession block */
.recipe-prof-block {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.05);
}

.recipe-prof-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, #eef4ff 0%, #f7fafc 100%);
  border-bottom: 1px solid #d7e3fb;
}

.recipe-prof-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #2456a5;
}

.recipe-prof-count {
  font-size: 0.82rem;
  color: #6e7f9b;
  font-weight: 600;
  background: #dce9fb;
  padding: 2px 10px;
  border-radius: 12px;
}

/* Individual recipe rows */
.recipe-prof-list {
  padding: 6px 0;
}

.recipe-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px;
  cursor: default;
  transition: background 0.12s;
  border-bottom: 1px solid transparent;
}

.recipe-row:last-child {
  border-bottom: none;
}

.recipe-row:hover {
  background: #f0f6ff;
  border-bottom-color: #e6eefb;
}

.recipe-row-icon {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  border: 1px solid #c8d8f0;
  flex-shrink: 0;
  object-fit: cover;
}

.recipe-row-name-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
}

.recipe-row-name {
  color: #2456a5;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipe-row:hover .recipe-row-name {
  color: #1a3d80;
  text-decoration: underline;
}

/* Quality dot */
.recipe-quality-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.rq-trivial {
  background: #9d9d9d;
}

.rq-easy {
  background: #1eff00;
}

.rq-medium {
  background: #0070dd;
}

.rq-optimal {
  background: #ff8c00;
}

.rq-difficult {
  background: #cc2222;
}

/* Stat / cooldown column */
.recipe-row-stats {
  font-size: 0.82rem;
  color: #6e7f9b;
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
}

.recipe-row-stats--cooldown {
  color: #d97706;
  font-weight: 600;
}

/* Empty filter result */
.recipe-empty-filter {
  padding: 12px 20px;
  color: #9ca3af;
  font-style: italic;
  font-size: 0.88rem;
}

/* Results info bar */
.recipe-results-info {
  font-size: 0.82rem;
  color: #6e7f9b;
  margin-top: 6px;
}

/* Updated search bar */
.recipe-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.recipe-search-icon {
  position: absolute;
  left: 10px;
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0.6;
}

.recipe-search-input {
  padding-left: 30px;
}

/* Gem color classes (for future use if JC gem categorization is added) */
.gem-red {
  color: #ff4040;
}

.gem-yellow {
  color: #ffd700;
}

.gem-blue {
  color: #4090ff;
}

.gem-orange {
  color: #ff8c00;
}

.gem-green {
  color: #40c040;
}

.gem-purple {
  color: #a335ee;
}

.gem-meta {
  color: #c0c0c0;
}

.gem-prismatic {
  color: #e6cc80;
}

/* Responsive */
@media (max-width: 600px) {
  .recipe-row-stats {
    display: none;
  }

  .recipe-prof-header {
    padding: 12px 14px;
  }

  .recipe-row {
    padding: 7px 12px;
  }
}
/* ============================================================================
   WD-TOOLTIP SYSTEM
   Floating tooltip for recipe / item / spell mouseovers.
   Styled to match WhoDASH dashboard — not WoW's default parchment look.
   ============================================================================ */

.wd-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  max-width: 320px;
  min-width: 180px;
  background: #0f1d35;
  border: 1px solid #2456a5;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(36, 86, 165, 0.25);
  padding: 0;
  overflow: hidden;
  font-size: 0.88rem;
  font-family: inherit;
  color: #c9d8f0;
  line-height: 1.45;
}

.wd-tooltip-loading {
  padding: 12px 16px;
  color: #6e9bd4;
  font-style: italic;
  font-size: 0.85rem;
}

/* Header: icon + name */
.wd-tooltip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #1e3a5f;
  background: #162b4a;
}

.wd-tooltip-icon {
  width: 36px;
  height: 36px;
  border-radius: 5px;
  border: 1px solid #2456a5;
  flex-shrink: 0;
  object-fit: cover;
}

.wd-tooltip-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
}

/* Item quality color classes */
.wd-tooltip-name.q-poor      { color: #9d9d9d; }
.wd-tooltip-name.q-common    { color: #ffffff; }
.wd-tooltip-name.q-uncommon  { color: #1eff00; }
.wd-tooltip-name.q-rare      { color: #0070dd; }
.wd-tooltip-name.q-epic      { color: #a335ee; }
.wd-tooltip-name.q-legendary { color: #ff8000; }
.wd-tooltip-name.q-artifact  { color: #e6cc80; }
.wd-tooltip-name.q-heirloom  { color: #00ccff; }

/* Stat lines */
.wd-tooltip-stats {
  padding: 10px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wd-tooltip-stat {
  color: #c9d8f0;
  font-size: 0.84rem;
}

.wd-tooltip-stat--bonus {
  color: #58d68d;
  font-weight: 600;
}

.wd-tooltip-stat--req {
  color: #e57373;
  font-size: 0.82rem;
}

.wd-tooltip-stat--use {
  color: #5dade2;
}

.wd-tooltip-stat--flavor {
  color: #9b8ea0;
  font-style: italic;
  font-size: 0.82rem;
}

/* Footer: wowhead link */
.wd-tooltip-footer {
  padding: 8px 14px;
  border-top: 1px solid #1e3a5f;
  background: #0d1929;
}

.wd-tooltip-link {
  color: #4a90d9;
  font-size: 0.78rem;
  text-decoration: none;
  pointer-events: auto;
}

.wd-tooltip-link:hover {
  text-decoration: underline;
  color: #7ab3e8;
}

/* Wowhead tooltip_enus HTML block */
.wd-tooltip-wh-html {
  padding: 10px 14px 8px;
  font-size: 0.84rem;
  color: #c9d8f0;
  line-height: 1.5;
}

.wd-tooltip-wh-html b.q0  { color: #9d9d9d; }
.wd-tooltip-wh-html b.q1  { color: #ffffff; }
.wd-tooltip-wh-html b.q2  { color: #1eff00; }
.wd-tooltip-wh-html b.q3  { color: #0070dd; }
.wd-tooltip-wh-html b.q4  { color: #a335ee; }
.wd-tooltip-wh-html b.q5  { color: #ff8000; }
.wd-tooltip-wh-html b.q6  { color: #e6cc80; }
.wd-tooltip-wh-html b.q7  { color: #00ccff; }
.wd-tooltip-wh-html .q    { color: #9b8ea0; font-style: italic; }
.wd-tooltip-wh-html .q0   { color: #9d9d9d; }
.wd-tooltip-wh-html .q1   { color: #ffffff; }
.wd-tooltip-wh-html .q2   { color: #1eff00; }
.wd-tooltip-wh-html .q3   { color: #0070dd; }
.wd-tooltip-wh-html .q4   { color: #a335ee; }
.wd-tooltip-wh-html b.q2.whtt-extra { color: #aaaaaa; font-size: 0.8rem; }
.wd-tooltip-wh-html table { width: 100%; border-collapse: collapse; }
.wd-tooltip-wh-html th    { text-align: right; color: #aaaaaa; font-weight: normal; }
.wd-tooltip-wh-html .whtt-sellprice { color: #aaaaaa; font-size: 0.8rem; margin-top: 4px; }
.wd-tooltip-wh-html .moneygold   { color: #f0c040; }
.wd-tooltip-wh-html .moneysilver { color: #c0c0c0; }
.wd-tooltip-wh-html .moneycopper { color: #c87533; }

/* Reagents section */
.wd-tooltip-reagents {
  padding: 6px 14px 8px;
  border-top: 1px solid #1e3a5f;
  font-size: 0.82rem;
  color: #c9d8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.wd-tooltip-reagent-label {
  color: #6e9bd4;
  margin-right: 2px;
}

.wd-tooltip-reagent a {
  color: #c9d8f0;
  text-decoration: none;
  pointer-events: auto;
}

.wd-tooltip-reagent a:hover {
  color: #7ab3e8;
  text-decoration: underline;
}

/* ============================================================================
   RECIPE LIST — New grouped, Wowhead-inspired layout
   ============================================================================ */

/* Container */
.recipes-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 8px;
}

/* Per-profession block */
.recipe-prof-block {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.05);
}

.recipe-prof-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, #eef4ff 0%, #f7fafc 100%);
  border-bottom: 1px solid #d7e3fb;
}

.recipe-prof-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #2456a5;
}

.recipe-prof-count {
  font-size: 0.82rem;
  color: #6e7f9b;
  font-weight: 600;
  background: #dce9fb;
  padding: 2px 10px;
  border-radius: 12px;
}

/* Individual recipe rows */
.recipe-prof-list {
  padding: 6px 0;
}

.recipe-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px;
  cursor: default;
  transition: background 0.12s;
  border-bottom: 1px solid transparent;
}

.recipe-row:last-child {
  border-bottom: none;
}

.recipe-row:hover {
  background: #f0f6ff;
  border-bottom-color: #e6eefb;
}

.recipe-row-icon {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  border: 1px solid #c8d8f0;
  flex-shrink: 0;
  object-fit: cover;
}

.recipe-row-name-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
}

.recipe-row-name {
  color: #2456a5;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipe-row:hover .recipe-row-name {
  color: #1a3d80;
  text-decoration: underline;
}

/* Quality dot */
.recipe-quality-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.rq-trivial   { background: #9d9d9d; }
.rq-easy      { background: #1eff00; }
.rq-medium    { background: #0070dd; }
.rq-optimal   { background: #ff8c00; }
.rq-difficult { background: #cc2222; }

/* Stat / cooldown column */
.recipe-row-stats {
  font-size: 0.82rem;
  color: #6e7f9b;
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
}

.recipe-row-stats--cooldown {
  color: #d97706;
  font-weight: 600;
}

/* Empty filter result */
.recipe-empty-filter {
  padding: 12px 20px;
  color: #9ca3af;
  font-style: italic;
  font-size: 0.88rem;
}

/* Results info bar */
.recipe-results-info {
  font-size: 0.82rem;
  color: #6e7f9b;
  margin-top: 6px;
}

/* Updated search bar */
.recipe-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.recipe-search-icon {
  position: absolute;
  left: 10px;
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0.6;
}

.recipe-search-input {
  padding-left: 30px;
}

/* Gem color classes (for future use if JC gem categorization is added) */
.gem-red      { color: #ff4040; }
.gem-yellow   { color: #ffd700; }
.gem-blue     { color: #4090ff; }
.gem-orange   { color: #ff8c00; }
.gem-green    { color: #40c040; }
.gem-purple   { color: #a335ee; }
.gem-meta     { color: #c0c0c0; }
.gem-prismatic{ color: #e6cc80; }

/* Responsive */
@media (max-width: 600px) {
  .recipe-row-stats {
    display: none;
  }
  .recipe-prof-header {
    padding: 12px 14px;
  }
  .recipe-row {
    padding: 7px 12px;
  }
}
/* ============================================================================
   WD-TOOLTIP SYSTEM
   Floating tooltip for recipe / item / spell mouseovers.
   Styled to match WhoDASH dashboard — not WoW's default parchment look.
   ============================================================================ */

.wd-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  max-width: 320px;
  min-width: 180px;
  background: #0f1d35;
  border: 1px solid #2456a5;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(36, 86, 165, 0.25);
  padding: 0;
  overflow: hidden;
  font-size: 0.88rem;
  font-family: inherit;
  color: #c9d8f0;
  line-height: 1.45;
}

.wd-tooltip-loading {
  padding: 12px 16px;
  color: #6e9bd4;
  font-style: italic;
  font-size: 0.85rem;
}

/* Header: icon + name */
.wd-tooltip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #1e3a5f;
  background: #162b4a;
}

.wd-tooltip-icon {
  width: 36px;
  height: 36px;
  border-radius: 5px;
  border: 1px solid #2456a5;
  flex-shrink: 0;
  object-fit: cover;
}

.wd-tooltip-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
}

/* Item quality color classes */
.wd-tooltip-name.q-poor      { color: #9d9d9d; }
.wd-tooltip-name.q-common    { color: #ffffff; }
.wd-tooltip-name.q-uncommon  { color: #1eff00; }
.wd-tooltip-name.q-rare      { color: #0070dd; }
.wd-tooltip-name.q-epic      { color: #a335ee; }
.wd-tooltip-name.q-legendary { color: #ff8000; }
.wd-tooltip-name.q-artifact  { color: #e6cc80; }
.wd-tooltip-name.q-heirloom  { color: #00ccff; }

/* Stat lines */
.wd-tooltip-stats {
  padding: 10px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wd-tooltip-stat {
  color: #c9d8f0;
  font-size: 0.84rem;
}

.wd-tooltip-stat--bonus {
  color: #58d68d;
  font-weight: 600;
}

.wd-tooltip-stat--req {
  color: #e57373;
  font-size: 0.82rem;
}

.wd-tooltip-stat--use {
  color: #5dade2;
}

.wd-tooltip-stat--flavor {
  color: #9b8ea0;
  font-style: italic;
  font-size: 0.82rem;
}

/* Footer: wowhead link */
.wd-tooltip-footer {
  padding: 8px 14px;
  border-top: 1px solid #1e3a5f;
  background: #0d1929;
}

.wd-tooltip-link {
  color: #4a90d9;
  font-size: 0.78rem;
  text-decoration: none;
  pointer-events: auto;
}

.wd-tooltip-link:hover {
  text-decoration: underline;
  color: #7ab3e8;
}

.wd-tooltip-stat--sell {
  color: #aaaaaa;
  font-size: 0.82rem;
}

/* Reagents section */
.wd-tooltip-reagents {
  padding: 8px 14px;
  border-top: 1px solid #1e3a5f;
  background: #0d1929;
}

.wd-tooltip-reagent-label {
  font-size: 0.78rem;
  color: #6e9bd4;
  margin-bottom: 5px;
}

.wd-tooltip-reagent {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  color: #c9d8f0;
  margin-right: 8px;
  margin-bottom: 3px;
}

.wd-tooltip-reagent-icon {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid #2456a5;
  flex-shrink: 0;
}

/* ============================================================================
   RECIPE LIST — New grouped, Wowhead-inspired layout
   ============================================================================ */

/* Container */
.recipes-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 8px;
}

/* Per-profession block */
.recipe-prof-block {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.05);
}

.recipe-prof-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, #eef4ff 0%, #f7fafc 100%);
  border-bottom: 1px solid #d7e3fb;
}

.recipe-prof-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #2456a5;
}

.recipe-prof-count {
  font-size: 0.82rem;
  color: #6e7f9b;
  font-weight: 600;
  background: #dce9fb;
  padding: 2px 10px;
  border-radius: 12px;
}

/* Individual recipe rows */
.recipe-prof-list {
  padding: 6px 0;
}

.recipe-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px;
  cursor: default;
  transition: background 0.12s;
  border-bottom: 1px solid transparent;
}

.recipe-row:last-child {
  border-bottom: none;
}

.recipe-row:hover {
  background: #f0f6ff;
  border-bottom-color: #e6eefb;
}

.recipe-row-icon {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  border: 1px solid #c8d8f0;
  flex-shrink: 0;
  object-fit: cover;
}

.recipe-row-name-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
}

.recipe-row-name {
  color: #2456a5;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipe-row:hover .recipe-row-name {
  color: #1a3d80;
  text-decoration: underline;
}

/* Quality dot */
.recipe-quality-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.rq-trivial   { background: #9d9d9d; }
.rq-easy      { background: #1eff00; }
.rq-medium    { background: #0070dd; }
.rq-optimal   { background: #ff8c00; }
.rq-difficult { background: #cc2222; }

/* Stat / cooldown column */
.recipe-row-stats {
  font-size: 0.82rem;
  color: #6e7f9b;
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
}

.recipe-row-stats--cooldown {
  color: #d97706;
  font-weight: 600;
}

/* Empty filter result */
.recipe-empty-filter {
  padding: 12px 20px;
  color: #9ca3af;
  font-style: italic;
  font-size: 0.88rem;
}

/* Results info bar */
.recipe-results-info {
  font-size: 0.82rem;
  color: #6e7f9b;
  margin-top: 6px;
}

/* Updated search bar */
.recipe-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.recipe-search-icon {
  position: absolute;
  left: 10px;
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0.6;
}

.recipe-search-input {
  padding-left: 30px;
}

/* Gem color classes (for future use if JC gem categorization is added) */
.gem-red      { color: #ff4040; }
.gem-yellow   { color: #ffd700; }
.gem-blue     { color: #4090ff; }
.gem-orange   { color: #ff8c00; }
.gem-green    { color: #40c040; }
.gem-purple   { color: #a335ee; }
.gem-meta     { color: #c0c0c0; }
.gem-prismatic{ color: #e6cc80; }

/* Responsive */
@media (max-width: 600px) {
  .recipe-row-stats {
    display: none;
  }
  .recipe-prof-header {
    padding: 12px 14px;
  }
  .recipe-row {
    padding: 7px 12px;
  }
}
/* ============================================================================
   WD-TOOLTIP SYSTEM
   Floating tooltip for recipe / item / spell mouseovers.
   Styled to match WhoDASH dashboard — not WoW's default parchment look.
   ============================================================================ */

.wd-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  max-width: 320px;
  min-width: 180px;
  background: #0f1d35;
  border: 1px solid #2456a5;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(36, 86, 165, 0.25);
  padding: 0;
  overflow: hidden;
  font-size: 0.88rem;
  font-family: inherit;
  color: #c9d8f0;
  line-height: 1.45;
}

.wd-tooltip-loading {
  padding: 12px 16px;
  color: #6e9bd4;
  font-style: italic;
  font-size: 0.85rem;
}

/* Header: icon + name */
.wd-tooltip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #1e3a5f;
  background: #162b4a;
}

.wd-tooltip-icon {
  width: 36px;
  height: 36px;
  border-radius: 5px;
  border: 1px solid #2456a5;
  flex-shrink: 0;
  object-fit: cover;
}

.wd-tooltip-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
}

/* Item quality color classes */
.wd-tooltip-name.q-poor      { color: #9d9d9d; }
.wd-tooltip-name.q-common    { color: #ffffff; }
.wd-tooltip-name.q-uncommon  { color: #1eff00; }
.wd-tooltip-name.q-rare      { color: #0070dd; }
.wd-tooltip-name.q-epic      { color: #a335ee; }
.wd-tooltip-name.q-legendary { color: #ff8000; }
.wd-tooltip-name.q-artifact  { color: #e6cc80; }
.wd-tooltip-name.q-heirloom  { color: #00ccff; }

/* Stat lines */
.wd-tooltip-stats {
  padding: 10px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wd-tooltip-stat {
  color: #c9d8f0;
  font-size: 0.84rem;
}

.wd-tooltip-stat--bonus {
  color: #58d68d;
  font-weight: 600;
}

.wd-tooltip-stat--req {
  color: #e57373;
  font-size: 0.82rem;
}

.wd-tooltip-stat--use {
  color: #5dade2;
}

.wd-tooltip-stat--flavor {
  color: #9b8ea0;
  font-style: italic;
  font-size: 0.82rem;
}

/* Footer: wowhead link */
.wd-tooltip-footer {
  padding: 8px 14px;
  border-top: 1px solid #1e3a5f;
  background: #0d1929;
}

.wd-tooltip-link {
  color: #4a90d9;
  font-size: 0.78rem;
  text-decoration: none;
  pointer-events: auto;
}

.wd-tooltip-link:hover {
  text-decoration: underline;
  color: #7ab3e8;
}

.wd-tooltip-stat--sell {
  color: #aaaaaa;
  font-size: 0.82rem;
}

/* Reagents section */
.wd-tooltip-reagents {
  padding: 8px 14px 10px;
  border-top: 1px solid #1e3a5f;
  background: #0d1929;
}

.wd-tooltip-reagent-label {
  font-size: 0.75rem;
  color: #6e9bd4;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  font-weight: 600;
}

.wd-tooltip-reagent {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.83rem;
  color: #c9d8f0;
  padding: 2px 0;
}

.wd-tooltip-reagent-icon {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid #2456a5;
  flex-shrink: 0;
  object-fit: cover;
}

.wd-tooltip-reagent-icon-placeholder {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.wd-reagent-qty {
  color: #8aafd4;
  flex-shrink: 0;
  min-width: 22px;
}

.wd-reagent-name {
  flex: 1;
}

.wd-reagent-have {
  font-size: 0.78rem;
  font-weight: 600;
  flex-shrink: 0;
  padding: 1px 5px;
  border-radius: 3px;
}

.wd-reagent-have--ok {
  color: #4caf7d;
  background: rgba(76, 175, 80, 0.15);
}

.wd-reagent-have--low {
  color: #e57373;
  background: rgba(229, 115, 115, 0.15);
}

/* ============================================================================
   RECIPE LIST — New grouped, Wowhead-inspired layout
   ============================================================================ */

/* Container */
.recipes-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 8px;
}

/* Per-profession block */
.recipe-prof-block {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.05);
}

.recipe-prof-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, #eef4ff 0%, #f7fafc 100%);
  border-bottom: 1px solid #d7e3fb;
}

.recipe-prof-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #2456a5;
}

.recipe-prof-count {
  font-size: 0.82rem;
  color: #6e7f9b;
  font-weight: 600;
  background: #dce9fb;
  padding: 2px 10px;
  border-radius: 12px;
}

/* Individual recipe rows */
.recipe-prof-list {
  padding: 6px 0;
}

.recipe-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px;
  cursor: default;
  transition: background 0.12s;
  border-bottom: 1px solid transparent;
}

.recipe-row:last-child {
  border-bottom: none;
}

.recipe-row:hover {
  background: #f0f6ff;
  border-bottom-color: #e6eefb;
}

.recipe-row-icon {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  border: 1px solid #c8d8f0;
  flex-shrink: 0;
  object-fit: cover;
}

.recipe-row-name-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
}

.recipe-row-name {
  color: #2456a5;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipe-row:hover .recipe-row-name {
  color: #1a3d80;
  text-decoration: underline;
}

/* Quality dot */
.recipe-quality-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.rq-trivial   { background: #9d9d9d; }
.rq-easy      { background: #1eff00; }
.rq-medium    { background: #0070dd; }
.rq-optimal   { background: #ff8c00; }
.rq-difficult { background: #cc2222; }

/* Stat / cooldown column */
.recipe-row-stats {
  font-size: 0.82rem;
  color: #6e7f9b;
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
}

.recipe-row-stats--cooldown {
  color: #d97706;
  font-weight: 600;
}

/* Empty filter result */
.recipe-empty-filter {
  padding: 12px 20px;
  color: #9ca3af;
  font-style: italic;
  font-size: 0.88rem;
}

/* Results info bar */
.recipe-results-info {
  font-size: 0.82rem;
  color: #6e7f9b;
  margin-top: 6px;
}

/* Updated search bar */
.recipe-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.recipe-search-icon {
  position: absolute;
  left: 10px;
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0.6;
}

.recipe-search-input {
  padding-left: 30px;
}

/* Gem color classes (for future use if JC gem categorization is added) */
.gem-red      { color: #ff4040; }
.gem-yellow   { color: #ffd700; }
.gem-blue     { color: #4090ff; }
.gem-orange   { color: #ff8c00; }
.gem-green    { color: #40c040; }
.gem-purple   { color: #a335ee; }
.gem-meta     { color: #c0c0c0; }
.gem-prismatic{ color: #e6cc80; }

/* Responsive */
@media (max-width: 600px) {
  .recipe-row-stats {
    display: none;
  }
  .recipe-prof-header {
    padding: 12px 14px;
  }
  .recipe-row {
    padding: 7px 12px;
  }
}
/* ============================================================================
   WD-TOOLTIP SYSTEM
   Floating tooltip for recipe / item / spell mouseovers.
   Styled to match WhoDASH dashboard — not WoW's default parchment look.
   ============================================================================ */

.wd-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  max-width: 320px;
  min-width: 180px;
  background: #0f1d35;
  border: 1px solid #2456a5;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(36, 86, 165, 0.25);
  padding: 0;
  overflow: hidden;
  font-size: 0.88rem;
  font-family: inherit;
  color: #c9d8f0;
  line-height: 1.45;
}

.wd-tooltip-loading {
  padding: 12px 16px;
  color: #6e9bd4;
  font-style: italic;
  font-size: 0.85rem;
}

/* Header: icon + name */
.wd-tooltip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #1e3a5f;
  background: #162b4a;
}

.wd-tooltip-icon {
  width: 36px;
  height: 36px;
  border-radius: 5px;
  border: 1px solid #2456a5;
  flex-shrink: 0;
  object-fit: cover;
}

.wd-tooltip-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
}

/* Item quality color classes */
.wd-tooltip-name.q-poor {
  color: #9d9d9d;
}

.wd-tooltip-name.q-common {
  color: #ffffff;
}

.wd-tooltip-name.q-uncommon {
  color: #1eff00;
}

.wd-tooltip-name.q-rare {
  color: #0070dd;
}

.wd-tooltip-name.q-epic {
  color: #a335ee;
}

.wd-tooltip-name.q-legendary {
  color: #ff8000;
}

.wd-tooltip-name.q-artifact {
  color: #e6cc80;
}

.wd-tooltip-name.q-heirloom {
  color: #00ccff;
}

/* Stat lines */
.wd-tooltip-stats {
  padding: 10px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wd-tooltip-stat {
  color: #c9d8f0;
  font-size: 0.84rem;
}

.wd-tooltip-stat--bonus {
  color: #58d68d;
  font-weight: 600;
}

.wd-tooltip-stat--req {
  color: #e57373;
  font-size: 0.82rem;
}

.wd-tooltip-stat--use {
  color: #5dade2;
}

.wd-tooltip-stat--flavor {
  color: #9b8ea0;
  font-style: italic;
  font-size: 0.82rem;
}

/* Footer: wowhead link */
.wd-tooltip-footer {
  padding: 8px 14px;
  border-top: 1px solid #1e3a5f;
  background: #0d1929;
}

.wd-tooltip-link {
  color: #4a90d9;
  font-size: 0.78rem;
  text-decoration: none;
  pointer-events: auto;
}

.wd-tooltip-link:hover {
  text-decoration: underline;
  color: #7ab3e8;
}

.wd-tooltip-stat--sell {
  color: #aaaaaa;
  font-size: 0.82rem;
}

/* Reagents section */
.wd-tooltip-reagents {
  padding: 8px 14px 10px;
  border-top: 1px solid #1e3a5f;
  background: #0d1929;
}

.wd-tooltip-reagent-label {
  font-size: 0.75rem;
  color: #6e9bd4;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  font-weight: 600;
  display: block;
  width: 100%;
}

.wd-tooltip-reagent {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.83rem;
  color: #c9d8f0;
  padding: 2px 0;
}

.wd-tooltip-reagent-icon {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid #2456a5;
  flex-shrink: 0;
  object-fit: cover;
}

.wd-tooltip-reagent-icon-placeholder {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.wd-reagent-qty {
  color: #8aafd4;
  flex-shrink: 0;
  min-width: 22px;
}

.wd-reagent-name {
  flex: 1;
}

.wd-reagent-have {
  font-size: 0.78rem;
  font-weight: 600;
  flex-shrink: 0;
  padding: 1px 5px;
  border-radius: 3px;
}

.wd-reagent-have--ok {
  color: #4caf7d;
  background: rgba(76, 175, 80, 0.15);
}

.wd-reagent-have--low {
  color: #e57373;
  background: rgba(229, 115, 115, 0.15);
}

/* ============================================================================
   RECIPE LIST — New grouped, Wowhead-inspired layout
   ============================================================================ */

/* Container */
.recipes-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 8px;
}

/* Per-profession block */
.recipe-prof-block {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.05);
}

.recipe-prof-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, #eef4ff 0%, #f7fafc 100%);
  border-bottom: 1px solid #d7e3fb;
}

.recipe-prof-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #2456a5;
}

.recipe-prof-count {
  font-size: 0.82rem;
  color: #6e7f9b;
  font-weight: 600;
  background: #dce9fb;
  padding: 2px 10px;
  border-radius: 12px;
}

/* Individual recipe rows */
.recipe-prof-list {
  padding: 6px 0;
}

.recipe-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px;
  cursor: default;
  transition: background 0.12s;
  border-bottom: 1px solid transparent;
}

.recipe-row:last-child {
  border-bottom: none;
}

.recipe-row:hover {
  background: #f0f6ff;
  border-bottom-color: #e6eefb;
}

.recipe-row-icon {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  border: 1px solid #c8d8f0;
  flex-shrink: 0;
  object-fit: cover;
}

.recipe-row-name-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
}

.recipe-row-name {
  color: #2456a5;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipe-row:hover .recipe-row-name {
  color: #1a3d80;
  text-decoration: underline;
}

/* Quality dot */
.recipe-quality-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.rq-trivial {
  background: #9d9d9d;
}

.rq-easy {
  background: #1eff00;
}

.rq-medium {
  background: #0070dd;
}

.rq-optimal {
  background: #ff8c00;
}

.rq-difficult {
  background: #cc2222;
}

/* Stat / cooldown column */
.recipe-row-stats {
  font-size: 0.82rem;
  color: #6e7f9b;
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
}

.recipe-row-stats--cooldown {
  color: #d97706;
  font-weight: 600;
}

/* Empty filter result */
.recipe-empty-filter {
  padding: 12px 20px;
  color: #9ca3af;
  font-style: italic;
  font-size: 0.88rem;
}

/* Results info bar */
.recipe-results-info {
  font-size: 0.82rem;
  color: #6e7f9b;
  margin-top: 6px;
}

/* Updated search bar */
.recipe-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.recipe-search-icon {
  position: absolute;
  left: 10px;
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0.6;
}

.recipe-search-input {
  padding-left: 30px;
}

/* Gem color classes (for future use if JC gem categorization is added) */
.gem-red {
  color: #ff4040;
}

.gem-yellow {
  color: #ffd700;
}

.gem-blue {
  color: #4090ff;
}

.gem-orange {
  color: #ff8c00;
}

.gem-green {
  color: #40c040;
}

.gem-purple {
  color: #a335ee;
}

.gem-meta {
  color: #c0c0c0;
}

.gem-prismatic {
  color: #e6cc80;
}

/* Responsive */
@media (max-width: 600px) {
  .recipe-row-stats {
    display: none;
  }

  .recipe-prof-header {
    padding: 12px 14px;
  }

  .recipe-row {
    padding: 7px 12px;
  }
}