:root {
  --panel-bg: rgba(10, 16, 31, 0.82);
  --text: #f7f8fc;
  --accent: #3da9fc;
  --accent-soft: rgba(61, 169, 252, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: #050a14 url("assets/wrestling-background.svg") center/cover no-repeat fixed;
}


body.admin-session-theme {
  background: #000;
  color: #fff;
}

body.admin-session-theme .overlay {
  display: none;
}

body.admin-session-theme .app-shell,
body.admin-session-theme .card,
body.admin-session-theme table,
body.admin-session-theme input,
body.admin-session-theme select,
body.admin-session-theme .tab,
body.admin-session-theme .mode-btn,
body.admin-session-theme button,
body.admin-session-theme #forgot-password,
body.admin-session-theme .password-toggle,
body.admin-session-theme .admin-portal-button {
  background: #000;
  color: #fff;
  border-color: #fff;
  backdrop-filter: none;
}

body.admin-session-theme .message,
body.admin-session-theme .helper-text {
  color: #fff;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(1, 5, 14, 0.5);
  z-index: -1;
}

.app-shell {
  width: min(1200px, 95vw);
  margin: 2rem auto;
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--panel-bg);
  backdrop-filter: blur(4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

body.admin-table-fullscreen .app-shell {
  width: min(1600px, 99vw);
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}


.session-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.admin-portal-button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(6, 16, 44, 0.7);
  color: #f4f8ff;
  text-decoration: none;
  font-weight: 600;
}

button,
input,
select {
  font: inherit;
}

.tab,
.mode-btn,
button,
#forgot-password,
.password-toggle {
  border: 1px solid transparent;
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  background: #1d2c4b;
  color: var(--text);
  cursor: pointer;
}

.tab.active,
.mode-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.auth-toggle,
.inline-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.auth-form,
#entry-form {
  display: grid;
  gap: 0.9rem;
}

#entry-form select,
#entry-form input {
  width: 100%;
  box-sizing: border-box;
}

label {
  display: grid;
  gap: 0.35rem;
}

input,
select {
  padding: 0.55rem 0.7rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(3, 9, 22, 0.85);
  color: var(--text);
}

.auth-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.two-col,
.three-col {
  display: grid;
  gap: 0.6rem;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}


.password-field {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.password-field input {
  flex: 1;
}

.password-toggle {
  white-space: nowrap;
}

.hidden {
  display: none;
}


.admin-section-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}


.csv-ingestion-card {
  width: 100%;
}

.csv-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.csv-card-header h4 {
  margin: 0;
}

.csv-section-body.hidden {
  display: none;
}

.csv-upload-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.clear-csv-button {
  white-space: nowrap;
}
.card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0.7rem;
  padding: 1rem;
}

.card.table-expanded {
  grid-column: 1 / -1;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.7rem;
  overflow: hidden;
}

th,
td {
  padding: 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  text-align: left;
  vertical-align: top;
}

.message {
  min-height: 1.5rem;
  margin-top: 1rem;
  color: #87d4ff;
}

.entry-action-banner {
  margin: 0.75rem 0 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.55rem;
  background: rgba(135, 212, 255, 0.2);
  border: 1px solid rgba(135, 212, 255, 0.6);
  color: #dff6ff;
  font-weight: 600;
}

.entry-action-banner.hidden {
  display: none;
}

.admin-locked-message {
  margin-bottom: 1rem;
}

.lock-current-state {
  margin: 0.75rem 0 0;
  font-weight: 700;
  color: #c7f0ff;
}

.helper-text {
  color: #b6dfff;
  font-size: 0.92rem;
}

.table-collapsible {
  margin-top: 0.75rem;
}

.table-toggle {
  width: 100%;
  text-align: left;
  margin-bottom: 0.5rem;
}

.table-collapsible-content {
  overflow-x: auto;
}

