:root {
  --bg: #070b13;
  --bg-2: #0d1420;
  --surface: rgba(18, 25, 37, 0.9);
  --surface-2: rgba(28, 37, 52, 0.86);
  --surface-3: rgba(42, 53, 70, 0.9);
  --line: rgba(139, 154, 177, 0.22);
  --line-strong: rgba(202, 214, 232, 0.36);
  --text: #fbfcff;
  --muted: #c7d0df;
  --muted-strong: #e5ebf5;
  --red: #f03a5f;
  --red-dark: #b91836;
  --red-bright: #ff4f73;
  --red-soft: rgba(240, 58, 95, 0.16);
  --gold: #e7b84f;
  --gold-soft: rgba(231, 184, 79, 0.16);
  --teal: #41d8cf;
  --teal-soft: rgba(65, 216, 207, 0.12);
  --green: #5fe38f;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  --panel-highlight: rgba(255, 255, 255, 0.075);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #070b13;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 18%, rgba(240, 58, 95, 0.13), transparent 24rem),
    radial-gradient(circle at 86% 34%, rgba(65, 216, 207, 0.08), transparent 32rem),
    linear-gradient(115deg, rgba(7, 12, 22, 0.97), rgba(12, 20, 31, 0.94) 52%, rgba(5, 9, 17, 0.98)),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  background-attachment: fixed;
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
  isolation: isolate;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background:
    url("assets/nottingham-forest-logo.png") no-repeat right 8vw top 140px / min(46vw, 620px) auto,
    radial-gradient(ellipse at 76% 34%, rgba(54, 116, 91, 0.18), transparent 42rem),
    linear-gradient(18deg, rgba(255, 255, 255, 0.025), transparent 34%);
  opacity: 0.26;
}

body::after {
  background:
    radial-gradient(ellipse at bottom, rgba(58, 98, 69, 0.14), transparent 58%),
    linear-gradient(180deg, rgba(3, 6, 12, 0.08), rgba(3, 6, 12, 0.58));
  opacity: 0.7;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid rgba(255, 117, 141, 0.42);
  border-radius: 9px;
  min-height: 42px;
  padding: 12px 18px;
  background: linear-gradient(180deg, var(--red-bright), #de254a 48%, var(--red-dark));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

button,
.button-link {
  text-decoration: none;
}

button:hover {
  border-color: rgba(255, 149, 166, 0.72);
  background: linear-gradient(180deg, #ff6683, #f0365d 48%, #c91e40);
  transform: translateY(-1px);
}

button:active,
.button-link:active {
  transform: translateY(0);
}

button:focus-visible,
.button-link:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(65, 216, 207, 0.72);
  outline-offset: 2px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 117, 141, 0.42);
  border-radius: 9px;
  padding: 12px 16px;
  background: linear-gradient(180deg, var(--red-bright), #de254a 48%, var(--red-dark));
  color: white;
  font-weight: 700;
}

.button-link:hover {
  background: linear-gradient(180deg, #ff6683, #f0365d 48%, #c91e40);
}

.text-button {
  min-height: auto;
  border: 0;
  padding: 2px 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted-strong);
  font-size: 14px;
  text-align: left;
}

.text-button:hover {
  background: transparent;
  color: var(--red-bright);
  transform: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  background: rgba(5, 10, 18, 0.72);
  color: var(--text);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(240, 58, 95, 0.2);
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 14px;
}

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

h1,
h2,
h3 {
  color: #fff;
  font-weight: 900;
}

::selection {
  background: rgba(240, 58, 95, 0.45);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(6, 11, 19, 0.72);
}

::-webkit-scrollbar-thumb {
  border: 2px solid rgba(6, 11, 19, 0.72);
  border-radius: 999px;
  background: rgba(199, 208, 223, 0.42);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(240, 58, 95, 0.62);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid rgba(214, 224, 242, 0.18);
  padding: 18px min(5vw, 56px);
  background:
    linear-gradient(90deg, rgba(160, 10, 32, 0.32), transparent 22%),
    rgba(8, 13, 23, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

.brand,
.user-bar,
.top-nav,
.mode-tabs,
.page-head,
.section-title {
  display: flex;
  align-items: center;
}

.brand {
  gap: 14px;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(19, 26, 38, 0.78));
  border: 1px solid rgba(231, 184, 79, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.brand-mark img {
  width: 32px;
  height: 40px;
  object-fit: contain;
}

.brand h1 {
  margin-bottom: 3px;
  font-size: 24px;
  line-height: 1;
}

.brand p,
.muted {
  color: var(--muted);
}

.top-nav {
  gap: 8px;
  justify-content: center;
}

.platform-news-bar {
  grid-column: 1 / -1;
  width: 100%;
}

.platform-news-ticker {
  position: relative;
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-color: rgba(231, 184, 79, 0.4);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(240, 58, 95, 0.22), rgba(231, 184, 79, 0.08) 44%, rgba(65, 216, 207, 0.1)),
    rgba(10, 16, 26, 0.9);
  color: var(--text);
  text-align: left;
  overflow: hidden;
}

.platform-news-ticker > * {
  position: relative;
  z-index: 1;
}

.platform-news-ticker::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.18) 45%, transparent 72%);
  opacity: 0;
  transform: translateX(-120%);
  pointer-events: none;
}

.platform-news-ticker.is-changing::before {
  animation: newsTickerSweep 620ms ease-out;
}

.platform-news-ticker.is-changing strong,
.platform-news-ticker.is-changing .platform-news-source,
.platform-news-ticker.is-changing .platform-news-time {
  animation: newsTickerTextIn 420ms ease-out;
}

.platform-news-ticker:hover {
  border-color: rgba(231, 184, 79, 0.72);
  background:
    linear-gradient(90deg, rgba(240, 58, 95, 0.28), rgba(231, 184, 79, 0.12) 44%, rgba(65, 216, 207, 0.13)),
    rgba(15, 23, 36, 0.96);
}

.platform-news-avatar {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(231, 184, 79, 0.42);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(231, 184, 79, 0.28), rgba(240, 58, 95, 0.18));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.platform-news-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.platform-news-live,
.platform-news-source,
.platform-news-time {
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.platform-news-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border: 1px solid rgba(240, 58, 95, 0.42);
  border-radius: 999px;
  background: rgba(240, 58, 95, 0.16);
  color: #fff;
  text-transform: uppercase;
}

.platform-news-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff3d5c;
  box-shadow: 0 0 0 0 rgba(240, 58, 95, 0.58);
  animation: newsLivePulse 1.6s ease-out infinite;
}

