.tl-promo-section,
.tl-promo-analytics-section {
  margin-top: 18px;
}

.tl-promo-card code {
  white-space: normal;
}

.tl-promo-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tl-promo-stats > div:last-child {
  border-right: 0;
}

.tl-promo-period {
  margin: 14px 0;
}

.tl-promo-analytics-section .analytics-heading {
  align-items: center;
}

.tl-promo-analytics-section select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--panel-2);
  color: var(--text);
}

.tl-promo-table-scroll {
  margin-top: 12px;
}

.tl-promo-table {
  min-width: 560px;
}

.tl-promo-table th,
.tl-promo-table td {
  padding-inline: 9px;
}

.tl-promo-table tbody td:first-child {
  position: static;
  left: auto;
  z-index: auto;
  width: 82px;
  min-width: 82px;
  background: inherit;
}

.tl-promo-table thead th:first-child {
  position: sticky;
  top: 0;
  left: auto;
  z-index: 4;
  width: 82px;
  min-width: 82px;
  background: var(--surface);
}

.tl-promo-form {
  display: grid;
  gap: 14px;
}

.tl-promo-form label {
  display: grid;
  gap: 7px;
}

.tl-promo-form label > span {
  font-weight: 700;
}

.tl-promo-form label small {
  color: var(--muted);
}

.tl-promo-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--panel-2);
  color: var(--text);
  outline: 0;
}

.tl-promo-form input:focus {
  border-color: var(--blue);
}

@media (max-width: 760px) {
  .tl-promo-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tl-promo-stats > div {
    border-right: 0;
  }

  .tl-promo-analytics-section .analytics-heading {
    align-items: stretch;
  }

  .tl-promo-analytics-section select {
    width: 100%;
  }

  .tl-promo-table {
    min-width: 500px;
    font-size: 10px;
  }

  .tl-promo-table th,
  .tl-promo-table td {
    height: 36px;
    padding-inline: 7px;
  }

  .tl-promo-table tbody td:first-child,
  .tl-promo-table thead th:first-child {
    width: 76px;
    min-width: 76px;
  }
}


.tl-promo-edit-note {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}

.tl-promo-edit-note strong {
  color: var(--text);
}

.tl-promo-edit-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

/* Subtle motion only: make interactions feel less abrupt without changing layout. */
.tl-promo-card,
.tl-promo-section button,
.tl-promo-analytics-section button,
.tl-promo-form input,
.tl-promo-form button {
  transition:
    transform 120ms ease,
    opacity 120ms ease,
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.tl-promo-section button:active,
.tl-promo-analytics-section button:active,
.tl-promo-form button:active {
  transform: scale(0.985);
}

@media (prefers-reduced-motion: reduce) {
  .tl-promo-card,
  .tl-promo-section button,
  .tl-promo-analytics-section button,
  .tl-promo-form input,
  .tl-promo-form button {
    transition: none;
  }
}
