:root {
  --ink: #14231d;
  --ink-soft: #50615a;
  --paper: #f5f3ec;
  --card: #fffefa;
  --line: #dedfd7;
  --green: #0f6c49;
  --green-dark: #0a4a34;
  --green-pale: #e6f1eb;
  --lime: #c7e266;
  --red: #c74338;
  --red-pale: #f8e8e5;
  --amber: #d99a2b;
  --amber-pale: #f8eed8;
  --navy: #0d1a16;
  --shadow: 0 18px 50px rgba(27, 43, 35, 0.09);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
select {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(480px, 0.85fr);
}

.login-copy {
  position: relative;
  min-height: 100vh;
  padding: 52px 7vw;
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(8, 28, 22, 0.98) 0%, rgba(8, 28, 22, 0.86) 50%, rgba(8, 28, 22, 0.38) 100%),
    url("assets/stadium-bg.png") center / cover no-repeat;
}

.login-copy::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  left: -80px;
  bottom: -90px;
  border: 1px solid rgba(199, 226, 102, 0.22);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(199, 226, 102, 0.035), 0 0 0 90px rgba(199, 226, 102, 0.025);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  text-decoration: none;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.05;
}

.brand b {
  color: var(--green);
  font-size: 15px;
}

.brand-light {
  position: relative;
  z-index: 1;
  color: white;
}

.brand-light b {
  color: var(--lime);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: var(--lime);
  border-radius: 13px;
  transform: rotate(-4deg);
}

.brand-mark svg {
  width: 21px;
}

.login-intro {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin-top: 21vh;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.eyebrow.green {
  color: var(--green);
}

.login-intro h1 {
  max-width: 600px;
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(50px, 5.7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.login-intro > p:last-child {
  max-width: 500px;
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 17px;
  line-height: 1.65;
}

.login-stat {
  position: absolute;
  right: 7vw;
  bottom: 58px;
  z-index: 1;
  display: grid;
  padding-left: 24px;
  border-left: 2px solid var(--lime);
}

.login-stat span,
.login-stat small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.login-stat strong {
  margin: 5px 0;
  font-family: "Manrope", sans-serif;
  font-size: 27px;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 60px;
  background:
    linear-gradient(rgba(15, 108, 73, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 108, 73, 0.035) 1px, transparent 1px),
    #f4f1e8;
  background-size: 32px 32px;
}

.login-card {
  width: min(100%, 430px);
  padding: 46px;
  background: rgba(255, 254, 250, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.mobile-brand {
  display: none;
}

.login-card h2,
.modal h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.muted {
  color: var(--ink-soft);
}

.login-card form {
  margin-top: 34px;
}

.pin-field {
  margin-top: 16px;
}

.pin-field input {
  padding-left: 44px;
  font-family: "Manrope", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.42em;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none !important;
}

label {
  display: grid;
  gap: 9px;
  color: #30443b;
  font-size: 12px;
  font-weight: 700;
}

select,
input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  transition: 0.2s ease;
}

select:focus,
input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 108, 73, 0.1);
}

select {
  appearance: none;
}

.input-with-icon {
  position: relative;
}

.input-with-icon > svg:first-child {
  position: absolute;
  left: 15px;
  top: 50%;
  z-index: 1;
  width: 17px;
  color: var(--ink-soft);
  transform: translateY(-50%);
}

.input-with-icon select {
  padding-left: 44px;
  padding-right: 42px;
}

.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 17px;
  pointer-events: none;
  transform: translateY(-50%);
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: 0;
  border-radius: 11px;
  font-weight: 700;
  transition: 0.2s ease;
}

.button svg {
  width: 17px;
}

.button.primary {
  color: white;
  background: var(--green);
  box-shadow: 0 8px 20px rgba(15, 108, 73, 0.2);
}

.button.primary:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.button.secondary {
  color: var(--ink);
  background: #eeeee8;
}

.button.danger {
  color: var(--red);
  background: var(--red-pale);
}

.button.full {
  width: 100%;
  margin-top: 18px;
}

.login-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding-top: 22px;
  color: #7a8781;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.login-note svg {
  width: 15px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 246px 1fr;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 246px;
  display: flex;
  flex-direction: column;
  padding: 30px 22px 22px;
  background: #fbfaf5;
  border-right: 1px solid var(--line);
}