.platform-news-source {
  color: var(--gold);
  font-weight: 700;
}

.platform-news-ticker strong {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
  letter-spacing: 0;
}

@keyframes newsTickerSweep {
  0% {
    opacity: 0;
    transform: translateX(-120%);
  }
  22% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

@keyframes newsTickerTextIn {
  0% {
    opacity: 0;
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes newsLivePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(240, 58, 95, 0.58);
  }
  72% {
    box-shadow: 0 0 0 7px rgba(240, 58, 95, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(240, 58, 95, 0);
  }
}

.platform-news-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 92px min(4vw, 36px) 32px;
  background: rgba(3, 7, 13, 0.72);
  backdrop-filter: blur(10px);
}

.platform-news-panel {
  width: min(960px, 100%);
  max-height: min(78vh, 780px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  border: 1px solid rgba(214, 224, 242, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(26, 36, 54, 0.96), rgba(9, 14, 24, 0.98)),
    var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.platform-news-panel-head,
.platform-news-panel-actions,
.platform-news-tabs,
.platform-news-item-head,
.platform-news-item-meta {
  display: flex;
  align-items: center;
}

.platform-news-panel-head {
  justify-content: space-between;
  gap: 16px;
}

.platform-news-panel-head h2 {
  margin: 0;
  font-size: 24px;
}

.platform-news-panel-actions {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.platform-news-tabs {
  gap: 8px;
  flex-wrap: wrap;
}

.platform-news-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.platform-news-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(139, 154, 177, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(240, 58, 95, 0.09), transparent 32%),
    rgba(13, 20, 32, 0.78);
}

.platform-news-item.version {
  border-color: rgba(231, 184, 79, 0.42);
  background:
    linear-gradient(90deg, rgba(231, 184, 79, 0.15), transparent 36%),
    rgba(14, 22, 34, 0.9);
}

.platform-news-item-head {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.platform-news-item h3 {
  min-width: 0;
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 0;
}

.platform-news-item p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.6;
}

.platform-news-item-meta {
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.platform-news-category {
  padding: 3px 7px;
  border: 1px solid rgba(65, 216, 207, 0.28);
  border-radius: 999px;
  background: rgba(65, 216, 207, 0.1);
  color: var(--teal);
  white-space: nowrap;
}

.nav-link,
.mode-tab,
.secondary-button,
.small-button {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(37, 47, 65, 0.88), rgba(17, 24, 36, 0.9));
  color: var(--muted-strong);
  box-shadow: none;
}

.nav-link:hover,
.mode-tab:hover,
.secondary-button:hover,
.small-button:hover {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(52, 65, 88, 0.94), rgba(23, 32, 47, 0.95));
  color: #fff;
}

.nav-link.active,
.mode-tab.active {
  border-color: rgba(255, 113, 138, 0.72);
  background: linear-gradient(180deg, #f3486a, #bb1837);
  color: #fff;
}

.user-bar {
  justify-content: flex-end;
  gap: 12px;
}

.small-button {
  min-height: 34px;
  padding: 9px 12px;
  font-size: 13px;
}

.app-shell {
  width: min(1480px, 92vw);
  margin: 32px auto 64px;
}

.auth-grid,
.admin-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.panel,
.message-box,
.team-summary {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background:
    linear-gradient(180deg, var(--panel-highlight), rgba(255, 255, 255, 0.015) 34%, rgba(4, 8, 15, 0.08)),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.panel {
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.panel::before,
.team-summary::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(90deg, rgba(240, 58, 95, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 28%);
  pointer-events: none;
}

.panel > *,
.team-summary > * {
  position: relative;
}

.notice-panel {
  margin-bottom: 18px;
  padding: 18px;
}

.read-only-notice {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(231, 184, 79, 0.1);
}

.notice-title {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.hero-panel {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 28%, rgba(240, 58, 95, 0.15), transparent 16rem),
    linear-gradient(90deg, rgba(231, 184, 79, 0.1), transparent 42%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 72px);
  opacity: 0.82;
  pointer-events: none;
}

.hero-panel > * {
  position: relative;
}

.hero-panel h2 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(34px, 3.6vw, 56px);
  line-height: 1.12;
  text-wrap: balance;
}

.verified-shell {
  display: grid;
  min-height: calc(100vh - 180px);
  place-items: center;
}

.verified-panel {
  width: min(560px, 100%);
  text-align: center;
}

.verified-panel h2 {
  margin-bottom: 14px;
  font-size: clamp(34px, 6vw, 56px);
}

.verified-panel .button-link {
  margin-top: 12px;
}

.kicker {
  margin-bottom: 8px;
  color: var(--red-bright);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.form-panel,
.form-stack {
  display: grid;
  gap: 18px;
}

.form-note {
  margin-bottom: 0;
  border-left: 3px solid var(--red);
  padding: 10px 12px;
  background: rgba(240, 58, 95, 0.12);
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.6;
}

.mode-tabs {
  gap: 8px;
}

.mode-tab {
  flex: 1;
}

.message-box {
  margin-bottom: 18px;
  padding: 14px 16px;
  color: var(--muted-strong);
}

.message-box.success {
  border-color: rgba(70, 194, 122, 0.5);
  color: var(--green);
}

.message-box.error {
  border-color: rgba(217, 35, 50, 0.72);
  color: #ffb4bb;
}

.page-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-head h2 {
  margin-bottom: 0;
  font-size: 32px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.team-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent),
    var(--surface-2);
}

.team-card h3 {
  margin-bottom: 10px;
}

.team-card {
  display: grid;
  gap: 12px;
}

.team-card-logo {
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 12px;
  object-fit: contain;
  background: rgba(4, 8, 15, 0.72);
}

.logo-upload-cell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.logo-upload-cell .muted {
  grid-column: 1 / -1;
}

.logo-upload-cell input[type="file"] {
  min-width: 0;
  max-width: 100%;
  font-size: 11px;
}

.admin-logo-preview {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: rgba(4, 8, 15, 0.72);
}

.budget {
  color: var(--gold);
  font-size: 22px;
  font-weight: 900;
}

.team-summary {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
  padding: 20px;
  overflow: hidden;
}

.summary-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(231, 184, 79, 0.2);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 12px 12px 12px 14px;
  background: rgba(255, 255, 255, 0.035);
}

.summary-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(214, 169, 74, 0.42);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(231, 184, 79, 0.24), rgba(231, 184, 79, 0.08));
  color: #f3d38a;
}

.summary-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.summary-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.summary-logo {
  background: rgba(5, 10, 18, 0.72);
  color: var(--text);
}

.summary-content span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-strong);
  font-size: 13px;
}

