.tg-tmc-shell { max-width: 960px; }

.tg-page-backbar {
  align-items: center;
  display: flex;
  gap: 10px;
  margin: 0 0 12px;
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 8px 0;
  background: linear-gradient(180deg, rgba(11, 18, 32, .97) 70%, rgba(11, 18, 32, 0));
}

.tg-page-backbar .tg-btn-back,
.tg-tmc-top-actions .tg-btn-back {
  background: rgba(201, 162, 39, .16);
  border-color: rgba(201, 162, 39, .55);
  color: #f4d58d;
  font-weight: 800;
}

.tg-tmc-top-actions {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  grid-template-columns: none !important;
  width: auto !important;
}

.tg-tmc-top-actions > .tg-btn {
  width: auto !important;
  min-width: 140px;
}

.tg-tmc-portal-wrap {
  padding: 28px 0 48px;
}

.tg-tmc-portal-wrap .container {
  max-width: 960px;
}

.tg-tmc-portal-wrap .tg-tmc-shell {
  max-width: none;
  padding: 0;
}

.tg-tmc-page-head {
  margin-bottom: 0;
}

.tg-tmc-page-head h1 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

.tg-tmc-page-head .tg-sub a {
  color: #93c5fd;
}

.tg-tmc-hero {
  background: linear-gradient(135deg, rgba(34, 197, 94, .08), rgba(37, 99, 235, .06));
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 18px;
  padding: 22px 24px;
}

.tg-tmc-hero h2 {
  font-size: 1.35rem;
  margin: 0 0 8px;
}

.tg-tmc-hero .tg-tmc-author {
  color: #86efac;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
}

.tg-tmc-formula {
  background: rgba(15, 23, 42, .7);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #e2e8f0;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 14px;
  margin: 14px 0;
  padding: 12px 14px;
}

.tg-tmc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.tg-tmc-nav button {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
}

.tg-tmc-nav button.active {
  background: rgba(34, 197, 94, .14);
  border-color: rgba(34, 197, 94, .45);
  color: #86efac;
}

.tg-tmc-panel { display: none; }
.tg-tmc-panel.active { display: block; }

.tg-tmc-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 14px;
  padding: 18px 20px;
}

.tg-tmc-card h3 {
  font-size: 17px;
  margin: 0 0 10px;
}

.tg-tmc-card p,
.tg-tmc-card li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.tg-tmc-card ul,
.tg-tmc-card ol {
  margin: 8px 0 0;
  padding-left: 1.2rem;
}

