@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0b0e11;
  --surface: #111820;
  --surface-2: #172028;
  --surface-3: #1d2830;
  --sunken: #0c1015;
  --line: #263040;
  --line-strong: #384858;
  --text: #dde8f0;
  --muted: #7a90a0;
  --faint: #546070;
  --accent: #d4a03c;
  --accent-2: #5c9cc8;
  --green: #5cb87a;
  --red: #d05e54;
  --blue: #5c9cc8;
  --scrollbar-track: #11171a;
  --scrollbar-thumb: #8ea2b0;
  --shadow-color: rgba(0, 0, 0, 0.45);
  --nav-bg: rgba(11, 14, 17, 0.92);
}

[data-theme="light"] {
  --bg: #f3efe6;
  --surface: #ffffff;
  --surface-2: #f3efe5;
  --surface-3: #e8e2d4;
  --sunken: #ece6d8;
  --line: #ddd5c4;
  --line-strong: #c7bca7;
  --text: #2a2520;
  --muted: #6b6256;
  --faint: #99907f;
  --accent: #b3792a;
  --accent-2: #2f6f9e;
  --green: #2f8a52;
  --red: #b8453c;
  --blue: #2f6f9e;
  --scrollbar-track: #e8e2d4;
  --scrollbar-thumb: #c7bca7;
  --shadow-color: rgba(40, 30, 10, 0.12);
  --nav-bg: rgba(255, 255, 255, 0.86);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.025) 1px, transparent 0);
  background-size: 24px 24px;
}

* {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: auto;
}

::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  border: 3px solid var(--scrollbar-track);
  border-radius: 999px;
  background: var(--scrollbar-thumb);
}

::-webkit-scrollbar-thumb:hover {
  background: #b0c0c9;
}

::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

input,
select,
button {
  font: inherit;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  background: var(--sunken);
  padding: 8px 11px;
  transition: border-color 0.15s;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: none;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--text);
  background: var(--surface-2);
  padding: 6px 13px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.1s, border-color 0.1s;
}

.button .icon {
  flex-shrink: 0;
}

.site-nav-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}

.site-nav-theme-toggle:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.site-nav-theme-toggle .icon {
  width: 18px;
  height: 18px;
}

.button.primary {
  border-color: #9e7828;
  color: #0c0a04;
  background: var(--accent);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.button.ghost {
  background: transparent;
  border-color: var(--line);
}

.button:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.button.primary:hover {
  background: #dba842;
  border-color: #b08030;
}

.button.danger {
  border-color: rgba(208, 94, 84, 0.5);
  color: var(--red);
}

.button.danger:hover {
  background: rgba(208, 94, 84, 0.1);
  border-color: rgba(208, 94, 84, 0.8);
}

.button.small {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 13px;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: var(--nav-bg);
  backdrop-filter: blur(6px);
}

.site-nav-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 10px 0;
}

.site-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
}

.site-nav-brand .sigil {
  width: 30px;
  height: 30px;
  font-size: 10px;
}

.site-nav-links {
  display: flex;
  flex: 1;
  gap: 2px;
}

.site-nav-link {
  padding: 8px 12px;
  border-radius: 3px;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  transition: background 0.1s, color 0.1s;
}

.site-nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.site-nav-link.active {
  color: var(--text);
  background: var(--surface-2);
}

.site-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--text);
  background: var(--surface-2);
  font-size: 16px;
  cursor: pointer;
}

.auth-shell,
.report-shell,
.admin-layout,
.home-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.home-shell {
  min-height: calc(100vh - 58px);
  padding: 24px 0;
}

.home-header {
  border-bottom: 1px solid var(--line);
  padding: 18px 0 28px;
}

.home-header h1 {
  max-width: 760px;
  margin: 5px 0 10px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.95;
}