.summary-content strong {
  font-size: 24px;
  color: #fff;
}

.team-panel {
  position: relative;
}

.team-panel .section-title h3::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 18px;
  border-radius: 999px;
  margin-right: 8px;
  background: linear-gradient(180deg, var(--red-bright), var(--gold));
  vertical-align: -3px;
}

.section-title {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h3 {
  margin-bottom: 0;
}

.badge {
  border: 1px solid rgba(231, 184, 79, 0.54);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(231, 184, 79, 0.12);
  color: #ffe3a0;
  font-size: 13px;
  font-weight: 800;
}

.badge-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

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

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.player-view-table {
  min-width: 1080px;
}

.compact-view-table {
  min-width: 720px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  text-align: left;
}

th {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 900;
}

tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.025);
}

tbody tr:hover td {
  background: rgba(240, 58, 95, 0.07);
}

.sort-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 6px;
  padding: 3px 0;
  background: transparent;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 800;
}

.sort-header:hover,
.sort-header.active {
  background: transparent;
  color: #fff;
}

.sort-header::after {
  content: "";
  color: var(--red);
  font-size: 11px;
}

.sort-header.active[data-sort-direction="asc"]::after {
  content: "▲";
}

.sort-header.active[data-sort-direction="desc"]::after {
  content: "▼";
}

td:first-child {
  font-weight: 800;
}

.mini-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.mini-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: rgba(26, 36, 53, 0.86);
}

.admin-stack {
  display: grid;
  gap: 20px;
}

.admin-subnav,
.team-subnav,
.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-subnav,
.team-subnav {
  margin-bottom: 18px;
}

.admin-subnav-button,
.team-subnav-button {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(37, 47, 65, 0.88), rgba(17, 24, 36, 0.9));
  color: var(--muted-strong);
  min-height: 38px;
}

.admin-subnav-button.active,
.team-subnav-button.active {
  border-color: rgba(255, 113, 138, 0.72);
  background: linear-gradient(180deg, #f3486a, #bb1837);
  color: #fff;
}

.admin-toolbar {
  justify-content: space-between;
}

.database-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) minmax(220px, 1fr) minmax(150px, 0.55fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent),
    rgba(12, 18, 29, 0.82);
}

.database-toolbar label {
  min-width: 0;
}

.toolbar-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.filter-summary {
  color: var(--muted-strong);
  font-size: 13px;
  white-space: nowrap;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(12, 18, 29, 0.74);
}

.pagination-status,
.pagination-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination-status {
  color: var(--muted-strong);
  font-size: 13px;
}

.compact-filter {
  min-width: 180px;
  text-align: left;
}

.team-coach-stack {
  display: grid;
  gap: 16px;
}

.ai-coach-panel {
  display: grid;
  gap: 14px;
}

.ai-coach-content {
  display: grid;
  gap: 14px;
}

.ai-coach-empty {
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.ai-coach-empty strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 20px;
}

.ai-coach-image-wrap {
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px;
  background: rgba(4, 8, 15, 0.74);
}

.ai-coach-image-wrap img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 8px;
}

.ai-coach-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-coach-actions strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
}

.admin-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.transfer-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
}

#transferListingsSection .section-title {
  border: 1px solid rgba(231, 184, 79, 0.42);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(231, 184, 79, 0.1);
}

.listing-cta-button {
  min-height: 42px;
  padding: 11px 18px;
  border: 1px solid rgba(255, 117, 141, 0.42);
  background: linear-gradient(180deg, var(--red-bright), #de254a 48%, var(--red-dark));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.transfer-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent),
    rgba(12, 18, 29, 0.82);
}

.transfer-form button {
  min-height: 45px;
}

.transfer-prefill {
  grid-column: 1 / -1;
}

.transfer-toolbar {
  justify-content: flex-start;
}

.transfer-feed {
  display: grid;
  gap: 10px;
}

.transfer-feed-item {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(26, 36, 53, 0.82);
}

.transfer-feed-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted-strong);
  font-size: 12px;
}

.transfer-feed-related {
  margin-top: 6px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.transfer-feed-related summary {
  cursor: pointer;
  color: #ffbdc8;
  font-size: 13px;
  font-weight: 700;
}

.transfer-feed-related-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.transfer-feed-related-item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
}

