@font-face {
  font-family: Manrope;
  src: url("/cms-assets/manrope-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url("/cms-assets/manrope-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --kiss-font-family: Manrope, sans-serif;
  --kiss-color-primary: #3ff0c6;
  --kiss-color-primary-contrast: #0f1020;
}

@view-transition {
  navigation: none;
}

body,
input,
select,
textarea,
button {
  font-family: Manrope, sans-serif;
}

.tm-preview-note {
  padding: 12px 20px;
  margin: 0 auto 24px;
  max-width: 1100px;
  border: 1px solid #8535f250;
  border-radius: 8px;
  color: #aeb2c4;
  background: #181927;
  font-size: 12px;
  line-height: 1.7;
}

.tm-preview-note strong {
  color: #3ff0c6;
}

.tm-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: 24px;
  max-width: 1008px;
  min-height: calc(100svh - 140px);
  margin: 0 auto;
  padding: 40px 24px;
}

.tm-create-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  min-height: 180px;
  padding: 32px;
  border: 1px solid #87889040;
  border-radius: 12px;
  color: #f5f7fa;
  background: #181927;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition:
    border-color 180ms ease,
    background-color 180ms ease;
}

.tm-create-card:hover {
  border-color: #3ff0c6;
  color: #f5f7fa;
  background: #202233;
  text-decoration: none;
}

.tm-create-card:focus-visible {
  outline: 2px solid #3ff0c6;
  outline-offset: 5px;
}

.tm-create-card-plus {
  color: #3ff0c6;
  font-size: 36px;
  font-weight: 400;
  line-height: 1;
}

@media (max-width: 640px) {
  .tm-dashboard {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 20px;
  }

  .tm-create-card {
    min-height: 116px;
    padding: 24px;
    gap: 12px;
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tm-create-card {
    transition: none;
  }
}

.kiss-button-primary {
  color: #0f1020;
}

[field="wysiwyg"] > kiss-card > .kiss-flex:first-child {
  flex-wrap: wrap;
  row-gap: 8px;
}

.app-layout-body .app-container-aside,
app-header a[href="#app-offcanvas"] {
  display: none;
}

.app-layout-body .app-container > main {
  min-width: 0;
}

.app-layout-body app-actionbar {
  padding-inline: 0;
}

.app-layout-body app-header {
  padding: 16px 0 0;
  background: #0f111bf2;
}

app-header > kiss-container {
  flex-wrap: wrap;
  row-gap: 16px;
}

.tm-admin-nav {
  order: 10;
  display: flex;
  flex: 0 0 100%;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  padding: 8px 0;
  border-top: 1px solid #87889025;
}

.tm-admin-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 6px;
  color: #aeb2c4;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.tm-admin-nav a:hover,
.tm-admin-nav a[aria-current="page"] {
  color: #3ff0c6;
  background: #3ff0c610;
}

.tm-admin-nav a:focus-visible,
.tm-winner-tabs a:focus-visible,
.tm-text-link:focus-visible,
.tm-external-link:focus-visible {
  outline: 2px solid #3ff0c6;
  outline-offset: 3px;
}

.tm-management-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 30px 60px;
}

.tm-page-heading,
.tm-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.tm-page-heading h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.25;
}

.tm-count {
  display: block;
  margin-top: 8px;
  color: #aeb2c4;
  font-size: 13px;
}

.tm-winner-tabs {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  border-bottom: 1px solid #87889030;
}

.tm-winner-tabs a {
  padding: 14px 4px;
  border-bottom: 3px solid transparent;
  color: #aeb2c4;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.tm-winner-tabs a:hover,
.tm-winner-tabs a[aria-current="page"] {
  border-bottom-color: #3ff0c6;
  color: #3ff0c6;
}

.tm-list-filters {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0;
}

.tm-filter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #aeb2c4;
  font-size: 13px;
}

.tm-search-field {
  flex: 1;
  min-width: 180px;
}

.tm-list-filters input,
.tm-list-filters select,
.tm-list-filters button {
  min-height: 46px;
}

.tm-list-filters select {
  min-width: 160px;
  color-scheme: dark;
}

.tm-list-section {
  margin-top: 24px;
  border: 1px solid #87889030;
  border-radius: 12px;
  background: #18192780;
  overflow: hidden;
}

.tm-section-heading {
  padding: 24px;
}

.tm-section-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}

.tm-table-scroll {
  overflow-x: auto;
}

.tm-entry-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 14px;
}

.tm-entry-table th,
.tm-entry-table td {
  padding: 16px 20px;
  border-top: 1px solid #87889025;
  text-align: start;
  vertical-align: middle;
}

.tm-entry-table thead th {
  color: #aeb2c4;
  font-size: 12px;
  font-weight: 600;
}

.tm-entry-table th[scope="row"] {
  font-weight: 600;
  color: #f5f7fa;
}

.tm-entry-table tbody tr:hover {
  background: #87889008;
}

.tm-entry-title {
  display: block;
  min-width: 180px;
  max-width: 480px;
  overflow-wrap: anywhere;
}

.tm-entry-detail {
  display: block;
  margin-top: 6px;
  color: #aeb2c4;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.tm-instagram-caption {
  white-space: pre-wrap;
}

