.tipster-wrapper--flexible .tipster-stats-row--flexible {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.tipster-card--flexible-charts {
  overflow: hidden;
}

.tipster-flex-charts-grid {
  align-items: stretch;
}

.tipster-flex-chart-container {
  min-width: 0;
}

.tipster-flex-chart {
  width: 100%;
  min-height: 240px;
}

.tipster-flex-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.tipster-flex-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tipster-flex-stat-card:hover {
  transform: translateY(-1px);
  border-color: rgba(203, 213, 225, 0.95);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.09);
}

.tipster-flex-stat-card-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #f1f5f9;
  color: #475569;
}

.tipster-flex-stat-card-icon svg {
  width: 28px;
  height: 28px;
}

.tipster-flex-stat-card-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tipster-flex-stat-card-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.tipster-flex-stat-card-value {
  color: #0f172a;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.tipster-flex-stat-card-subtext {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.3;
}

.tipster-wrapper--flexible [data-tipster-value-state="positive"] {
  color: #16a34a;
}

.tipster-wrapper--flexible [data-tipster-value-state="negative"] {
  color: #dc2626;
}

.tipster-wrapper--flexible [data-tipster-value-state="warning"] {
  color: #d97706;
}

.tipster-wrapper--flexible [data-tipster-value-state="info"] {
  color: #0369a1;
}

.tipster-flex-stat-card--wins .tipster-flex-stat-card-icon,
.tipster-flex-stat-card--hit-rate .tipster-flex-stat-card-icon {
  background: #dcfce7;
  color: #15803d;
}

.tipster-flex-stat-card--losses .tipster-flex-stat-card-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.tipster-flex-stat-card--pending .tipster-flex-stat-card-icon,
.tipster-flex-stat-card--roi .tipster-flex-stat-card-icon {
  background: #fef3c7;
  color: #b45309;
}

.tipster-flex-stat-card--total .tipster-flex-stat-card-icon,
.tipster-flex-stat-card--avg-odds .tipster-flex-stat-card-icon,
.tipster-flex-stat-card--total-returns .tipster-flex-stat-card-icon {
  background: #dbeafe;
  color: #1d4ed8;
}

.tipster-flex-stat-card--balance .tipster-flex-stat-card-icon {
  background: #ede9fe;
  color: #6d28d9;
}

.tipster-flex-recent-form {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 7px 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.8);
}

.tipster-flex-recent-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.tipster-flex-recent-icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.tipster-flex-recent-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.tipster-flex-recent-icon svg {
  width: 14px;
  height: 14px;
}

.tipster-flex-recent-icon--won svg {
  color: #15803d;
}

.tipster-flex-recent-icon--lost svg {
  color: #b91c1c;
}

.tipster-flex-recent-icon--pending svg {
  color: #d97706;
}

.tipster-flex-recent-summary,
.tipster-flex-recent-empty {
  grid-column: 1 / -1;
  color: #94a3b8;
  font-size: 11px;
}