.listing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  overflow-x: auto;
}

.listing-card {
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) minmax(260px, 1.7fr) minmax(116px, 0.8fr) minmax(160px, 1.1fr) minmax(120px, 0.8fr) minmax(170px, 1.1fr) auto;
  align-items: center;
  min-width: 1120px;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(26, 36, 53, 0.86);
}

.listing-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.listing-card h4 {
  margin: 0;
  font-size: 15px;
}

.listing-meta {
  display: flex;
  gap: 6px 10px;
  flex-wrap: wrap;
  color: var(--muted-strong);
  font-size: 12px;
}

.listing-price {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.listing-ad,
.listing-time {
  margin: 0;
  font-size: 12px;
}

.listing-time {
  white-space: nowrap;
}

.listing-offers {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  font-size: 12px;
}

.listing-offer-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 5px 7px;
  color: var(--muted-strong);
  font-size: 12px;
}

.listing-actions,
.trade-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.money-positive {
  color: var(--green);
  font-weight: 800;
}

.money-negative {
  color: #ff8d92;
  font-weight: 800;
}

.budget-ledger-table {
  min-width: 1160px;
}

.transfer-table,
.transfer-review-table,
.external-transfer-table,
.external-transfer-admin-table,
.free-agent-auction-table {
  min-width: 1120px;
  table-layout: fixed;
}

.transfer-table th,
.transfer-table td,
.transfer-review-table th,
.transfer-review-table td,
.external-transfer-table th,
.external-transfer-table td,
.external-transfer-admin-table th,
.external-transfer-admin-table td,
.free-agent-auction-table th,
.free-agent-auction-table td {
  vertical-align: top;
}

.transfer-review-table {
  min-width: 1420px;
}

.free-agent-auction-table {
  min-width: 1480px;
}

.blind-auction-table {
  min-width: 1360px;
}

.external-transfer-admin-table {
  min-width: 1320px;
}

.admin-auction-table {
  min-width: 1320px;
}

.transfer-window-status {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
  background: rgba(12, 18, 29, 0.92);
}

.transfer-window-status.open {
  border-color: rgba(47, 209, 135, 0.62);
  box-shadow: 0 0 0 1px rgba(47, 209, 135, 0.12);
  color: #a7f3c8;
}

.transfer-window-status.closed {
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.14);
  color: #fecaca;
}

.traffic-light {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 18px currentColor;
  flex: 0 0 auto;
}

.transfer-window-admin-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.transfer-window-admin-panel h3 {
  margin: 2px 0 4px;
  font-size: 20px;
}

.status-pill.sent {
  border-color: rgba(72, 162, 255, 0.45);
  background: rgba(72, 162, 255, 0.14);
  color: #bcdcff;
}

.status-pill.pending_admin {
  border-color: rgba(245, 197, 24, 0.5);
  background: rgba(245, 197, 24, 0.14);
  color: #ffe48a;
}

.status-pill.completed {
  border-color: rgba(47, 209, 135, 0.5);
  background: rgba(47, 209, 135, 0.14);
  color: #9ff0c4;
}

.status-pill.cancelled,
.status-pill.expired,
.status-pill.admin_rejected {
  border-color: rgba(170, 179, 196, 0.32);
  background: rgba(170, 179, 196, 0.12);
  color: var(--muted-strong);
}

.status-pill.listing,
.status-pill.offer {
  border-color: rgba(217, 35, 50, 0.48);
  background: rgba(217, 35, 50, 0.13);
  color: #ffb4bb;
}

.status-pill.auction-item-active {
  border-color: rgba(72, 162, 255, 0.45);
  background: rgba(72, 162, 255, 0.12);
  color: #bcdcff;
}

.status-pill.auction-item-buyout_locked {
  border-color: rgba(245, 197, 24, 0.58);
  background: rgba(245, 197, 24, 0.14);
  color: #ffe48a;
}

.status-pill.auction-item-settled {
  border-color: rgba(47, 209, 135, 0.55);
  background: rgba(47, 209, 135, 0.12);
  color: #9ff0c4;
}

.status-pill.auction-item-no_bid {
  border-color: rgba(170, 179, 196, 0.34);
  background: rgba(170, 179, 196, 0.1);
  color: var(--muted-strong);
}

.status-pill.blind-item-active {
  border-color: rgba(72, 162, 255, 0.45);
  background: rgba(72, 162, 255, 0.14);
  color: #bcdcff;
}

.status-pill.blind-item-won {
  border-color: rgba(47, 209, 135, 0.5);
  background: rgba(47, 209, 135, 0.14);
  color: #9ff0c4;
}

.status-pill.blind-item-unsold_pending {
  border-color: rgba(245, 197, 24, 0.58);
  background: rgba(245, 197, 24, 0.16);
  color: #ffcf7a;
}

.status-pill.blind-item-unsold_resolved {
  border-color: rgba(170, 179, 196, 0.34);
  background: rgba(170, 179, 196, 0.12);
  color: var(--muted);
}

.player-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: auto;
}

.player-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(26, 36, 53, 0.86);
}

.detail-item span {
  display: block;
  color: var(--muted-strong);
  font-size: 12px;
  margin-bottom: 4px;
}

.wide-field {
  grid-column: 1 / -1;
}

.admin-form {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.2fr auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent),
    rgba(12, 18, 29, 0.82);
}

.admin-create-team-form {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.8fr);
  align-items: stretch;
  max-width: 860px;
}

.admin-create-team-form .team-logo-preview-box {
  grid-row: span 2;
}

.admin-create-team-form button {
  justify-self: start;
  min-width: 160px;
}

.team-logo-preview-box {
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(8, 14, 24, 0.76);
}