.tm-entry-cover {
  display: block;
  width: 64px;
  height: 96px;
  border-radius: 5px;
  object-fit: cover;
}

.tm-cover-cell {
  width: 96px;
}

.tm-no-cover,
.tm-empty-list {
  color: #aeb2c4;
}

.tm-empty-list {
  margin: 0;
  padding: 32px 24px;
}

.tm-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.tm-status-published {
  color: #3ff0c6;
  background: #3ff0c615;
}

.tm-status-draft {
  color: #edd450;
  background: #edd45015;
}

.tm-status-archived {
  color: #aeb2c4;
  background: #87889020;
}

.tm-text-link {
  color: #3ff0c6;
  font-weight: 600;
}

.tm-row-actions {
  width: 190px;
  position: sticky;
  right: 0;
  background: #181927;
  white-space: nowrap;
}

.tm-row-primary-actions,
.tm-reorder-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tm-reorder-controls {
  gap: 4px;
  margin: 0;
}

.tm-reorder-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #87889050;
  border-radius: 5px;
  color: #3ff0c6;
  background: #181927;
  font-size: 20px;
  cursor: pointer;
}

.tm-reorder-button:hover:not(:disabled) {
  border-color: #3ff0c6;
  background: #3ff0c610;
}

.tm-reorder-button:focus-visible {
  outline: 2px solid #3ff0c6;
  outline-offset: 3px;
}

.tm-reorder-button:disabled {
  opacity: 0.3;
  cursor: default;
}

.tm-order-status,
.tm-order-hint {
  color: #aeb2c4;
  font-size: 13px;
}

.tm-order-status:empty {
  margin: 0;
}

.tm-order-status[data-error="true"] {
  color: #ea4343;
}

.tm-external-link {
  display: block;
  margin-top: 10px;
  color: #aeb2c4;
  font-size: 12px;
}

@media (max-width: 640px) {
  .tm-reorder-button {
    width: 44px;
    height: 44px;
  }
  .tm-admin-nav a {
    padding: 8px 11px;
  }

  .tm-management-page {
    padding: 28px 20px 48px;
  }

  .tm-section-heading {
    padding: 20px;
  }

  .tm-section-heading .kiss-button,
  .tm-page-heading .kiss-button {
    width: 100%;
  }

  .tm-list-filters {
    align-items: stretch;
  }

  .tm-list-filters .tm-search-field {
    flex-basis: 100%;
  }

  .tm-list-filters .tm-filter-field:not(.tm-search-field) {
    flex: 1;
  }

  .tm-list-filters button {
    align-self: flex-end;
  }

  .tm-entry-table {
    display: block;
    min-width: 0;
  }

  .tm-entry-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .tm-entry-table tbody {
    display: block;
  }

  .tm-entry-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 20px;
    border-top: 1px solid #87889025;
  }

  .tm-entry-table tbody th,
  .tm-entry-table tbody td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .tm-entry-table th[scope="row"],
  .tm-entry-table .tm-cover-cell,
  .tm-entry-table .tm-row-actions {
    grid-column: 1 / -1;
    width: auto;
  }

  .tm-entry-table td[data-label]::before {
    display: block;
    margin-bottom: 6px;
    color: #aeb2c4;
    font-size: 12px;
    content: attr(data-label);
  }

  .tm-entry-title {
    min-width: 0;
  }

  .tm-entry-table .tm-row-actions {
    position: static;
    white-space: normal;
  }

  .tm-row-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .tm-row-actions .tm-external-link {
    margin: 8px 0 0;
  }
}

.tm-team-form {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) auto auto;
  gap: 16px;
  align-items: end;
  padding: 20px;
  background: #181927;
  border-radius: 12px;
}
.tm-team-form label {
  display: grid;
  gap: 8px;
}

.tm-shared-image-form {
  padding: 24px;
  border: 1px solid #87889040;
  border-radius: 12px;
  background: #181927;
}
.tm-shared-image-form label,
.tm-shared-image label {
  display: grid;
  gap: 8px;
}
.tm-shared-image-list {
  display: grid;
  gap: 20px;
}
.tm-shared-image {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
  border: 1px solid #87889030;
  border-radius: 12px;
}
.tm-shared-image img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: 8px;
  background: #181927;
}
.tm-shared-image h2 {
  margin: 0 0 16px;
  font-size: 18px;
  overflow-wrap: anywhere;
}
@media (max-width: 680px) {
  .tm-team-form {
    grid-template-columns: 1fr;
  }
  .tm-shared-image {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tm-reward-editor {
  max-width: 800px;
}
.tm-reward-form {
  display: grid;
  gap: 24px;
}
.tm-reward-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.tm-reward-field > label,
.tm-reward-field details label {
  display: block;
  font-weight: 600;
}
.tm-reward-field small {
  color: var(--kiss-color-muted, #878890);
}
.tm-reward-field details summary {
  cursor: pointer;
  margin-bottom: 8px;
}
.tm-reward-preview img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
}
.tm-reward-preview img[hidden],
.tm-entry-cover[hidden] {
  display: none;
}
.tm-reward-error {
  color: #ea4343;
}
