:root {
  --bg: #f7f4ef;
  --panel: #ffffff;
  --ink: #16120f;
  --muted: #756b62;
  --line: #e9dfd4;
  --orange: #f16622;
  --orange2: #ff8a3d;
  --red: #d93b2b;
  --green: #168455;
  --blue: #3a5dff;
  --shadow: 0 20px 60px rgba(49, 31, 17, 0.12);
  --radius: 22px;
  --user1: #f16622;
  --user2: #101010;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(
    circle at top left,
    #fff 0,
    #fff2e7 34%,
    var(--bg) 62%
  );
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  color: var(--ink);
}
button,
input,
select {
  font: inherit;
}
button {
  border: 0;
  cursor: pointer;
}
.appShell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  background: #18120f;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--user1), var(--user2));
  box-shadow: 0 10px 30px rgba(241, 102, 34, 0.25);
}
.brand h1 {
  font-size: 17px;
  line-height: 1.1;
  margin: 0;
}
.brand p {
  font-size: 12px;
  color: #bfb4aa;
  margin: 4px 0 0;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav button {
  color: #d8d0c8;
  background: transparent;
  text-align: left;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav button.active,
.nav button:hover {
  background: #2a201b;
  color: #fff;
}
.sideCard {
  margin-top: auto;
  background: #231a16;
  border: 1px solid #403029;
  border-radius: 20px;
  padding: 16px;
}
.sideCard .big {
  font-size: 28px;
  font-weight: 800;
}
.sideCard p {
  color: #cbbfb5;
  font-size: 12px;
  line-height: 1.45;
}
.main {
  padding: 26px 30px 40px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  gap: 16px;
}
.topbar h2 {
  font-size: 30px;
  margin: 0;
  letter-spacing: -0.04em;
}
.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  background: var(--orange);
  color: white;
  border-radius: 14px;
  padding: 11px 14px;
  font-weight: 750;
  box-shadow: 0 10px 24px rgba(241, 102, 34, 0.18);
}
.btn.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn.dark {
  background: #1c1511;
}
.btn.danger {
  background: var(--red);
}
.btn.ghost {
  background: #fff4eb;
  color: #9a3d12;
}
.grid {
  display: grid;
  gap: 18px;
}
.grid.kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}
.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(233, 223, 212, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cardPad {
  padding: 18px;
}
.kpi {
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.kpi:after {
  content: "";
  position: absolute;
  right: -30px;
  top: -35px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(241, 102, 34, 0.12);
}
.kpi label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 800;
}
.kpi .value {
  font-size: 30px;
  font-weight: 900;
  margin-top: 6px;
  letter-spacing: -0.05em;
}
.kpi small {
  color: var(--muted);
}
.layout2 {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: 18px;
}
.layout3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}
.sectionTitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.sectionTitle h3 {
  margin: 0;
  font-size: 17px;
}
.sectionTitle span {
  font-size: 12px;
  color: var(--muted);
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #8a7f75;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0e8df;
  vertical-align: middle;
}
.playerName {
  font-weight: 850;
}
.muted {
  color: var(--muted);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  background: #f5eee7;
  color: #5f5147;
}
.pill.good {
  background: #e8f7ef;
  color: #116442;
}
.pill.warn {
  background: #fff1d9;
  color: #945604;
}
.pill.bad {
  background: #ffe9e5;
  color: #9b2419;
}
.bar {
  height: 10px;
  background: #efe6dc;
  border-radius: 999px;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--user1), var(--user2));
}
.setup {
  max-width: 1060px;
  margin: 26px auto;
  display: grid;
  grid-template-columns: 0.95fr 1.1fr;
  gap: 18px;
}
.hero {
  padding: 34px;
  background: linear-gradient(145deg, #1b120e, #3c2014);
  color: #fff;
  border-radius: 32px;
  box-shadow: var(--shadow);
  min-height: 670px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.hero:before {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  right: -80px;
  top: -90px;
  background: rgba(241, 102, 34, 0.22);
}
.hero h1 {
  font-size: 52px;
  line-height: 0.96;
  margin: 0;
  letter-spacing: -0.07em;
  position: relative;
}
.hero p {
  color: #e4d6cc;
  line-height: 1.55;
  position: relative;
}
.form {
  padding: 24px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
}
.field label {
  font-weight: 850;
  font-size: 13px;
}
.field input,
.field select {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px 13px;
  color: var(--ink);
  outline: none;
}
.field input:focus,
.field select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(241, 102, 34, 0.12);
}
.colorRow {
  display: flex;
  gap: 12px;
}
.colorRow input {
  height: 46px;
  padding: 4px;
}
.previewJersey {
  height: 210px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--user1), var(--user2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 950;
  font-size: 48px;
  letter-spacing: -0.06em;
  margin: 16px 0;
  box-shadow: inset 0 -30px 80px rgba(0, 0, 0, 0.2);
}
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.cityTile {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
}
.cityTile.selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(241, 102, 34, 0.12);
}
.cityTile strong {
  display: block;
}
.cityTile small {
  color: var(--muted);
}
.playerCard {
  padding: 15px;
  border-bottom: 1px solid #f0e8df;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.playerCard:hover {
  background: #fffaf6;
}
.scout {
  font-size: 13px;
  line-height: 1.4;
  color: #6d6259;
  margin-top: 8px;
}
.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 9px;
}
.tag {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f5eee7;
  color: #5e5148;
  font-weight: 800;
}
.splitControls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 0 0 14px;
}
.board {
  max-height: 660px;
  overflow: auto;
}
.filters {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.filters input,
.filters select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: white;
}
.tradeBox {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.tradePanel {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}
.tradeList {
  min-height: 320px;
  max-height: 430px;
  overflow: auto;
}
.checkRow {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 13px;
  border-bottom: 1px solid #f2e9e1;
}
.checkRow input {
  margin-top: 5px;
}
.meter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 9px 0;
}
.log {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.logItem {
  padding: 13px;
  border-radius: 16px;
  background: #fff8f2;
  border: 1px solid #f0e0d2;
}
.modalShade {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 6, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 24px;
}
.modal {
  width: min(720px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
}
.modalHeader {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modalHeader h3 {
  margin: 0;
}
.modalBody {
  padding: 20px 22px;
}
.close {
  background: #f4ece5;
  border-radius: 12px;
  padding: 8px 10px;
}
.ratingGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.locked {
  filter: blur(4px);
  user-select: none;
}
#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 50;
}
.toast {
  padding: 13px 16px;
  background: #18120f;
  color: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-width: 380px;
}
.empty {
  padding: 38px;
  text-align: center;
  color: var(--muted);
}
.portrait {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a201b, #4a352a);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(49, 31, 17, 0.18);
}
.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}
.portrait.lg {
  width: 140px;
  height: 140px;
  font-size: 38px;
  border-width: 3px;
}
.portrait.sm {
  width: 42px;
  height: 42px;
  font-size: 13px;
  border-width: 2px;
}
.playerCard {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}
.playerCard > .actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.teamBadge {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  margin-right: 8px;
}
.mini {
  font-size: 12px;
  color: var(--muted);
}
.impact {
  display: grid;
  gap: 10px;
}
.impactRow {
  display: grid;
  grid-template-columns: 90px 1fr 42px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
@media (max-width: 1050px) {
  .appShell {
    grid-template-columns: 1fr;
  }
  .side {
    height: auto;
    position: relative;
  }
  .nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .grid.kpis,
  .layout2,
  .layout3,
  .setup,
  .tradeBox {
    grid-template-columns: 1fr;
  }
  .sideCard {
    display: none;
  }
  .splitControls {
    grid-template-columns: 1fr;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 700px) {
  .main {
    padding: 16px;
  }
  .table {
    font-size: 13px;
  }
  .table th:nth-child(4),
  .table td:nth-child(4),
  .table th:nth-child(5),
  .table td:nth-child(5) {
    display: none;
  }
  .hero h1 {
    font-size: 40px;
  }
  .nav {
    grid-template-columns: 1fr 1fr;
  }
  .tiles {
    grid-template-columns: 1fr;
  }
}
.scheduleList {
  max-height: 720px;
  overflow: auto;
  border-top: 1px solid var(--line);
}
.gameRow {
  display: grid;
  grid-template-columns: 90px 1.4fr 56px 1.4fr 56px 110px;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #f0e8df;
  background: #fff;
}
.gameRow:nth-child(even) {
  background: #fffaf6;
}
.gameRow.userGame {
  box-shadow: inset 4px 0 0 var(--user1);
  background: #fff6ee;
}
.gameRow.played {
  opacity: 0.9;
}
.scoreCell {
  font-size: 22px;
  font-weight: 950;
  text-align: center;
  letter-spacing: -0.04em;
}
.highlightRow {
  background: #fff6ee;
}
.highlightRow td:first-child {
  box-shadow: inset 4px 0 0 var(--user1);
}
@media (max-width: 900px) {
  .gameRow {
    grid-template-columns: 70px 1fr 40px;
  }
  .gameRow > div:nth-child(4),
  .gameRow > div:nth-child(5),
  .gameRow > div:nth-child(6) {
    grid-column: auto;
  }
  .gameRow > div:nth-child(4) {
    grid-column: 2;
  }
  .gameRow > div:nth-child(5) {
    grid-column: 3;
  }
  .gameRow > div:nth-child(6) {
    grid-column: 1 / -1;
  }
}