.team-logo-preview-placeholder,
.team-logo-preview-box-image {
  display: grid;
  min-height: 160px;
  place-items: center;
  border: 1px dashed rgba(231, 184, 79, 0.52);
  border-radius: 10px;
  background: rgba(26, 36, 53, 0.86);
  color: var(--muted-strong);
  font-weight: 700;
}

.team-logo-preview-box-image img {
  max-width: 150px;
  max-height: 150px;
  object-fit: contain;
}

.admin-form.player-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-form.player-create-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 760px;
}

.admin-form.player-form button {
  min-height: 45px;
}

.bulk-import-block {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.compact-title {
  margin-bottom: 0;
}

.bulk-import-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 12px;
  align-items: end;
}

.bulk-import-textarea {
  grid-row: span 2;
}

.bulk-import-form textarea {
  min-height: 180px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.55;
}

.bulk-import-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.bulk-import-actions button {
  min-height: 42px;
}

.bulk-import-preview {
  display: grid;
  gap: 12px;
}

.bulk-import-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.success-badge {
  border-color: rgba(56, 189, 132, 0.42);
  background: rgba(56, 189, 132, 0.1);
  color: #b9f4d4;
}

.danger-badge {
  border-color: rgba(248, 113, 113, 0.48);
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

.bulk-preview-wrap {
  max-height: 360px;
}

.bulk-preview-table {
  min-width: 980px;
  table-layout: fixed;
  font-size: 12px;
}

.bulk-preview-table th:nth-child(1),
.bulk-preview-table td:nth-child(1) {
  width: 58px;
}

.bulk-preview-table th:nth-child(2),
.bulk-preview-table td:nth-child(2),
.bulk-preview-table th:nth-child(6),
.bulk-preview-table td:nth-child(6),
.bulk-preview-table th:nth-child(7),
.bulk-preview-table td:nth-child(7) {
  width: 90px;
}

.bulk-preview-table th:nth-child(8),
.bulk-preview-table td:nth-child(8) {
  width: 260px;
}

.bulk-row-error td {
  background: rgba(248, 113, 113, 0.06);
}

.bulk-row-skip td {
  background: rgba(250, 204, 21, 0.06);
}

.bulk-status {
  display: inline-flex;
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  color: var(--muted-strong);
  white-space: normal;
}

.bulk-status.ready {
  border-color: rgba(56, 189, 132, 0.42);
  color: #b9f4d4;
}

.bulk-status.skip {
  border-color: rgba(250, 204, 21, 0.42);
  color: #fde68a;
}

.bulk-status.error {
  border-color: rgba(248, 113, 113, 0.48);
  color: #fecaca;
}

.admin-filter {
  max-width: 280px;
}

.review-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-tab {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(37, 47, 65, 0.88), rgba(17, 24, 36, 0.9));
  color: var(--muted-strong);
  min-height: 38px;
}

.review-tab.active {
  border-color: rgba(255, 113, 138, 0.72);
  background: linear-gradient(180deg, #f3486a, #bb1837);
  color: #fff;
}

.review-extra-actions {
  display: flex;
  justify-content: flex-end;
}

.auction-status-open {
  border-color: rgba(47, 209, 135, 0.55);
  color: var(--green);
}

.auction-status-draft {
  border-color: rgba(72, 162, 255, 0.45);
  color: #9ccfff;
}

.auction-status-closed {
  border-color: rgba(245, 197, 24, 0.58);
  color: #ffcf7a;
}

.auction-status-settled {
  border-color: rgba(170, 179, 196, 0.34);
  color: var(--muted);
}

.admin-auction-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(420px, 1.5fr);
  gap: 14px;
  align-items: end;
}

.compact-admin-form,
.auction-item-form {
  display: grid;
  gap: 12px;
}

.compact-admin-form {
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
}

.auction-item-form {
  grid-template-columns: minmax(260px, 1.4fr) minmax(140px, 0.7fr) minmax(140px, 0.7fr) auto;
  align-items: end;
}

.auction-action-toolbar {
  justify-content: flex-start;
}

.auction-mode-tabs {
  margin: 0 0 14px;
}

.compact-section-title {
  margin-top: 20px;
}

.auction-bid-history-item {
  display: block;
  line-height: 1.55;
  color: var(--muted);
  white-space: nowrap;
}

.external-transfer-form .wide-field {
  grid-column: 1 / -1;
}

.external-transfer-form textarea,
.external-admin-stack textarea {
  resize: vertical;
  min-height: 74px;
}

.external-transfer-thumb-link {
  display: inline-flex;
  align-items: center;
}

.external-transfer-thumb {
  width: 88px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.tactic-form {
  margin: 18px 0;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
}

.tactic-form .wide-field,
.tactic-form .default-tactic-preview,
.tactic-form .form-actions,
.tactic-form #teamTacticChoiceHint {
  grid-column: 1 / -1;
}

.tactic-current-card,
.default-tactic-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(7, 12, 22, 0.58);
}

.tactic-current-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.tactic-current-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.default-tactic-preview {
  min-height: 120px;
  display: grid;
  align-items: center;
}

.default-tactic-preview-image,
.default-tactic-thumb {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 10, 18, 0.72);
  object-fit: cover;
}

.default-tactic-preview-image {
  width: min(100%, 520px);
  max-height: 320px;
}

.default-tactic-thumb {
  width: 120px;
  height: 78px;
}

.default-tactic-thumb.large {
  width: 180px;
  height: 116px;
}

.default-tactics-table {
  min-width: 860px;
}

.team-tactic-review-table,
.team-tactic-history-table {
  min-width: 980px;
}

.status-pill.tactic-pending {
  border-color: rgba(231, 184, 79, 0.44);
  background: var(--gold-soft);
  color: #ffe2a3;
}

