.adm-tn {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, sans-serif;
  background: transparent;
  color: #0f172a;
}
.adm-tn-spa-host {
  z-index: 40;
  background: #f4f6f9;
  overflow: auto;
  box-shadow: none;
  border-left: 1px solid #e2e8f0;
  transition: opacity .12s ease;
}
.adm-tn-spa-host.is-ready {
  visibility: visible !important;
  opacity: 1 !important;
}
body.adm-tn-open {
  overflow: hidden;
}
.adm-tn-spa .adm-tn-top {
  border-radius: 0;
}
.adm-tn-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.adm-tn-back {
  color: var(--brand, #009436);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
  margin-top: 6px;
}
.adm-tn-top-main { flex: 1; min-width: 0; }
.adm-tn-top-main h1 { margin: 0; font-size: 1.5rem; font-weight: 700; }
.adm-tn-top-main p { margin: 4px 0 0; color: #64748b; font-size: .9rem; }
.adm-tn-main { padding: 20px 24px 48px; max-width: 1200px; margin: 0 auto; }
.adm-tn-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.adm-tn-chip {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  color: #475569;
}
.adm-tn-chip.is-active {
  background: var(--brand, #009436);
  border-color: var(--brand, #009436);
  color: #fff;
}
.adm-tn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.adm-tn-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  display: flex;
  flex-direction: column;
}
.adm-tn-card-banner {
  height: 110px;
  background: linear-gradient(135deg, var(--brand, #009436), #065f2e);
  background-size: cover;
  background-position: center;
  position: relative;
}
.adm-tn-card-banner .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,255,255,.92);
  color: #0f172a;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 8px;
  border-radius: 999px;
}
.adm-tn-card-banner .badge.ativo { color: #047857; }
.adm-tn-card-banner .badge.pausado { color: #b45309; }
.adm-tn-card-banner .badge.encerrado { color: #64748b; }
.adm-tn-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.adm-tn-card-body h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.adm-tn-prize { color: var(--brand, #009436); font-weight: 800; font-size: 1.15rem; }
.adm-tn-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: .8rem; color: #64748b; }
.adm-tn-rank-mini { border-top: 1px solid #f1f5f9; padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.adm-tn-rank-mini .row { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; }
.adm-tn-rank-mini .row span:last-child { font-weight: 700; color: #0f172a; }
.adm-tn-card-actions { display: flex; gap: 8px; margin-top: auto; }
.adm-tn-btn {
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: .85rem;
  font-weight: 650;
  cursor: pointer;
}
.adm-tn-btn.primary {
  background: var(--brand, #009436);
  border-color: var(--brand, #009436);
  color: #fff;
}
.adm-tn-btn:disabled { opacity: .55; cursor: not-allowed; }
.adm-tn-btn.sm { padding: 6px 10px; font-size: .8rem; }
.adm-tn-muted { color: #64748b; font-size: .9rem; }
.adm-tn-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  background: #fff;
  border-radius: 16px;
  border: 1px dashed #cbd5e1;
}

.adm-tn-drawer {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .4);
  z-index: 40;
  display: flex;
  justify-content: flex-end;
}
.adm-tn-drawer[hidden] { display: none !important; }
.adm-tn-drawer-inner {
  width: min(480px, 100%);
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(15,23,42,.12);
}
.adm-tn-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e2e8f0;
}
.adm-tn-drawer-head h2 { margin: 0; font-size: 1.1rem; }
.adm-tn-drawer-body { padding: 16px 18px 32px; overflow: auto; flex: 1; }
.adm-tn-icon-btn {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  padding: 4px 8px;
}
.adm-tn-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.adm-tn-table th, .adm-tn-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.adm-tn-table th { color: #64748b; font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
.adm-tn-table input[type="number"] {
  width: 88px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: .85rem;
}
.adm-tn-status-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }

.adm-tn-modal {
  border: none;
  border-radius: 16px;
  padding: 0;
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  box-shadow: 0 20px 50px rgba(15,23,42,.25);
}
.adm-tn-modal::backdrop { background: rgba(15, 23, 42, .45); }
.adm-tn-form { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.adm-tn-form > header,
.adm-tn-form > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
}
.adm-tn-form > footer { border-bottom: 0; border-top: 1px solid #e2e8f0; justify-content: flex-end; }
.adm-tn-form > header h2 { margin: 0; font-size: 1.1rem; }
.adm-tn-form-body {
  padding: 16px 18px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.adm-tn-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: #475569;
}
.adm-tn-form input,
.adm-tn-form textarea,
.adm-tn-form select {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  font-weight: 500;
  color: #0f172a;
  background: #fff;
}
.adm-tn-form textarea { resize: vertical; }
.adm-tn-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.adm-tn-providers {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  margin: 0;
}
.adm-tn-providers legend { padding: 0 6px; font-size: .8rem; font-weight: 700; color: #475569; }
.adm-tn-providers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px 10px;
  max-height: 180px;
  overflow: auto;
}
.adm-tn-providers-grid label {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
}
.adm-tn-providers-grid input[type="checkbox"] {
  width: auto;
  padding: 0;
  margin: 0;
  accent-color: var(--brand, #009436);
}
.adm-tn-tipo-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: #e2e8f0;
  color: #475569;
  vertical-align: middle;
}
.adm-tn-tipo-badge.slots { background: #dbeafe; color: #1d4ed8; }
.adm-tn-tipo-badge.esportes { background: #dcfce7; color: #15803d; }
.adm-tn-premios {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  margin: 0;
}
.adm-tn-premios legend { padding: 0 6px; font-size: .8rem; font-weight: 700; color: #475569; }
.adm-tn-premios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.adm-tn-form-msg { margin: 0; font-size: .85rem; color: #b91c1c; }
.adm-tn-form-msg.ok { color: #047857; }
.adm-tn-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}
.adm-tn-upload-label {
  font-size: .8rem;
  font-weight: 600;
  color: #475569;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.adm-tn-upload-label input[type="file"] {
  font-size: .8rem;
  font-weight: 500;
}
.adm-tn-upload-preview {
  display: flex;
  align-items: center;
  gap: 10px;
}
.adm-tn-upload-preview img {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
}
.adm-tn-upload-preview span {
  font-size: .78rem;
  color: #64748b;
  word-break: break-all;
}

@media (max-width: 640px) {
  .adm-tn-top { flex-wrap: wrap; }
  .adm-tn-top .adm-tn-btn { width: 100%; }
}