.sidebar .brand {
  padding: 2px 9px 32px;
}

.main-nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  color: #66756f;
  background: transparent;
  border: 0;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.nav-item svg {
  width: 19px;
}

.nav-item:hover {
  color: var(--green);
  background: var(--green-pale);
}

.nav-item.active {
  color: white;
  background: var(--green);
}

.nav-count {
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  margin-left: auto;
  color: var(--green);
  background: var(--lime);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
}

.sidebar-bottom {
  margin-top: auto;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 10px;
  background: #f1f0e9;
  border-radius: 13px;
}

.avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: block;
  overflow: hidden;
  background: #dfe5dd;
  border-radius: 50%;
  border: 2px solid rgba(15, 108, 73, 0.12);
}

.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 24%;
}

.avatar.gold {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(199, 226, 102, 0.2);
}

.sidebar-user strong {
  display: block;
  max-width: 130px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user small {
  color: var(--ink-soft);
}

.logout-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 10px;
  padding: 12px;
  color: #819089;
  background: none;
  border: 0;
  font-size: 12px;
}

.logout-button svg {
  width: 17px;
}

.mobile-header {
  display: none;
}

.main-content {
  grid-column: 2;
  min-width: 0;
  padding: 42px clamp(30px, 4vw, 70px) 80px;
}

.page {
  display: none;
  max-width: 1380px;
  margin: 0 auto;
  animation: pageIn 0.3s ease;
}

.page.active-page {
  display: block;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.page-header h1 {
  margin: 4px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.page-header p {
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 22px;
}

.hero-card {
  position: relative;
  min-height: 290px;
  padding: 34px;
  color: white;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(7, 37, 27, 0.96), rgba(7, 37, 27, 0.56)),
    url("assets/stadium-bg.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.hero-card::after {
  content: "26";
  position: absolute;
  right: 26px;
  bottom: -50px;
  color: rgba(255, 255, 255, 0.055);
  font-family: "Manrope", sans-serif;
  font-size: 210px;
  font-weight: 800;
  letter-spacing: -0.1em;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 550px;
}

.hero-card h2 {
  margin: 0 0 14px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(30px, 3vw, 45px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-card p {
  max-width: 480px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.6;
}

.hero-card .button {
  margin-top: 18px;
  color: var(--navy);
  background: var(--lime);
  box-shadow: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.stat-card,
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(27, 43, 35, 0.045);
}

.stat-card {
  min-height: 138px;
  padding: 22px;
}

.stat-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: var(--green);
  background: var(--green-pale);
  border-radius: 10px;
  line-height: 0;
}

.stat-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke-width: 2;
}

.stat-card > span:not(.stat-icon) {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 5px;
  font-family: "Manrope", sans-serif;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.dashboard-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 22px;
  margin-top: 22px;
}

.panel {
  min-width: 0;
  padding: 25px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-header h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 19px;
  letter-spacing: -0.025em;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  background: none;
  border: 0;
  font-size: 12px;
  font-weight: 700;
}

.text-button svg {
  width: 15px;
}

.coupon-list {
  display: grid;
  gap: 11px;
}

.coupon-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) minmax(150px, 1fr) 90px 110px auto;
  align-items: center;
  gap: 16px;
  padding: 15px 16px;
  background: #f8f7f1;
  border: 1px solid transparent;
  border-radius: 13px;
}

.coupon-row:hover {
  border-color: #d2d7d0;
}

.match-name strong,
.bet-name strong {
  display: block;
  font-size: 13px;
}

.match-name small,
.bet-name small {
  color: var(--ink-soft);
  font-size: 11px;
}

.amount-cell span {
  display: block;
  color: var(--ink-soft);
  font-size: 10px;
}