.status-pill.tactic-approved {
  border-color: rgba(95, 227, 143, 0.42);
  background: rgba(95, 227, 143, 0.12);
  color: #a9f4c0;
}

.status-pill.tactic-rejected {
  border-color: rgba(240, 58, 95, 0.46);
  background: var(--red-soft);
  color: #ff9cae;
}

.status-pill.tactic-file {
  border-color: rgba(65, 216, 207, 0.42);
  background: var(--teal-soft);
  color: #a8f7f2;
}

.external-admin-stack {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.external-screenshot-preview {
  min-height: 58px;
  display: flex;
  align-items: center;
}

.external-player-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 8px;
  min-width: 260px;
}

.external-player-fields input,
.external-admin-stack input,
.external-admin-stack textarea {
  width: 100%;
}

.external-admin-actions {
  min-width: 160px;
}

.status-pill.external-submitted,
.status-pill.external-quoted {
  background: rgba(250, 204, 21, 0.14);
  color: #fde68a;
  border-color: rgba(250, 204, 21, 0.38);
}

.status-pill.external-public_listed {
  background: rgba(56, 189, 248, 0.14);
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.38);
}

.status-pill.external-matched_pending_admin {
  background: rgba(168, 85, 247, 0.16);
  color: #e9d5ff;
  border-color: rgba(168, 85, 247, 0.42);
}

.status-pill.external-completed {
  background: rgba(47, 209, 135, 0.14);
  color: #bbf7d0;
  border-color: rgba(47, 209, 135, 0.38);
}

.status-pill.external-admin_rejected {
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.4);
}

.danger-zone-panel {
  border-color: rgba(248, 113, 113, 0.38);
}

.danger-notice {
  border: 1px solid rgba(248, 113, 113, 0.42);
  border-radius: 10px;
  padding: 14px 16px;
  background: rgba(127, 29, 29, 0.18);
}

.danger-notice strong {
  display: block;
  margin-bottom: 6px;
  color: #fecaca;
}

.danger-notice p {
  margin: 0;
  color: var(--muted-strong);
}

.league-reset-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.3fr);
  gap: 16px;
  align-items: start;
}

.league-reset-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.checkbox-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: var(--muted-strong);
}

.checkbox-line input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.league-reset-feature-fieldset {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.52);
}

.league-reset-feature-fieldset legend {
  padding: 0 6px;
  color: var(--text);
  font-weight: 700;
}

.league-reset-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 10px;
}

.league-reset-log-table {
  min-width: 900px;
}

.admin-table-wrap {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent),
    rgba(8, 14, 24, 0.86);
  max-height: 68vh;
  overflow-y: auto;
  overflow-x: auto;
  box-shadow: var(--shadow);
}

.admin-table {
  width: 100%;
  min-width: 0;
}

.admin-player-table {
  min-width: 0;
  table-layout: fixed;
  font-size: 12px;
}

.admin-team-table {
  min-width: 0;
  table-layout: fixed;
  font-size: 12px;
}

.admin-ai-coach-table {
  min-width: 980px;
  table-layout: fixed;
  font-size: 12px;
}

.admin-ai-coach-table th:nth-child(1),
.admin-ai-coach-table td:nth-child(1) {
  width: 18%;
}

.admin-ai-coach-table th:nth-child(2),
.admin-ai-coach-table td:nth-child(2),
.admin-ai-coach-table th:nth-child(3),
.admin-ai-coach-table td:nth-child(3) {
  width: 25%;
}

.admin-ai-coach-table th:nth-child(4),
.admin-ai-coach-table td:nth-child(4),
.admin-ai-coach-table th:nth-child(5),
.admin-ai-coach-table td:nth-child(5) {
  width: 16%;
}

.claim-table,
.user-table {
  min-width: 980px;
}

.admin-table input,
.admin-table select {
  min-width: 0;
  width: 100%;
  padding: 6px 7px;
  border-radius: 7px;
  background: rgba(5, 10, 18, 0.8);
  font-size: 12px;
}

.money-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.money-input-wrap span {
  color: var(--muted-strong);
  font-size: 12px;
  white-space: nowrap;
}

.admin-table .compact-input {
  min-width: 0;
}

.admin-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
}

.inline-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(76px, 0.78fr) auto;
  gap: 6px;
  min-width: 0;
}

.ai-coach-upload-cell {
  display: grid;
  gap: 8px;
}

.ai-coach-upload-preview {
  display: grid;
  min-height: 58px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 6px;
  background: rgba(5, 10, 18, 0.62);
}

.admin-ai-coach-current,
.admin-ai-coach-preview,
.admin-ai-coach-review-thumb {
  width: 100%;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 8, 15, 0.72);
}

.admin-ai-coach-current,
.admin-ai-coach-preview {
  max-height: 120px;
}

.admin-ai-coach-review-thumb {
  max-width: 160px;
  max-height: 90px;
}

.ai-coach-thumb-link {
  display: inline-grid;
  color: inherit;
}

.member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
  white-space: nowrap;
}

.quota-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.quota-cell strong {
  color: var(--gold);
  font-size: 16px;
}

.chip-remove {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0;
  background: rgba(217, 35, 50, 0.16);
  color: #ffb4bb;
  line-height: 1;
}

.admin-table th,
.admin-table td {
  padding: 7px 7px;
  vertical-align: middle;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(17, 25, 38, 0.98);
  color: #ffe3a0;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 rgba(231, 184, 79, 0.22);
}