.home-header p:not(.eyebrow) {
  max-width: 650px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.home-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.home-sections {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 36px;
  align-items: center;
}

@media (max-width: 920px) {
  .home-hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Static mock of a PBS table so visitors see the product before clicking. */
.hero-demo {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.hero-demo-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.hero-demo-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}

.hero-demo-bar em {
  margin-left: 8px;
  color: var(--muted);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-demo table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 12.5px;
}

.hero-demo th,
.hero-demo td {
  padding: 7px 10px;
}

.hero-demo th:first-child,
.hero-demo td:first-child {
  position: static;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-weight: 500;
}

.hero-demo td:not(:first-child) {
  font-size: 12px;
}

.hero-demo .good {
  color: var(--green);
}

.hero-demo .bad {
  color: var(--red);
}

.hero-demo .c-mage { color: #69ccf0; }
.hero-demo .c-paladin { color: #f58cba; }
.hero-demo .c-hunter { color: #abd473; }
.hero-demo .c-warrior { color: #c79c6e; }
.hero-demo .c-druid { color: #ff7d0a; }
.hero-demo .c-priest { color: #d8d2c4; }
.hero-demo .c-rogue { color: #fff569; }
.hero-demo .c-shaman { color: #2459ff; }
.hero-demo .c-warlock { color: #9482c9; }

.hero-demo-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.hero-demo-kpis .kpi {
  padding: 8px 10px;
}

.hero-demo-kpis .kpi span {
  font-size: 10px;
}

.hero-demo-kpis .kpi strong {
  margin-top: 4px;
  font-size: 1.05rem;
}

.hero-demo-comp {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.hero-demo-comp .chip {
  gap: 5px;
}

.guild-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 14px;
}

.guild-search-results {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.auth-shell {
  display: grid;
  min-height: calc(100vh - 58px);
  place-items: center;
}

.auth-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.auth-card {
  display: grid;
  width: min(400px, 100%);
  gap: 1rem;
  padding: 28px 24px;
  border-top: 2px solid var(--accent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

dialog[id$="Modal"] {
  width: min(440px, calc(100% - 2rem));
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
}

dialog[id$="Modal"]::backdrop {
  background: rgba(5, 7, 9, 0.7);
  backdrop-filter: blur(4px);
}

.modal-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
}

.modal-card p:not(.eyebrow) {
  color: var(--muted);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.sigil {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(212, 160, 60, 0.5);
  border-radius: 50%;
  color: var(--accent);
  background: #100e07;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.sigil.compact {
  width: 44px;
  height: 44px;
  font-size: 11px;
}

.admin-layout,
.report-shell {
  padding: 20px 0;
}

.admin-header,
.report-top,
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.panel-title {
  margin-bottom: 14px;
}

.admin-header,
.report-top,
.app-header {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding: 4px 0 16px;
}

.app-header h1 {
  margin-top: 3px;
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.auth-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.button.active {
  border-color: var(--accent);
  color: #0c0a04;
  background: var(--accent);
  font-weight: 700;
}

.eyebrow {
  color: var(--accent);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 1rem;
  align-items: start;
}

.compact-grid {
  grid-template-columns: minmax(360px, 1fr) minmax(300px, 420px);
  margin-bottom: 1rem;
}

.panel {
  padding: 1rem;
}

@media (min-width: 760px) {
  .panel {
    padding: 1.375rem;
  }
}

.panel-heading {
  display: grid;
  gap: 2px;
  margin-bottom: 14px;
}

.panel-accent {
  border-top: 2px solid var(--accent);
}

.dashboard-zone {
  margin-bottom: 1.25rem;
}

.dashboard-zone:last-child {
  margin-bottom: 0;
}

.report-form {
  display: grid;
  gap: 14px;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.guild-list,
.invite-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.guild-card,
.invite-row {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #0e1318;
  padding: 10px 11px;
}

.guild-card {
  cursor: pointer;
}

.guild-card:hover,
.guild-card.active {
  border-color: rgba(212, 160, 60, 0.58);
  background: linear-gradient(90deg, rgba(212, 160, 60, 0.14), #0e1318 68%);
}

.guild-card span,
.invite-row span {
  color: var(--muted);
  font-size: 13px;
}

.guild-card code,
.invite-row code {
  color: #cde8f7;
  font-size: 12px;
}

.invite-box {
  margin-top: 14px;
}

.panel-title.slim {
  margin-top: 0;
}

.panel-title.slim h3 {
  margin: 2px 0 0;
  font-size: 1.05rem;
}

.invite-row {
  grid-template-columns: minmax(130px, 1fr) auto auto;
  align-items: center;
}

.option-group {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 11px;
}

.option-group legend {
  padding: 0 5px;
  color: var(--accent);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 13.5px;
}

.check-row input {
  width: 14px;
  min-height: auto;
  accent-color: var(--accent);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.report-list {
  display: grid;
  gap: 8px;
  margin-top: 1rem;
}

.report-list.scroll {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 4px;
}

.admin-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.stat-card {
  border: 1px solid var(--line);
  border-top: 2px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  padding: 16px;
}

.stat-card.stat-good { border-top-color: var(--green); }
.stat-card.stat-warn { border-top-color: var(--accent); }
.stat-card.stat-bad { border-top-color: var(--red); }
.stat-card.stat-bad .stat-value { color: var(--red); }

.stat-card .stat-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card .stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  margin-top: 4px;
}

.search-label {
  margin-top: 1rem;
}

.filter-row {
  margin-top: 0.75rem;
}

.report-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #0e1318;
  padding: 11px 13px;
}

.report-item.clickable {
  cursor: pointer;
}

.report-item.clickable:hover {
  border-color: var(--line-strong);
  background: #131c24;
}

.report-item strong a {
  color: inherit;
}

.report-item-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chip-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: #c0d2de;
  background: #14202a;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.chip.status-published {
  border-color: rgba(92, 184, 122, 0.4);
  color: #a4d8b6;
  background: rgba(92, 184, 122, 0.1);
}

.chip.status-running,
.chip.status-queued {
  border-color: rgba(92, 156, 200, 0.4);
  color: #a8cce4;
  background: rgba(92, 156, 200, 0.1);
}

.chip.status-failed {
  border-color: rgba(208, 94, 84, 0.45);
  color: #e8b4b0;
  background: rgba(208, 94, 84, 0.1);
}

.report-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.user-guilds-panel {
  display: block;
  margin-top: -8px;
}

.guild-membership-list {
  display: grid;
  gap: 8px;
  width: 100%;
}

.guild-membership-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.guild-membership-row span {
  flex: 1;
}

.guild-membership-row select {
  width: auto;
}

.report-progress {
  display: grid;
  gap: 5px;
  width: min(34rem, 100%);
  margin-top: 10px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.report-item .progress-meta span {
  margin: 0;
  font-size: 12px;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--bg);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.35s ease;
}

.report-progress.queued .progress-fill,
.report-progress.running .progress-fill {
  background: linear-gradient(90deg, var(--accent), var(--blue), var(--accent));
  background-size: 180% 100%;
  animation: progress-flow 1.4s linear infinite;
}

.report-progress.published .progress-fill {
  background: var(--green);
}

.report-progress.failed .progress-fill {
  background: var(--red);
}

@keyframes progress-flow {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 180% 0;
  }
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.skeleton-line {
  display: block;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

.report-item.skeleton {
  pointer-events: none;
}

.report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.empty-state {
  display: grid;
  min-height: 22rem;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: var(--sunken);
  padding: 2rem;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.kpi {
  border: 1px solid var(--line);
  border-top: 2px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  padding: 13px 14px 12px;
}

.kpi span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kpi strong {
  display: block;
  margin-top: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.15;
  color: var(--text);
}

.kpi.kpi-good { border-top-color: var(--green); }
.kpi.kpi-warn { border-top-color: var(--accent); }
.kpi.kpi-danger { border-top-color: var(--red); }
.kpi.kpi-danger strong { color: var(--red); }

.tabs {
  display: flex;
  gap: 0;
  margin: 16px 0 12px;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 2px solid var(--line);
  padding-bottom: 0;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  padding: 8px 14px 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.12s;
}

.tabs button:hover {
  color: var(--text);
}

.tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.tabs-outer {
  position: relative;
}

.tabs-outer::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 2px;
  width: 64px;
  background: linear-gradient(to right, transparent, var(--bg));
  pointer-events: none;
  z-index: 5;
}

.tabs-outer.no-overflow::after {
  display: none;
}

.table-panel {
  padding: 0;
  overflow: hidden;
}

.table-scroll-top {
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.table-scroll-top > div {
  height: 1px;
}

.table-scroll-top::-webkit-scrollbar {
  height: 14px;
}

.table-scroll-top::-webkit-scrollbar-track {
  background: var(--bg);
}

.table-scroll-top::-webkit-scrollbar-thumb {
  border: 3px solid var(--bg);
  border-radius: 999px;
  background: #8ea2b0;
}

.table-scroll-top::-webkit-scrollbar-thumb:hover {
  background: #b0c0c9;
}

.table-wrap {
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 70vh;
}

.suite-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  padding: 1rem;
}

.suite-grid.no-pad {
  padding: 0;
  margin-top: 14px;
}

.suite-card {
  display: grid;
  gap: 5px;
  min-height: 7rem;
  align-content: center;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 3px;
  background: var(--sunken);
  padding: 14px;
}

.suite-card span {
  color: var(--accent);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.suite-card strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  font-weight: 500;
}

.suite-card small {
  color: var(--muted);
  font-size: 13px;
}

.gear-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(520px, 1fr);
  gap: 0;
  min-width: 840px;
}

.gear-player-list {
  display: grid;
  align-content: start;
  max-height: 70vh;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: var(--sunken);
}

.gear-player-list button {
  display: grid;
  gap: 3px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  padding: 10px 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
}

.gear-player-list button.active {
  background: #181f16;
  box-shadow: inset 3px 0 0 var(--accent);
}

.gear-player-list span,
.gear-detail-header span,
.gear-item span,
.gear-item dt {
  color: var(--muted);
  font-size: 12px;
}

.gear-detail {
  padding: 1rem;
}

.gear-detail-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 14px;
}

.gear-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 10px;
}

.gear-item {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--sunken);
  padding: 12px;
}

.gear-item-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gear-item-title img {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(212, 160, 60, 0.4);
  border-radius: 3px;
  background: var(--sunken);
}

.gear-item a {
  color: var(--accent);
  font-weight: 600;
}

.gear-item dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.gear-item dl div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
}

.gear-item dd {
  margin: 0;
  color: #ccd8e0;
  font-size: 13px;
}

.issue-card {
  border-color: rgba(208, 94, 84, 0.4);
  border-left: 3px solid var(--red);
}

.issue-card .gear-item-title > div {
  display: grid;
  gap: 5px;
}

.issue-badge {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(208, 94, 84, 0.35);
  border-radius: 999px;
  color: #ffd0cc;
  background: rgba(208, 94, 84, 0.14);
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.issue-bad-enchant,
.issue-common-gem {
  border-color: rgba(212, 160, 60, 0.45);
  border-left-color: var(--accent);
}

.issue-bad-enchant .issue-badge,
.issue-common-gem .issue-badge {
  border-color: rgba(212, 160, 60, 0.42);
  color: #f5d99a;
  background: rgba(212, 160, 60, 0.14);
}

.issue-no-gem {
  border-color: rgba(222, 116, 160, 0.45);
  border-left-color: #de74a0;
}

.issue-no-gem .issue-badge {
  border-color: rgba(222, 116, 160, 0.42);
  color: #ffcfe2;
  background: rgba(222, 116, 160, 0.14);
}

.issue-uncommon-gem {
  border-color: rgba(92, 184, 122, 0.45);
  border-left-color: var(--green);
}

.issue-uncommon-gem .issue-badge {
  border-color: rgba(92, 184, 122, 0.42);
  color: #c8f2d4;
  background: rgba(92, 184, 122, 0.14);
}

.issue-rare-gem {
  border-color: rgba(92, 156, 200, 0.45);
  border-left-color: var(--blue);
}

.issue-rare-gem .issue-badge {
  border-color: rgba(92, 156, 200, 0.42);
  color: #cce8fb;
  background: rgba(92, 156, 200, 0.14);
}

.gear-item dd:has(.gem-chip) {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.gem-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--sunken);
  padding: 3px 8px 3px 4px;
}

.gem-chip img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}

.gem-chip-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  text-decoration: none;
}

.gem-chip-link:hover {
  text-decoration: underline;
}

.gem-chip small {
  color: var(--muted);
  font-size: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 13.5px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 7px 10px;
  text-align: left;
}

th:not(:first-child),
td:not(:first-child) {
  border-left: 1px solid var(--line);
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #b8ccd8;
  background: #131e28;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.group-header th {
  top: 0;
  height: 2.1rem;
  border-bottom-color: rgba(165, 120, 35, 0.5);
  color: #0c0a04;
  background: var(--accent);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

.group-header th[data-class="druids"]   { background: #b85800; border-bottom-color: rgba(0,0,0,0.35); }
.group-header th[data-class="hunters"]  { background: #6a9a30; border-bottom-color: rgba(0,0,0,0.35); }
.group-header th[data-class="mages"]    { background: #2090b0; border-bottom-color: rgba(0,0,0,0.35); }
.group-header th[data-class="paladins"] { background: #c86090; border-bottom-color: rgba(0,0,0,0.35); }
.group-header th[data-class="priests"]  { background: #989fa8; color: #111; border-bottom-color: rgba(0,0,0,0.35); }
.group-header th[data-class="rogues"]   { background: #a09414; border-bottom-color: rgba(0,0,0,0.35); }
.group-header th[data-class="shamans"]  { background: #1868b0; color: #c8e4ff; border-bottom-color: rgba(0,0,0,0.4); }
.group-header th[data-class="warlocks"] { background: #5050a8; color: #d4d0ff; border-bottom-color: rgba(0,0,0,0.4); }
.group-header th[data-class="warriors"] { background: #a87828; border-bottom-color: rgba(0,0,0,0.35); }

thead:has(.group-header) tr:not(.group-header) th {
  top: 2.1rem;
}

td {
  color: #ccd8e4;
}

td:not(:first-child) {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  text-align: center;
}

th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.4);
}

th:first-child {
  z-index: 3;
}

td:first-child {
  z-index: 1;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

td.group-start,
th.group-start {
  border-left: 2px solid rgba(212, 160, 60, 0.5);
}

th.class-marker,
td.class-marker {
  color: var(--accent);
  background: #15201a;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  text-align: left;
}

.section-row td {
  border-top: 1px solid rgba(212, 160, 60, 0.3);
  border-bottom: 1px solid rgba(212, 160, 60, 0.2);
  color: var(--accent);
  background: #18201a;
  font-family: inherit;
  font-weight: 700;
  text-align: left;
}

.section-row td:first-child {
  z-index: 1;
  background: #18201a;
}

tbody tr:nth-child(even):not(.section-row) td:not(:first-child) {
  background: #131b24;
}

tbody tr:nth-child(even):not(.section-row) td:first-child {
  background: #14202c;
}

tbody tr:not(.section-row):hover td:not(:first-child) {
  background: #1c2d3e;
}

tbody tr:not(.section-row):hover td:first-child {
  background: #1e3044;
}

.section-row .section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.notes-panel {
  margin-top: 12px;
}

.notes-panel ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.notes-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) 1.15fr;
  gap: 1rem;
}

.class-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.class-grid-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--sunken);
  padding: 5px 10px;
  font-size: 13px;
  max-width: 240px;
}

.class-grid-item > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}

.class-grid-item small {
  font-size: 11px;
  line-height: 1.4;
  word-break: break-word;
}

.class-grid strong {
  color: var(--accent);
}

.rate-box {
  display: grid;
  gap: 5px;
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.rate-box p {
  color: var(--muted);
}

.form-error {
  min-height: 1.2rem;
  color: var(--red);
  font-size: 13px;
}

.error-box {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(208, 94, 84, 0.35);
  border-left: 3px solid var(--red);
  border-radius: 3px;
  background: rgba(208, 94, 84, 0.06);
  padding: 12px 14px;
}

.error-box h2 {
  color: var(--red);
  font-size: 16px;
}

.error-box .form-error {
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  word-break: break-word;
}

.muted {
  color: var(--muted);
}

.field-hint {
  margin-top: -4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.field-hint a {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 820px) {
  .admin-grid,
  .split,
  .kpis,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .admin-header,
  .report-top,
  .report-item {
    align-items: stretch;
    flex-direction: column;
  }
}

.geek-page {
  padding-bottom: 48px;
}

.geek-hero,
.geek-section,
.geek-card {
  padding: 22px;
}

.geek-hero {
  display: grid;
  gap: 8px;
  border-top: 2px solid var(--accent);
}

.geek-hero p:last-child {
  max-width: 860px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.5;
}

.geek-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.geek-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.geek-card,
.geek-section {
  display: grid;
  gap: 10px;
  scroll-margin-top: 76px;
}

.geek-card h2,
.geek-section h2 {
  font-size: 27px;
}

.geek-card p,
.geek-section p,
.geek-list {
  color: var(--muted);
  line-height: 1.55;
}

.geek-section {
  margin-top: 14px;
}

.flow-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 8px;
}

.flow-row span {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  background: var(--sunken);
  padding: 8px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  white-space: nowrap;
}

.flow-row span:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -8px;
  width: 8px;
  height: 1px;
  background: var(--accent);
}

.geek-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.geek-list code {
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .guild-search {
    grid-template-columns: 1fr;
  }

  .admin-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .invite-row {
    grid-template-columns: 1fr;
  }

  .geek-grid,
  .geek-grid.two {
    grid-template-columns: 1fr;
  }

  .flow-row {
    grid-template-columns: repeat(6, minmax(100px, 1fr));
  }

  .gear-layout {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .gear-player-list {
    max-height: 40vh;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .table-wrap {
    max-height: 60vh;
  }
}

@media (max-width: 760px) {
  .site-nav-toggle {
    display: flex;
  }

  .site-nav-inner {
    flex-wrap: wrap;
  }

  .site-nav-toggle {
    order: 2;
    margin-left: auto;
  }

  .site-nav-links,
  .site-nav-actions {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .site-nav-links {
    order: 3;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }

  .site-nav-actions {
    order: 4;
  }

  .site-nav.open .site-nav-links,
  .site-nav.open .site-nav-actions {
    display: flex;
  }
}

@media (max-width: 480px) {
  .suite-grid {
    grid-template-columns: 1fr;
  }

  .hero-demo table {
    font-size: 11px;
  }

  .hero-demo th,
  .hero-demo td {
    padding: 6px 6px;
  }

  .hero-demo-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