.amount-cell strong {
  font-size: 13px;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status.paid,
.status.won {
  color: var(--green);
  background: var(--green-pale);
}

.status.unpaid,
.status.lost {
  color: var(--red);
  background: var(--red-pale);
}

.status.pending {
  color: #a56c0d;
  background: var(--amber-pale);
}

.coupon-actions {
  display: flex;
  gap: 6px;
}

.mini-button {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-button svg {
  width: 15px;
}

.mini-button.win:hover {
  color: white;
  background: var(--green);
}

.mini-button.lose:hover {
  color: white;
  background: var(--red);
}

.mini-button.details:hover {
  color: white;
  background: #4467aa;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 30px;
  color: var(--ink-soft);
  text-align: center;
  border: 1px dashed #c9cec7;
  border-radius: 14px;
}

.empty-state svg {
  width: 32px;
  margin-bottom: 10px;
  color: var(--green);
}

.players-mini-list {
  display: grid;
  gap: 4px;
}

.player-mini {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 11px 8px;
  border-bottom: 1px solid #ecece6;
}

.player-mini:last-child {
  border: 0;
}

.player-mini strong {
  display: block;
  font-size: 12px;
}

.player-mini small {
  color: var(--ink-soft);
  font-size: 10px;
}

.player-mini .balance {
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.locked-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 18px 20px;
  color: #732c26;
  background: var(--red-pale);
  border: 1px solid #edc9c4;
  border-radius: 14px;
}

.locked-banner > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.locked-banner svg {
  flex: 0 0 auto;
  width: 21px;
}

.locked-banner strong {
  display: block;
  font-size: 13px;
}

.locked-banner span {
  font-size: 11px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.filters {
  display: flex;
  gap: 7px;
}

.filter-button {
  min-height: 36px;
  padding: 0 13px;
  color: var(--ink-soft);
  background: #eeeee8;
  border: 0;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
}

.filter-button.active {
  color: white;
  background: var(--green);
}

.coupons-table .coupon-row {
  grid-template-columns: 130px minmax(180px, 1.5fr) minmax(180px, 1fr) 90px 100px 100px auto;
}

.owner-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.owner-cell .avatar {
  width: 30px;
  height: 30px;
  font-size: 9px;
}

.owner-cell strong {
  font-size: 11px;
}

.ranking-hero {
  margin-bottom: 24px;
  padding: 34px 34px 0;
  overflow: hidden;
  color: white;
  background: var(--navy);
  border-radius: var(--radius);
}

.podium {
  min-height: 350px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.podium-place {
  width: min(29%, 240px);
  text-align: center;
}

.podium-person {
  margin-bottom: 18px;
}

.podium-person .avatar {
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
  border: 3px solid rgba(255, 255, 255, 0.18);
}

.podium-person strong {
  display: block;
  font-size: 13px;
}

.podium-person span {
  color: var(--lime);
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  font-weight: 800;
}

.podium-block {
  min-height: 100px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: #e8eadf;
  border-radius: 14px 14px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: 38px;
  font-weight: 800;
}

.place-1 .podium-block {
  min-height: 180px;
  background: var(--lime);
}

.place-2 .podium-block {
  min-height: 135px;
}

.place-3 .podium-block {
  min-height: 105px;
  background: #d9b789;
}

.ranking-list {
  display: grid;
  gap: 10px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 46px 1fr 130px 130px;
  align-items: center;
  gap: 15px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.ranking-position {
  color: var(--ink-soft);
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.ranking-player {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ranking-player strong {
  display: block;
  font-size: 13px;
}

.ranking-player small {
  color: var(--ink-soft);
}

.ranking-metric span {
  display: block;
  color: var(--ink-soft);
  font-size: 9px;
  text-transform: uppercase;
}

.ranking-metric strong {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
}

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

.player-card {
  padding: 23px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.player-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.player-card .avatar {
  width: 48px;
  height: 48px;
}

.player-card h3 {
  margin: 17px 0 2px;
  font-family: "Manrope", sans-serif;
  font-size: 18px;
}

.player-card .username {
  color: var(--ink-soft);
  font-size: 11px;
}

.player-card-balance {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.player-card-balance span {
  display: block;
  color: var(--ink-soft);
  font-size: 10px;
  text-transform: uppercase;
}

.player-card-balance strong {
  font-family: "Manrope", sans-serif;
  font-size: 25px;
}

.player-card-balance small {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
}

.paid-toggle {
  width: 100%;
  margin-top: 16px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 18, 14, 0.73);
  backdrop-filter: blur(6px);
}

.modal {
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 30px;
  background: var(--paper);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: #ebece5;
  border: 0;
  border-radius: 11px;
}

.icon-button svg {
  width: 19px;
}

.coupon-form {
  display: grid;
  gap: 22px;
}

.coupon-legs {
  display: grid;
  gap: 14px;
}

.coupon-leg {
  padding: 18px;
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.coupon-leg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--green);
  font-family: "Manrope", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.leg-remove {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  color: var(--red);
  background: var(--red-pale);
  border: 0;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 700;
}

.leg-remove svg {
  width: 13px;
}

.leg-type-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 12px;
  margin-top: 13px;
}

.add-leg-button {
  width: 100%;
  border: 1px dashed #b9c5bd;
}

.form-section {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding-top: 4px;
}

.form-section-number {
  color: var(--green);
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.form-section h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
}

.form-section p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.match-picker {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 12px;
}

.versus {
  display: grid;
  place-items: center;
  width: 38px;
  height: 48px;
  color: var(--green);
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.category-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.category-tab {
  min-height: 36px;
  flex: 0 0 auto;
  padding: 0 13px;
  color: var(--ink-soft);
  background: #e7e8e1;
  border: 0;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
}

.category-tab.active {
  color: white;
  background: var(--green);
}

.market-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.market-option {
  min-height: 43px;
  padding: 8px 12px;
  color: #42554c;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

.market-option.selected {
  color: var(--green);
  background: var(--green-pale);
  border-color: var(--green);
}

.custom-bet {
  padding: 15px;
  background: var(--green-pale);
  border-radius: 12px;
}

.money-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  align-items: end;
  gap: 12px;
}

.tax-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 17px;
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.check-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 11px;
  cursor: pointer;
}

.check-row > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.check-box {
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  color: transparent;
  background: white;
  border: 1px solid #b9c5bd;
  border-radius: 7px;
}

.check-box svg {
  width: 15px;
}

.check-row > input:checked + .check-box {
  color: white;
  background: var(--green);
  border-color: var(--green);
}

.check-row strong,
.check-row small {
  display: block;
}

.check-row small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-weight: 500;
}

.tax-percent {
  width: 150px;
}

.input-suffix {
  position: relative;
}

.input-suffix input {
  padding-right: 40px;
}

.input-suffix span {
  position: absolute;
  right: 14px;
  top: 50%;
  color: var(--ink-soft);
  font-size: 12px;
  transform: translateY(-50%);
}

.possible-win {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 16px;
  color: white;
  background: var(--green-dark);
  border-radius: 11px;
}

.possible-win span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
}

.possible-win strong {
  margin-top: 3px;
  font-family: "Manrope", sans-serif;
  font-size: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.details-modal {
  width: min(720px, 100%);
}

.details-owner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.details-owner strong,
.details-owner small {
  display: block;
}

.details-owner small {
  color: var(--ink-soft);
}

.details-legs {
  display: grid;
  gap: 9px;
  max-height: 48vh;
  overflow-y: auto;
  padding-right: 5px;
}

.details-legs article {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 11px;
  padding: 13px;
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.details-legs article > span {
  color: var(--green);
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.details-legs strong,
.details-legs small {
  display: block;
}

.details-legs strong {
  font-size: 13px;
}

.details-legs small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 11px;
}

.details-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.details-summary div {
  padding: 13px;
  background: var(--green-pale);
  border-radius: 10px;
}

.details-summary span,
.details-summary strong {
  display: block;
}

.details-summary span {
  color: var(--ink-soft);
  font-size: 9px;
  text-transform: uppercase;
}

.details-summary strong {
  margin-top: 3px;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
}

.chart-select {
  width: 220px;
}

.chart-panel {
  overflow: hidden;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 16px;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.chart-scroll {
  width: 100%;
  overflow-x: auto;
}

.line-chart {
  width: 100%;
  min-width: 720px;
  display: block;
}

.chart-grid-line {
  stroke: #dfe3dc;
  stroke-width: 1;
}

.chart-grid-line-reference {
  stroke: #0f6c49;
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
  opacity: 0.6;
}

.chart-axis-text {
  fill: #7b8983;
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
}

.chart-axis-reference {
  fill: #0f6c49;
  font-weight: 800;
}

.statistics-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.stat-summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.stat-summary strong,
.stat-summary span {
  display: block;
}

.stat-summary span {
  color: var(--ink-soft);
  font-size: 10px;
}

.stat-summary b {
  color: var(--green);
  font-size: 11px;
}

.toast-container {
  position: fixed;
  right: 24px;
  top: 24px;
  z-index: 200;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 280px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  color: white;
  background: var(--navy);
  border-left: 3px solid var(--lime);
  border-radius: 11px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  animation: toastIn 0.25s ease;
  font-size: 12px;
  font-weight: 600;
}

.toast.error {
  border-color: #ef6b5f;
}

.toast svg {
  width: 18px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1120px) {
  .dashboard-grid,
  .dashboard-bottom {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .players-grid {
    grid-template-columns: repeat(2, minmax(250px, 1fr));
  }

  .statistics-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .coupons-table .coupon-row {
    grid-template-columns: 110px minmax(150px, 1.2fr) minmax(150px, 1fr) 90px 90px auto;
  }

  .coupons-table .coupon-row .amount-cell:nth-of-type(2) {
    display: none;
  }
}

@media (max-width: 820px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-copy {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 24px;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 50px;
    font-family: "Manrope", sans-serif;
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-brand .brand-mark {
    width: 36px;
    height: 36px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .sidebar.open {
    box-shadow: 30px 0 80px rgba(0, 0, 0, 0.25);
    transform: none;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(245, 243, 236, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
  }

  .mobile-logo {
    font-family: "Manrope", sans-serif;
    font-weight: 800;
  }

  .mobile-logo span {
    color: var(--green);
  }

  .icon-button.accent {
    color: white;
    background: var(--green);
  }

  .main-content {
    padding: 26px 18px 70px;
  }

  .page-header {
    align-items: flex-start;
  }

  .page-header .button {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .coupon-row,
  .coupons-table .coupon-row {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .coupon-row > * {
    display: block !important;
  }

  .coupon-row .bet-name,
  .coupon-row .owner-cell {
    grid-column: 1;
  }

  .coupon-row .status,
  .coupon-row .coupon-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .coupon-row .coupon-actions {
    grid-row: 2;
  }

  .coupon-row .amount-cell {
    display: inline-block !important;
    margin-right: 18px;
  }

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

  .statistics-cards {
    grid-template-columns: 1fr;
  }

  .ranking-row {
    grid-template-columns: 36px 1fr auto;
  }

  .ranking-row .ranking-metric:last-child {
    display: none;
  }
}

@media (max-width: 600px) {
  .login-card {
    padding: 32px 24px;
  }

  .page-header h1 {
    font-size: 34px;
  }

  .hero-card {
    min-height: 320px;
    padding: 27px;
  }

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

  .stat-card {
    min-height: 125px;
    padding: 17px;
  }

  .stat-card strong {
    font-size: 20px;
  }

  .panel {
    padding: 18px;
  }

  .locked-banner {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .filters {
    width: 100%;
    overflow-x: auto;
  }

  .podium {
    min-height: 290px;
  }

  .podium-place {
    width: 32%;
  }

  .podium-person strong {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .podium-person span {
    font-size: 13px;
  }

  .place-1 .podium-block {
    min-height: 145px;
  }

  .place-2 .podium-block {
    min-height: 105px;
  }

  .place-3 .podium-block {
    min-height: 80px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    max-height: 94vh;
    padding: 24px 18px;
    border-radius: 22px 22px 0 0;
  }

  .match-picker,
  .money-grid,
  .leg-type-grid {
    grid-template-columns: 1fr;
  }

  .tax-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .tax-percent {
    width: 100%;
  }

  .details-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .versus {
    width: 100%;
    height: 18px;
  }

  .market-options {
    grid-template-columns: repeat(2, 1fr);
  }
}