.money-input {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.admin-team-table th:nth-child(1),
.admin-team-table td:nth-child(1) {
  width: 3.5%;
}

.admin-team-table th:nth-child(2),
.admin-team-table td:nth-child(2) {
  width: 10%;
}

.admin-team-table th:nth-child(3),
.admin-team-table td:nth-child(3) {
  width: 11%;
}

.admin-team-table th:nth-child(4),
.admin-team-table td:nth-child(4) {
  width: 14%;
}

.admin-team-table th:nth-child(5),
.admin-team-table td:nth-child(5) {
  width: 10%;
}

.admin-team-table th:nth-child(6),
.admin-team-table td:nth-child(6) {
  width: 19%;
}

.admin-team-table th:nth-child(7),
.admin-team-table td:nth-child(7) {
  width: 15%;
}

.admin-team-table th:nth-child(8),
.admin-team-table td:nth-child(8) {
  width: 8%;
}

.admin-team-table th:nth-child(9),
.admin-team-table td:nth-child(9) {
  width: 9.5%;
}

.admin-player-table th:nth-child(1),
.admin-player-table td:nth-child(1) {
  width: 48px;
  text-align: center;
}

.admin-player-table th:nth-child(2),
.admin-player-table td:nth-child(2) {
  width: 100px;
}

.admin-player-table th:nth-child(3),
.admin-player-table td:nth-child(3) {
  width: 122px;
}

.admin-player-table th:nth-child(4),
.admin-player-table td:nth-child(4) {
  width: 110px;
}

.admin-player-table th:nth-child(5),
.admin-player-table td:nth-child(5) {
  width: 110px;
}

.admin-player-table th:nth-child(6),
.admin-player-table td:nth-child(6) {
  width: 130px;
}

.admin-player-table th:nth-child(7),
.admin-player-table td:nth-child(7),
.admin-player-table th:nth-child(8),
.admin-player-table td:nth-child(8),
.admin-player-table th:nth-child(9),
.admin-player-table td:nth-child(9),
.admin-player-table th:nth-child(10),
.admin-player-table td:nth-child(10) {
  width: 68px;
}

.admin-player-table th:nth-child(11),
.admin-player-table td:nth-child(11) {
  width: 72px;
}

.admin-table input.admin-player-checkbox {
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
  accent-color: var(--red);
}

.admin-player-table .admin-actions {
  flex-direction: column;
  gap: 4px;
}

.admin-player-table .admin-actions .small-button,
.admin-player-table .admin-actions .danger-button {
  width: 100%;
  min-height: 30px;
  padding: 6px 6px;
}

.admin-actions .small-button,
.admin-actions .danger-button {
  min-height: 32px;
  padding: 8px 10px;
  font-size: 12px;
}

.danger-button {
  border: 1px solid rgba(255, 117, 141, 0.62);
  background: rgba(240, 58, 95, 0.14);
  color: #ffc8d1;
}

.danger-button:hover {
  background: rgba(240, 58, 95, 0.24);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted-strong);
  white-space: nowrap;
  font-weight: 800;
}

.status-pill.claimed {
  border-color: rgba(70, 194, 122, 0.45);
  color: var(--green);
}

.status-pill.approved {
  border-color: rgba(70, 194, 122, 0.45);
  color: var(--green);
}

.status-pill.pending {
  border-color: rgba(255, 190, 90, 0.55);
  color: #ffcf7a;
}

.status-pill.rejected {
  border-color: rgba(217, 35, 50, 0.72);
  color: #ffb4bb;
}

.status-pill.system-team,
.status-pill.unclaimable-team,
.status-pill.free-agent-tag {
  padding: 4px 7px;
  font-size: 11px;
}

.status-pill.system-team {
  border-color: rgba(245, 197, 24, 0.5);
  background: rgba(245, 197, 24, 0.12);
  color: #ffe48a;
}

.status-pill.unclaimable-team,
.status-pill.free-agent-tag {
  border-color: rgba(72, 162, 255, 0.45);
  background: rgba(72, 162, 255, 0.12);
  color: #bcdcff;
}

.team-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.scout-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

button.scout-badge {
  cursor: pointer;
}

.scout-badge.unscouted {
  border-color: rgba(167, 173, 184, 0.55);
  background: rgba(255, 255, 255, 0.03);
  color: #d9dde5;
}

button.scout-badge.unscouted:hover {
  border-color: rgba(217, 35, 50, 0.75);
  background: rgba(217, 35, 50, 0.16);
  color: #fff;
}

.scout-badge.pending {
  border-color: rgba(255, 190, 90, 0.65);
  background: rgba(255, 190, 90, 0.1);
  color: #ffcf7a;
}

.scout-badge.approved {
  border-color: rgba(70, 194, 122, 0.55);
  background: rgba(70, 194, 122, 0.1);
  color: var(--green);
}

.scout-badge.rejected {
  border-color: rgba(217, 35, 50, 0.72);
  background: rgba(217, 35, 50, 0.11);
  color: #ffb4bb;
}

.scout-badge.no_quota {
  border-color: rgba(130, 136, 148, 0.5);
  background: rgba(130, 136, 148, 0.08);
  color: #9aa1ad;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
}

.modal-panel {
  width: min(860px, 100%);
  max-height: min(760px, 90vh);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  background:
    linear-gradient(180deg, var(--panel-highlight), rgba(255, 255, 255, 0.02)),
    rgba(14, 21, 32, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.advanced-search-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.modal-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 24px;
  color: var(--muted-strong);
  text-align: center;
}

.league-board-grid,
.league-leaderboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
  margin-bottom: 16px;
}

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

.league-admin-panel,
.league-standings-panel,
.league-summary-panel {
  margin-bottom: 16px;
}

.league-round-form {
  margin-bottom: 10px;
}

.league-draft-list {
  display: grid;
  gap: 14px;
}

.league-draft-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(7, 12, 22, 0.42);
}

.league-draft-card-head,
.league-draft-head,
.league-event-row,
.league-event-summary {
  display: grid;
  gap: 10px;
}

.league-draft-card-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 12px;
}

.league-draft-head {
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr) minmax(160px, 0.8fr) auto;
  align-items: end;
}

