:root {
  --bg: #020617;
  --bg-card: #0b1120;
  --bg-elevated: #020617;
  --fg: #e5e7eb;
  --muted: #9ca3af;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.18);
  --border-subtle: #1f2937;
  --danger: #f97373;
}

* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--fg);
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Global header & top bar --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background:
    radial-gradient(circle at top left, #1f2937 0, #020617 52%);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(18px);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Brand block (blue NC + title) */
.brand-block {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background:
    radial-gradient(circle at 30% 0%, rgba(56, 189, 248, 0.25), transparent 55%),
    radial-gradient(circle at 80% 100%, rgba(59, 130, 246, 0.4), #020617 60%);
  color: var(--accent);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.7),
    0 10px 30px rgba(15, 23, 42, 0.8);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Right side: season pill + user chip + logout / sign in */
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Generic pill styling used in buffs/utility */
.pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border-radius: 999px;
  padding: 0.3rem 0.8rem 0.35rem;
  font-size: 0.72rem;
  background: rgba(148, 163, 184, 0.16);
  color: var(--muted);
  border: 1px solid rgba(148, 163, 184, 0.45);
  max-width: 100%;
  word-break: break-word;   /* wrap long labels inside the pill */
}

/* User chip (Battletag + Guild Portal) */
.user-chip {
  display: none;          /* shown when authed */
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(55, 65, 81, 0.9);
  cursor: default;
}

.user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  background: radial-gradient(circle at 30% 0%, rgba(59, 130, 246, 0.4), #020617 70%);
  color: #e5e7eb;
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.user-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: #e5e7eb;
}

.user-tagline {
  font-size: 0.68rem;
  color: var(--muted);
}

/* Ghost / outline button for Logout / Sign-in */
.btn-ghost {
  border-radius: 999px;
  border: 1px solid rgba(75, 85, 99, 0.85);
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Subnav stays the same style B, but ensure it exists on all pages */
.subnav {
  position: sticky;
  top: 52px; /* just under .nav; adjust if needed */
  z-index: 30;
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
  backdrop-filter: blur(12px);
}

.subnav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.4rem 1.25rem;
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
}

.subnav-tab {
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.subnav-tab:hover {
  color: #e5e7eb;
  border-color: rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.9);
}

.subnav-tab-active {
  color: #e5e7eb;
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(59, 130, 246, 0.9);
}

button {
  border-radius: 999px;
  border: none;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  background: var(--accent);
  color: white;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(31, 41, 55, 0.9);
  color: var(--fg);
}

/* Profile avatar + dropdown */
.profile-wrapper {
  position: relative;
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  background: radial-gradient(circle at 30% 30%, #38bdf8, #6366f1);
  color: #e5e7eb;
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.9);
}

.profile-dropdown {
  position: absolute;
  right: 0;
  margin-top: 0.4rem;
  min-width: 180px;
  background: #020617;
  border-radius: 0.6rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(31, 41, 55, 0.95);
  padding: 0.35rem 0;
  display: none;
}

.profile-dropdown.open {
  display: block;
}

.dropdown-item {
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dropdown-item:hover {
  background: rgba(15, 23, 42, 0.95);
}

.dropdown-label {
  font-weight: 500;
}

.dropdown-sub {
  font-size: 0.7rem;
  color: var(--muted);
}

.dropdown-separator {
  margin: 0.2rem 0;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
}

/* Main content */
.main {
  flex: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem;
}

.hero {
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.hero-sub {
  font-size: 0.9rem;
  color: var(--muted);
}

.hero-sub strong {
  color: var(--fg);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1rem;
  align-items: flex-start;
}

.card {
  background: var(--bg-card);
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.98);
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.card-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.badge-soft {
  font-size: 0.75rem;
  background: rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  color: var(--muted);
}

/* Raid team by role */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.role-column {
  border-radius: 0.65rem;
  background: radial-gradient(
    circle at top,
    rgba(148, 163, 184, 0.06),
    transparent
  );
  border: 1px solid rgba(31, 41, 55, 0.95);
  padding: 0.45rem 0.55rem 0.5rem 0.55rem;
}

.role-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.role-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.role-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  background: #111827;
}

.role-icon.tank {
  border: 1px solid #38bdf8;
}

.role-icon.healer {
  border: 1px solid #22c55e;
}

.role-icon.melee {
  border: 1px solid #facc15;
}

.role-icon.ranged {
  border: 1px solid #a855f7;
}

.role-count {
  font-size: 0.75rem;
  color: var(--muted);
}

.role-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 260px;
  overflow-y: auto;
  padding-top: 0.1rem;
}

.char-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.25rem;
  border-radius: 0.45rem;
}

.char-row:nth-child(2n) {
  background: rgba(15, 23, 42, 0.9);
}

.class-pill {
  min-width: 10px;
  width: 10px;
  height: 26px;
  border-radius: 999px;
  background: #6b7280;
}

.char-main {
  flex: 1;
  min-width: 0;
}