.tg-tmc-steps {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.tg-tmc-steps li {
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.tg-tmc-steps strong {
  color: #93c5fd;
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.tg-tmc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.tg-tmc-legend span {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
}

.tg-tmc-legend .alta { background: rgba(34, 197, 94, .18); color: #86efac; }
.tg-tmc-legend .baixa { background: rgba(239, 68, 68, .18); color: #fca5a5; }
.tg-tmc-legend .trans { background: rgba(245, 158, 11, .14); color: #fcd34d; }

.tg-tmc-modules {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.tg-tmc-modules li {
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  padding: 10px 12px;
}

.tg-tmc-modules small {
  color: #64748b;
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

.tg-tmc-buy {
  background: linear-gradient(160deg, rgba(34, 197, 94, .12), rgba(15, 23, 42, .9));
  border: 1px solid rgba(34, 197, 94, .35);
  border-radius: 16px;
  padding: 22px 24px;
}

.tg-tmc-price {
  color: #86efac;
  font-size: 2rem;
  font-weight: 800;
  margin: 8px 0 14px;
}

.tg-tmc-pix-box {
  background: #0f172a;
  border: 1px dashed rgba(148, 163, 184, .35);
  border-radius: 12px;
  margin: 14px 0;
  padding: 14px 16px;
}

.tg-tmc-pix-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tg-tmc-pix-row:last-child { margin-bottom: 0; }

.tg-tmc-pix-row code {
  background: rgba(255, 255, 255, .05);
  border-radius: 6px;
  font-size: 15px;
  padding: 6px 10px;
}

.tg-tmc-copy {
  background: rgba(37, 99, 235, .2);
  border: 1px solid rgba(59, 130, 246, .4);
  border-radius: 8px;
  color: #bfdbfe;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}

.tg-tmc-copy.ok {
  background: rgba(34, 197, 94, .18);
  border-color: rgba(34, 197, 94, .4);
  color: #86efac;
}

.tg-tmc-buy-steps {
  counter-reset: tmcstep;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.tg-tmc-buy-steps li {
  counter-increment: tmcstep;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 10px;
  padding-left: 2rem;
  position: relative;
}

.tg-tmc-buy-steps li::before {
  background: rgba(34, 197, 94, .2);
  border-radius: 999px;
  color: #86efac;
  content: counter(tmcstep);
  font-size: 12px;
  font-weight: 800;
  height: 22px;
  left: 0;
  line-height: 22px;
  position: absolute;
  text-align: center;
  top: 0;
  width: 22px;
}

.tg-tmc-disclaimer {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 14px;
}

.tg-tmc-mail {
  display: inline-block;
  margin-top: 10px;
}

.tg-tmc-table-wrap {
  -webkit-overflow-scrolling: touch;
  margin-top: 8px;
  overflow-x: auto;
}

.tg-tmc-table-wrap table {
  border-collapse: collapse;
  min-width: 520px;
  width: 100%;
}

.tg-tmc-table-wrap th,
.tg-tmc-table-wrap td {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.tg-tmc-table-wrap th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

/* Tablet */
@media (max-width: 900px) {
  .tg-tmc-shell { padding-bottom: 32px; }

  .tg-tmc-hero { padding: 18px 16px; }

  .tg-tmc-hero h2 { font-size: 1.2rem; }

  .tg-tmc-nav {
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .tg-tmc-nav::-webkit-scrollbar { display: none; }

  .tg-tmc-nav button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .tg-tmc-modules {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

/* Celular */
@media (max-width: 640px) {
  .tg-tmc-shell .tg-top {
    flex-direction: column;
    gap: 12px;
  }

  .tg-tmc-shell .tg-top h1 {
    font-size: 1.25rem;
    line-height: 1.25;
  }

  .tg-tmc-shell .tg-sub { font-size: 14px; }

  .tg-tmc-shell .tg-top-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
  }

  .tg-tmc-shell .tg-top-actions .tg-btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    padding: 11px 10px;
    text-align: center;
  }

  .tg-tmc-hero {
    border-radius: 12px;
    padding: 16px 14px;
  }

  .tg-tmc-hero h2 { font-size: 1.05rem; }

  .tg-tmc-formula {
    font-size: 12px;
    overflow-x: auto;
    padding: 10px 12px;
    word-break: break-word;
  }

  .tg-tmc-card {
    border-radius: 12px;
    padding: 14px 14px;
  }

  .tg-tmc-card h3 { font-size: 16px; }

  .tg-tmc-steps { grid-template-columns: 1fr; }

  .tg-tmc-modules { grid-template-columns: 1fr; }

  .tg-tmc-legend span {
    font-size: 11px;
    padding: 6px 10px;
  }

  .tg-tmc-buy {
    border-radius: 12px;
    padding: 16px 14px;
  }

  .tg-tmc-price { font-size: 1.65rem; }

  .tg-tmc-pix-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .tg-tmc-pix-row code {
    display: block;
    font-size: 14px;
    width: 100%;
  }

  .tg-tmc-mail,
  .tg-tmc-buy .tg-btn {
    display: block;
    text-align: center;
    width: 100%;
  }

  .tg-tmc-buy-steps li {
    font-size: 13px;
    padding-left: 1.75rem;
  }
}

@media (max-width: 380px) {
  .tg-tmc-shell .tg-top-actions .tg-btn {
    flex: 1 1 100%;
  }

  .tg-tmc-nav button {
    font-size: 12px;
    padding: 8px 12px;
  }
}