.tipster-card--flexible-history {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tipster-wrapper--flexible .tipster-bets-list {
  scrollbar-width: thin;
  transition: opacity 0.18s ease, filter 0.18s ease;
}

.tipster-wrapper--flexible .tipster-bets-list.is-loading {
  filter: saturate(0.92);
  opacity: 0.58;
  pointer-events: none;
}

.tipster-wrapper--record-layout-compact .tipster-bet-card {
  grid-template-columns:
    minmax(270px, 48%)
    minmax(260px, 1fr)
    clamp(180px, 20%, 240px);
  column-gap: 14px;
}

.tipster-wrapper--record-layout-compact .tipster-bet-main,
.tipster-wrapper--record-layout-compact .tipster-bet-pick,
.tipster-wrapper--record-layout-compact .tipster-bet-status {
  min-width: 0;
}

.tipster-wrapper--record-layout-compact .tipster-bet-pick {
  align-self: center;
  justify-self: stretch;
}

.tipster-wrapper--record-layout-compact .tipster-bet-pick-text {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: normal;
}

.tipster-wrapper--record-layout-compact .tipster-bet-pick-text svg {
  flex: 0 0 auto;
  margin-right: 0;
}

.tipster-wrapper--record-layout-compact .tipster-bet-odds {
  align-items: center;
  min-width: 0;
}

.tipster-wrapper--record-layout-compact .tipster-pill-sm {
  min-width: 0;
}

.tipster-wrapper--record-layout-compact .tipster-bet-status {
  justify-self: end;
  width: 100%;
}

.tipster-wrapper--record-layout-compact .tipster-bet-score {
  max-width: 100%;
  text-align: right;
  overflow-wrap: anywhere;
}

.tipster-wrapper--record-layout-stacked .tipster-bet-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.tipster-wrapper--record-layout-stacked .tipster-bet-main,
.tipster-wrapper--record-layout-stacked .tipster-bet-pick,
.tipster-wrapper--record-layout-stacked .tipster-bet-status {
  width: 100%;
  min-width: 0;
}

.tipster-wrapper--record-layout-stacked .tipster-bet-main {
  gap: 5px;
}

.tipster-wrapper--record-layout-stacked .tipster-bet-competition-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.tipster-wrapper--flexible .tipster-flex-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tipster-wrapper--record-layout-stacked .tipster-bet-matchup,
.tipster-wrapper--record-layout-stacked .tipster-bet-pick-text,
.tipster-wrapper--record-layout-stacked .tipster-bet-score {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

.tipster-wrapper--record-layout-stacked .tipster-bet-pick {
  align-items: flex-start;
  gap: 6px;
}

.tipster-wrapper--record-layout-stacked .tipster-bet-pick-label {
  line-height: 1.2;
}

.tipster-wrapper--record-layout-stacked .tipster-bet-pick-text {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.45;
}

.tipster-wrapper--record-layout-stacked .tipster-bet-pick-text svg {
  flex: 0 0 auto;
  margin-top: 2px;
}

.tipster-wrapper--record-layout-stacked .tipster-bet-odds {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.tipster-wrapper--record-layout-stacked .tipster-pill-sm {
  width: fit-content;
  max-width: 100%;
}

.tipster-wrapper--record-layout-stacked .tipster-bet-status {
  align-items: flex-start;
  gap: 6px;
}

.tipster-wrapper--record-layout-stacked .tipster-status-badge {
  min-width: 0;
}

.tipster-flex-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: rgba(248, 250, 252, 0.9);
}

.tipster-flex-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}

.tipster-flex-field--search {
  flex: 1 1 240px;
}

.tipster-flex-field label {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #6b7280;
}

.tipster-flex-field input {
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  background: #ffffff;
  padding: 0 12px;
  font: inherit;
  color: #0f172a;
  outline: none;
}

.tipster-flex-field select {
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  background: #ffffff;
  padding: 0 36px 0 12px;
  font: inherit;
  color: #0f172a;
  outline: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 16px,
    calc(100% - 12px) 16px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.tipster-flex-field input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.tipster-flex-field select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.tipster-flex-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tipster-flex-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.18s ease;
}

.tipster-flex-btn--primary {
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.tipster-flex-btn--primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.tipster-flex-btn--secondary {
  border: 1px solid rgba(203, 213, 225, 0.95);
  background: #ffffff;
  color: #334155;
}

.tipster-flex-btn--secondary:hover {
  border-color: rgba(148, 163, 184, 0.95);
  color: #0f172a;
}

.tipster-bet-competition-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tipster-flex-sport-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  background: rgba(239, 246, 255, 0.95);
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.tipster-flex-bookmaker-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  background: rgba(255, 255, 255, 0.94);
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.tipster-pill--balance .tipster-pill-icon {
  background: #ede9fe;
  color: #6d28d9;
}

.tipster-pill--balance .tipster-pill-main-value {
  color: #6d28d9;
}

.tipster-pill--total-staked .tipster-pill-icon {
  background: #f1f5f9;
  color: #475569;
}

.tipster-pill--total-staked .tipster-pill-main-value {
  color: #334155;
}

.tipster-pill--total-returns .tipster-pill-icon {
  background: #dbeafe;
  color: #1d4ed8;
}

.tipster-pill--total-returns .tipster-pill-main-value {
  color: #1d4ed8;
}

.tipster-pill--avg-odds .tipster-pill-icon {
  background: #e0f2fe;
  color: #0369a1;
}

.tipster-pill--avg-odds .tipster-pill-main-value {
  color: #0369a1;
}

.tipster-pill--hit-rate .tipster-pill-icon {
  background: #dcfce7;
  color: #15803d;
}

.tipster-pill--hit-rate .tipster-pill-main-value {
  color: #15803d;
}

.tipster-pill--roi .tipster-pill-icon {
  background: #fef3c7;
  color: #b45309;
}

.tipster-pill--roi .tipster-pill-main-value {
  color: #b45309;
}

.tipster-flex-empty {
  border-radius: 16px;
  border: 1px dashed rgba(203, 213, 225, 0.95);
  background: rgba(248, 250, 252, 0.7);
  color: #64748b;
  text-align: center;
  padding: 24px 16px;
}

.tipster-wrapper--flexible .tipster-flex-load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.tipster-wrapper--flexible button.tipster-flex-load-more {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  margin: 0;
  padding: 0 14px;
  text-decoration: none;
  transition: transform 0.14s ease-out, box-shadow 0.14s ease-out,
    border-color 0.14s ease-out, background 0.14s ease-out;
}

.tipster-wrapper--flexible button.tipster-flex-load-more:hover {
  border-color: rgba(148, 163, 184, 0.95);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.tipster-wrapper--flexible button.tipster-flex-load-more:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.tipster-wrapper--flexible button.tipster-flex-load-more:disabled {
  cursor: default;
  opacity: 0.78;
  transform: none;
}

.tipster-wrapper--flexible button.tipster-flex-load-more.is-loading {
  color: #6b7280;
}

.tipster-wrapper--flexible button.tipster-flex-load-more.is-loading::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid rgba(148, 163, 184, 0.35);
  border-top-color: #2563eb;
  border-radius: 999px;
  animation: tipster-flex-spin 0.72s linear infinite;
}

.tipster-wrapper--flexible button.tipster-flex-load-more.has-error {
  border-color: rgba(239, 68, 68, 0.4);
}

.tipster-wrapper--flexible .tipster-bet-card--enter {
  animation: tipster-flex-card-enter 0.34s ease-out both;
}

@keyframes tipster-flex-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes tipster-flex-card-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tipster-wrapper--flexible .is-hidden {
  display: none;
}

@media (max-width: 900px) {
  .tipster-wrapper--record-layout-compact .tipster-bet-card {
    grid-template-columns:
      minmax(220px, 43%)
      minmax(220px, 1fr)
      clamp(150px, 19%, 180px);
    column-gap: 12px;
  }
}

@media (max-width: 720px) {
  .tipster-wrapper--record-layout-compact .tipster-bet-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .tipster-wrapper--record-layout-compact .tipster-bet-status {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .tipster-flex-filter-form {
    align-items: stretch;
  }

  .tipster-flex-field,
  .tipster-flex-field--search,
  .tipster-flex-actions,
  .tipster-flex-btn {
    width: 100%;
  }

  .tipster-flex-actions {
    flex-direction: column;
  }

  .tipster-flex-stat-cards {
    grid-template-columns: 1fr;
  }

  .tipster-flex-recent-form {
    grid-template-columns: 1fr;
  }

  .tipster-flex-recent-icons {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .tipster-wrapper--record-layout-compact .tipster-bet-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .tipster-wrapper--record-layout-compact .tipster-bet-status {
    flex-direction: column;
    align-items: flex-start;
  }

  .tipster-wrapper--record-layout-compact .tipster-bet-score {
    text-align: left;
  }
}