.char-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.char-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.char-tag {
  font-size: 0.72rem;
  color: #9ca3af;
}

.no-data {
  font-size: 0.8rem;
  color: var(--muted);
}

.status-line {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.status-line.error {
  color: var(--danger);
}

/* Right-hand sidebar layout */
.right-rail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-card {
  padding: 0.75rem 0.85rem;
}

/* Class breakdown (bar chart) */
.class-bars {
  display: flex;
  align-items: flex-end;   /* align bar bottoms */
  gap: 0.35rem;
  min-height: 140px;
  padding-top: 0.4rem;
}

.class-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.class-bar-visual {
  width: 100%;
  max-width: 18px;
  border-radius: 999px;
  background: #111827;
  border: 1px solid rgba(31, 41, 55, 0.95);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.class-bar-fill {
  width: 100%;
  background: #6b7280;
}

.class-count {
  font-size: 0.75rem;
  color: var(--muted);
}

.class-label {
  font-size: 0.7rem;
  text-align: center;
  line-height: 1.1;
  min-height: 2.2em;   /* enough space for up to 2 lines */
}

/* Generic pill styling used in buffs/utility */
.pill {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.72rem;
  background: rgba(148, 163, 184, 0.16);
  color: var(--muted);
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.pill-success {
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.65);
}

.pill-missing {
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.65);
}

.pill-label-main {
  font-size: 0.7rem;
  font-weight: 500;
}

.pill-label-sub {
  font-size: 0.64rem;
  opacity: 0.85;
}

.pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.35rem;
  margin-top: 0.3rem;
}

/* Tier set breakdown */
.tier-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.tier-stat-box {
  background: rgba(15, 23, 42, 0.85);
  border-radius: 0.6rem;
  border: 1px solid var(--border-subtle);
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
}

.tier-stat-label {
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.tier-stat-value {
  font-size: 0.95rem;
  font-weight: 600;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .nav-inner,
  .main {
    padding-inline: 0.75rem;
  }
  .roles-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- Sub-Navigation Tabs (Option B) --- */

.subnav {
  position: sticky;
  top: 58px; /* sits directly under the main nav */
  z-index: 19;
  background: rgba(15, 23, 42, 0.98);
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.subnav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.4rem 1.25rem;
  display: flex;
  gap: 0.4rem;
}

.subnav-tab {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.25rem 0.85rem;
  font-size: 0.82rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}

.subnav-tab:hover {
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.75);
}

.subnav-tab-active {
  color: #bfdbfe;
  border-color: rgba(59, 130, 246, 0.65);
  background: rgba(59, 130, 246, 0.18);
}

/* =========================
   HOUSING-SPECIFIC STYLES
   ========================= */

.housing-map-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.housing-map-shell {
  position: relative;
  border-radius: 0.7rem;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid rgba(15, 23, 42, 0.98);
  height: 60vh;
}

.housing-map-inner {
  position: relative;
  transform-origin: center center;
  will-change: transform;
  display: inline-block;
}

.housing-map-image {
  display: block;
  width: auto;
  height: auto;
  opacity: 0.98;
  user-select: none;
  pointer-events: none;
  max-width: none;
  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;
}

.housing-map-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Plot markers */
.plot-marker {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.plot-marker-inner {
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  background: radial-gradient(circle at top, #020617, #020617 60%, #000 100%);
  border: 1px solid rgba(148, 163, 184, 0.8);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.85);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--fg);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.plot-marker-inner::before {
  content: "🏠";
  font-size: 0.85rem;
}

.plot-marker-label {
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plot-marker--available .plot-marker-inner {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.7);
  opacity: 0.85;
}

.plot-marker--active .plot-marker-inner,
.plot-marker:hover .plot-marker-inner {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: radial-gradient(circle at top, #1d4ed8, #020617 70%);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.95);
}

.housing-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-icon {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.9);
}

.legend-icon-house {
  background: rgba(34, 197, 94, 0.55);
}

.legend-icon-empty {
  background: rgba(31, 41, 55, 0.95);
}

.housing-details {
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  padding-top: 0.4rem;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.housing-details-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.housing-details-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.housing-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.housing-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.65);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.housing-badge--accent {
  border-color: rgba(59, 130, 246, 0.9);
  background: rgba(59, 130, 246, 0.16);
  color: #bfdbfe;
}

.housing-details-notes {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Residents list */
.housing-list {
  margin-top: 0.2rem;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.housing-list-item {
  border-radius: 0.55rem;
  padding: 0.45rem 0.55rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.98);
  cursor: pointer;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    transform 0.12s ease,
    background 0.12s ease;
}

.housing-list-item:hover {
  border-color: rgba(59, 130, 246, 0.8);
  background: rgba(15, 23, 42, 1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.9);
  transform: translateY(-1px);
}

.housing-list-item--active {
  border-color: rgba(59, 130, 246, 0.9);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 1);
}

.housing-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}

.housing-list-name {
  font-size: 0.88rem;
  font-weight: 600;
}

.housing-list-plot {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.housing-list-theme {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.8);
  background: rgba(59, 130, 246, 0.16);
}

.housing-list-meta {
  margin-top: 0.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.housing-list-notes {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.housing-stats {
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.housing-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Admin right-click form (officer only) */
.housing-admin-form {
  position: absolute;
  z-index: 30;
  background: #020617;
  border-radius: 0.75rem;
  border: 1px solid rgba(59, 130, 246, 0.7);
  padding: 0.55rem 0.6rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.95);
  font-size: 0.75rem;
  width: 240px;
}

.housing-admin-form h4 {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
}

.housing-admin-form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.3rem;
}

.housing-admin-form-row label {
  margin-bottom: 0.15rem;
  color: var(--muted);
}

.housing-admin-form-row input,
.housing-admin-form-row textarea {
  background: #020617;
  border-radius: 0.35rem;
  border: 1px solid rgba(31, 41, 55, 0.9);
  padding: 0.2rem 0.4rem;
  color: var(--fg);
  font-size: 0.75rem;
}

.housing-admin-form-row textarea {
  resize: vertical;
  min-height: 40px;
}

.housing-admin-form-row input[type="checkbox"] {
  width: auto;
  margin-right: 0.25rem;
}

.housing-admin-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.housing-admin-form-note {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* =========================
   LOOT & TOKENS STYLES
   ========================= */

/* Layout for the two-column loot page */
.grid-loot {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.3fr);
  gap: 1rem;
  align-items: flex-start;
}

@media (max-width: 960px) {
  .grid-loot {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .nav-inner,
  .main {
    padding-inline: 0.75rem;
  }
}

/* Card header for loot cards */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Simple vertical stack + row helpers */
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.row > * {
  flex: 1;
}

/* Dividers & text helpers */
.section-divider {
  height: 1px;
  background: radial-gradient(
    circle at center,
    rgba(148, 163, 184, 0.4),
    transparent
  );
  margin: 10px 0;
}

.small-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 2px;
}

.muted {
  color: var(--muted);
}

.footnote {
  margin-top: 6px;
  font-size: 0.7rem;
  color: var(--muted);
}

/* Form controls */
.input,
select,
textarea {
  width: 100%;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.9);
  color: var(--fg);
  font-size: 0.8rem;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

th,
td {
  padding: 6px 4px;
  text-align: left;
}

th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border-subtle);
}

tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.75);
}

tr:nth-child(odd) td {
  background: rgba(15, 23, 42, 0.3);
}

tr td:first-child,
tr th:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

tr td:last-child,
tr th:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* Result badges for token spends */
.badge-result {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.7rem;
}

.badge-result.won {
  background: var(--success-soft);
  color: var(--fg);
}

.badge-result.lost {
  background: var(--danger-soft);
  color: var(--fg);
}

/* Officer-only blocks toggled via JS */
.officer-only {
  display: none;
}

.hidden {
  display: none !important;
}

/* Wowhead tooltip overrides */
.whtooltip,
.qtip,
#tt {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: none !important;
  color: #e5e7eb !important;
}

.whtooltip *,
.qtip *,
#tt * {
  color: #e5e7eb !important;
}

.wowhead-tooltip .tooltip,
.wowhead-tooltip {
  background: rgba(15, 23, 42, 0.95) !important;
}

/* Loot item links – epic-style */
.loot-item-link {
  color: #a335ee;
  text-shadow: 0 0 6px rgba(163, 53, 238, 0.4);
  text-decoration: none;
}

.loot-item-link:hover {
  text-decoration: underline;
}

/* Class colours */
.class-warrior {
  color: #c79c6e;
}
.class-paladin {
  color: #f58cba;
}
.class-hunter {
  color: #abd473;
}
.class-rogue {
  color: #fff569;
}
.class-priest {
  color: #ffffff;
}
.class-deathknight {
  color: #c41f3b;
}
.class-shaman {
  color: #0070de;
}
.class-mage {
  color: #69ccf0;
}
.class-warlock {
  color: #9482c9;
}
.class-monk {
  color: #00ff96;
}
.class-druid {
  color: #ff7d0a;
}
.class-demonhunter {
  color: #a330c9;
}
.class-evoker {
  color: #33937f;
}

/* Highlight logged-in player's chars */
.current-user-char {
  font-weight: 700;
  text-shadow: 0 0 8px rgba(59, 130, 246, 0.9);
}

/* =========================
   ACCOUNT / MY CHARACTERS
   ========================= */

/* Status line under the table */
.status-line {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.status-line.error {
  color: var(--danger);
}

/* Comment input in the characters table */
.comment-input {
  width: 100%;
  font-size: 0.75rem;
  padding: 0.2rem 0.35rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(31, 41, 55, 0.9);
  background: #020617;
  color: var(--fg);
}

.comment-input::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

/* Make tables a bit smaller on mobile across the site */
@media (max-width: 700px) {
  table {
    font-size: 0.78rem;
  }
}