.breakdown-controls {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.breakdown-filter-group {
  display: grid;
  gap: 0.35rem;
}

.breakdown-filter-label {
  font-size: 0.86rem;
  color: #b6dfff;
}

.breakdown-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 5.2rem;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.breakdown-chip-row button {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}

.breakdown-chip-row button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.breakdown-nav-arrows {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.breakdown-nav-arrows button {
  min-width: 2.4rem;
  text-align: center;
}

.breakdown-scroll-region {
  max-height: 68vh;
  overflow: auto;
}

.breakdown-matrix-table {
  font-size: 0.84rem;
}

.breakdown-matrix-table th:first-child,
.breakdown-matrix-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: rgba(7, 17, 41, 0.98);
}

.admin-entry-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.existing-entries-view {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.75rem;
}

.existing-entries-view label {
  font-weight: 600;
}

.existing-entries-view select {
  max-width: 34rem;
}

.existing-entries-actions {
  margin-top: 0.25rem;
}

.entry-paid-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.champions-history {
  margin-top: 1.5rem;
}

.champions-legend ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.champion-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge-neutral {
  background: rgba(201, 211, 228, 0.18);
  color: #e5ebf8;
  border-color: rgba(201, 211, 228, 0.45);
}

.badge-bronze {
  background: rgba(205, 127, 50, 0.22);
  color: #ffd6ad;
  border-color: rgba(205, 127, 50, 0.55);
}

.badge-silver {
  background: rgba(192, 192, 192, 0.18);
  color: #f4f5fa;
  border-color: rgba(192, 192, 192, 0.55);
}

.badge-gold {
  background: rgba(255, 214, 0, 0.2);
  color: #fff1a5;
  border-color: rgba(255, 214, 0, 0.55);
}


.badge-platinum {
  background: rgba(166, 181, 205, 0.22);
  color: #eef5ff;
  border-color: rgba(166, 181, 205, 0.6);
}

.champions-table-wrap {
  overflow-x: auto;
}


.badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(0, 0, 0, 0.25);
}

a {
  color: inherit;
}

.tab {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.history-shell {
  max-width: 1000px;
}

.history-hero {
  background: linear-gradient(130deg, rgba(61, 169, 252, 0.2), rgba(6, 11, 28, 0.9));
  border-color: rgba(61, 169, 252, 0.45);
  box-shadow: inset 0 0 0 1px rgba(61, 169, 252, 0.18), 0 10px 24px rgba(0, 0, 0, 0.35);
}

.history-hero h2 {
  margin-bottom: 0.6rem;
  letter-spacing: 0.03em;
}

.history-timeline {
  position: relative;
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-left: 1rem;
}

.history-timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 2px;
  background: linear-gradient(to bottom, rgba(61, 169, 252, 0.85), rgba(61, 169, 252, 0.2));
}

.history-era {
  position: relative;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.12), rgba(10, 16, 31, 0.9));
}

.history-era::before {
  content: "";
  position: absolute;
  left: -1.4rem;
  top: 1.1rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #3da9fc;
  box-shadow: 0 0 0 4px rgba(61, 169, 252, 0.22);
}

.history-era h3 {
  color: #9ed5ff;
}

.history-era blockquote {
  margin: 0.85rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid rgba(61, 169, 252, 0.75);
  background: rgba(0, 0, 0, 0.24);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
}

.history-era ul {
  margin: 0.6rem 0 0.75rem 1.15rem;
}

.rules-hero {
  background: radial-gradient(circle at top right, rgba(61, 169, 252, 0.38), rgba(2, 8, 22, 0.92) 45%),
    linear-gradient(135deg, rgba(119, 56, 255, 0.25), rgba(255, 214, 0, 0.2));
  border: 1px solid rgba(126, 209, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(126, 209, 255, 0.2), 0 14px 30px rgba(0, 0, 0, 0.38);
}

.rules-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a9e7ff;
}