.league-event-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.league-event-row {
  grid-template-columns: 70px minmax(130px, 0.9fr) minmax(160px, 1.2fr) minmax(160px, 1.2fr) minmax(130px, 0.9fr) auto;
  align-items: end;
}

.league-event-row label,
.league-draft-head label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.league-team-select span,
.league-mvp-select span {
  color: var(--muted);
  font-size: 12px;
}

.league-score-line {
  display: grid;
  grid-template-columns: 54px auto 54px;
  align-items: center;
  gap: 8px;
  padding-bottom: 1px;
}

.league-score-line span {
  color: var(--muted-strong);
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

.league-score-line input {
  min-width: 0;
  text-align: center;
}

.league-event-row input,
.league-event-row select,
.league-draft-head input,
.league-draft-head select,
.league-round-form input {
  width: 100%;
}

.league-draft-actions,
.league-match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.league-event-details,
.league-match-event-details {
  margin-top: 10px;
}

.league-event-details summary,
.league-match-event-details summary {
  cursor: pointer;
  color: var(--muted-strong);
  font-weight: 700;
}

.league-event-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.league-summary-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.league-summary-item strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.league-summary-item small {
  display: block;
  margin-top: 6px;
  color: var(--gold);
  font-weight: 700;
}

.wide-summary-item {
  grid-column: 1 / -1;
}

.league-results-table {
  min-width: 860px;
}

.league-standings-table {
  min-width: 760px;
}

.league-leader-table {
  min-width: 460px;
}

.league-match-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.compact-match-title {
  justify-content: flex-start;
}

.compact-match-title strong {
  color: var(--gold);
  min-width: 54px;
  text-align: center;
}

.league-event-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.league-match-event-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.league-match-event-item {
  display: grid;
  grid-template-columns: 24px 20px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.045);
}

.league-event-order {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.league-event-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.league-event-main strong {
  color: var(--muted-strong);
}

.league-event-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted-strong);
  white-space: nowrap;
}

.league-ball-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  background: #eef3f9;
  color: #1c2734;
}

.league-ball-icon.penalty {
  background: var(--green);
  color: #052814;
}

.league-ball-icon.own {
  background: var(--red);
  color: #fff;
}

.league-ball-icon.miss {
  position: relative;
  background: var(--green);
  color: #052814;
}

.league-ball-icon.miss::after {
  content: "×";
  position: absolute;
  right: -5px;
  top: -6px;
  color: var(--red-bright);
  font-size: 18px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  body {
    background-attachment: scroll;
  }

  body::before {
    opacity: 0.5;
    position: absolute;
  }

  body::after {
    opacity: 0.28;
    position: absolute;
  }

  .app-header,
  .auth-grid,
  .admin-grid,
  .team-summary {
    grid-template-columns: 1fr;
  }

  .app-header {
    gap: 14px;
    padding: 14px 16px;
  }

  .platform-news-ticker {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .platform-news-source,
  .platform-news-time {
    display: none;
  }

  .platform-news-modal {
    padding: 72px 12px 20px;
  }

  .platform-news-panel {
    max-height: 82vh;
    padding: 14px;
  }

  .platform-news-panel-head,
  .platform-news-item-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .platform-news-panel-actions {
    width: 100%;
    justify-content: stretch;
  }

  .platform-news-panel-actions button {
    flex: 1;
  }

  .platform-news-item {
    grid-template-columns: 1fr;
  }

  .app-shell {
    width: min(100% - 24px, 1480px);
    margin: 20px auto 44px;
  }

  .panel,
  .admin-panel,
  .transfer-panel {
    padding: 16px;
    border-radius: 11px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-head h2 {
    font-size: 26px;
  }

  button,
  .button-link {
    min-height: 40px;
    padding: 10px 14px;
  }

  .admin-form,
  .admin-form.player-form,
  .admin-form.player-create-form,
  .admin-create-team-form,
  .bulk-import-form,
  .transfer-form,
  .database-toolbar,
  .advanced-search-form,
  .admin-auction-grid,
  .compact-admin-form,
  .auction-item-form,
  .league-reset-grid,
  .league-reset-form,
  .league-reset-feature-grid,
  .tactic-form,
  .tactic-current-grid,
  .league-board-grid,
  .league-leaderboard-grid,
  .league-draft-head,
  .league-event-row,
  .inline-controls {
    grid-template-columns: 1fr;
  }

  .admin-create-team-form .team-logo-preview-box {
    grid-row: auto;
  }

  .transfer-feed-related-item {
    grid-template-columns: 1fr;
  }

  .toolbar-actions,
  .modal-actions,
  .pagination-actions {
    justify-content: stretch;
    flex-direction: column;
    align-items: stretch;
  }

  .admin-pagination,
  .pagination-status {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-summary {
    white-space: normal;
  }

  .transfer-window-status {
    font-size: 20px;
  }

  .transfer-window-admin-panel {
    align-items: stretch;
    flex-direction: column;
  }

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

  .admin-table,
  .admin-player-table,
  .admin-team-table,
  .admin-ai-coach-table,
  .transfer-table,
  .transfer-review-table,
  .free-agent-auction-table,
  .team-tactic-review-table,
  .team-tactic-history-table,
  .default-tactics-table,
  .player-view-table {
    min-width: 920px;
  }

  .top-nav,
  .user-bar {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .top-nav,
  .mode-tabs,
  .admin-subnav,
  .team-subnav,
  .review-tabs,
  .badge-row {
    gap: 8px;
  }

  .nav-link,
  .mode-tab,
  .admin-subnav-button,
  .team-subnav-button,
  .review-tab {
    flex: 1 1 auto;
    min-width: 0;
  }

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

  .hero-panel {
    min-height: 260px;
  }

  .hero-panel h2 {
    font-size: 32px;
  }

  .summary-item {
    min-width: 0;
  }
}
