body.page-lootlookup main,
body.page-lootlookup .card,
body.page-lootlookup .filters,
body.page-lootlookup table,
body.page-lootlookup select {
  font-family: "Montserrat", "RuneScape", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Inter, sans-serif;
}
body.page-lootlookup > header,
body.page-lootlookup > header *,
body.page-lootlookup .nav-links a,
body.page-lootlookup footer,
body.page-lootlookup footer * {
  font-family: inherit !important;
}
body.page-lootlookup main { font-size: 1rem; } 

body.page-lootlookup .stats-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0 0.6rem 0;
  margin-bottom: 1rem;
  background: transparent;
  border-bottom: 2px solid var(--accent);
}

body.page-lootlookup .stats-panel > header .stats-title {
  font-family: inherit !important;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 0.35rem 0;
  text-decoration: none !important; 
  color: var(--accent) !important;   
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

body.page-lootlookup .results-header .stats-title {
  font-family: inherit !important;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  color: var(--accent) !important;
}

body.page-lootlookup .filters label,
body.page-lootlookup .range-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

body.page-lootlookup .filters input,
body.page-lootlookup .filters select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  box-sizing: border-box;
  font-size: 0.95rem;
  font-family: inherit;
}

body.page-lootlookup .filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr)) 220px;
  gap: 1rem;
  align-items: start;
}

body.page-lootlookup .filters .field {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.03);
  padding: 0.8rem;
  border-radius: 10px;
}

body.page-lootlookup .filters .field div[style*="display:flex"] {
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}
body.page-lootlookup .filters .field div[style*="display:flex"] .muted-small {
  text-align: center;
}

body.page-lootlookup .value-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.25rem;
}

body.page-lootlookup .filters .actions {
  grid-column: 4 / 5;
  align-self: start;
  justify-self: center;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
  margin-top: 0.6rem;
}

body.page-lootlookup .actions .btn {
  width: 100%;
  max-width: 220px;
  min-width: 160px;
  font-size: 1rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .12s ease, filter .12s;
}

body.page-lootlookup #searchBtn {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #fff; 
  border: none;
  box-shadow: 0 6px 18px rgba(81,35,168,0.12);
}

body.page-lootlookup .results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
body.page-lootlookup .total-label {
  font-weight: 700;
  color: var(--text);
  display: none;
  font-size: 1rem;
  white-space: nowrap;
}

body.page-lootlookup table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}
body.page-lootlookup th,
body.page-lootlookup td {
  padding: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: left;
  font-size: 1rem;
}
body.page-lootlookup th {
  font-weight: 700;
  color: var(--muted);
}

body.page-lootlookup tbody tr:nth-child(odd) {
  background: linear-gradient(180deg, color-mix(in srgb, var(--card-2) 88%, transparent 12%), var(--card));
}
body.page-lootlookup tbody tr:hover {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, var(--card) 90%), var(--card));
}

body.page-lootlookup tbody td.muted {
  color: var(--muted);
  text-align: center;
}

body.page-lootlookup .autocomplete-wrapper {
  position: relative;
  display: block;
}
body.page-lootlookup .autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: none;
  max-height: 220px;
  overflow: auto;
  padding: 4px 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.45);
  font-size: 0.95rem;
}
body.page-lootlookup .autocomplete-dropdown .autocomplete-item {
  padding: .35rem .5rem;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.page-lootlookup .autocomplete-dropdown .autocomplete-item:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent 92%);
}

@media (max-width: 1100px) {
  body.page-lootlookup .filters {
    grid-template-columns: 1fr;
  }
  body.page-lootlookup .filters .actions {
    grid-column: auto;
    justify-self: stretch;
    align-self: stretch;
  }
}

@media (max-width: 520px) {
  body.page-lootlookup .results-header {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }
}