.rules-layout {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.rules-card {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.1), rgba(8, 15, 35, 0.92));
  border: 1px solid rgba(146, 190, 255, 0.28);
  box-shadow: 0 12px 22px rgba(3, 7, 18, 0.35);
}

.rules-card h3 {
  color: #c6e9ff;
}

.rules-card h4 {
  margin-bottom: 0.4rem;
  color: #9fe0ff;
}

.rules-card ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
}

.rules-card li {
  line-height: 1.4;
}

.rules-card-wide {
  grid-column: 1 / -1;
}

.rules-grid {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.rules-grid section {
  background: rgba(13, 27, 59, 0.6);
  border: 1px solid rgba(145, 208, 255, 0.24);
  border-radius: 0.65rem;
  padding: 0.75rem;
}

.rules-multipliers {
  margin-top: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 0.7rem;
}

.entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.75fr);
  gap: 0.85rem;
  align-items: start;
}

.entry-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.entry-main {
  display: grid;
  gap: 0.7rem;
}


.entry-submit-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.seed-pick-flagged {
  border: 1px solid rgba(255, 153, 0, 0.85);
  border-radius: 0.4rem;
  padding: 0.2rem;
  background: rgba(97, 55, 2, 0.35);
}

.payment-info-panel {
  margin: 0.3rem 0 0.75rem;
  padding: 0.65rem;
  border: 1px solid rgba(145, 208, 255, 0.24);
  border-radius: 0.55rem;
  background: rgba(7, 19, 45, 0.55);
}

.payment-links {
  display: grid;
  gap: 0.35rem;
}

.payment-links a {
  color: #c8e8ff;
  text-decoration: none;
  font-weight: 600;
}

.payment-links a:hover,
.payment-links a:focus-visible {
  text-decoration: underline;
}

.section-block.compact-card {
  padding: 0.75rem;
}

.section-block.compact-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.compact-grid label {
  font-size: 0.92rem;
}

.compact-grid select,
.compact-grid input {
  padding: 0.45rem 0.55rem;
}

.seed-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.seed-marker {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
}

.seed-missing {
  color: #ff7f7f;
  border-color: rgba(255, 127, 127, 0.6);
  background: rgba(110, 8, 8, 0.35);
}

.seed-picked {
  color: #7dff98;
  border-color: rgba(125, 255, 152, 0.62);
  background: rgba(10, 78, 30, 0.35);
}

.seeded-grid {
  display: grid;
  gap: 0.45rem;
}

.seeded-weight-row {
  display: grid;
  grid-template-columns: minmax(72px, auto) repeat(2, minmax(170px, 1fr));
  gap: 0.45rem;
  align-items: end;
}

.seeded-inline-label {
  font-size: 0.85rem;
}

.entry-roster-panel {
  position: sticky;
  top: 1rem;
  max-height: 78vh;
  overflow: auto;
  padding: 0.8rem;
}

.entry-roster-panel h3 {
  margin-bottom: 0.4rem;
}

.weight-roster-group {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  padding: 0.2rem 0.45rem;
  margin-bottom: 0.45rem;
  background: rgba(4, 10, 24, 0.45);
}

.weight-roster-group summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.2rem 0;
}

.weight-roster-group ul {
  margin: 0.2rem 0 0.35rem 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.2rem;
  font-size: 0.86rem;
}

.wrestler-picked {
  color: #8d949f;
}

.option-unavailable {
  color: #8d949f;
}

.bonus-seed-status-row {
  margin-bottom: 0.65rem;
}

.bonus-seed-marker {
  min-width: 68px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.22rem 0.5rem;
}

.bonus-seed-marker small {
  font-size: 0.68rem;
  font-weight: 700;
}

@media (max-width: 960px) {
  .entry-layout {
    grid-template-columns: 1fr;
  }

  .entry-roster-panel {
    position: static;
    max-height: none;
  }

  .seeded-weight-row {
    grid-template-columns: 1fr;
  }
}
