/* ── Termos e Condições ── */
.terms-page {
  --acc-ink: #f4f0ff;
  --acc-muted: rgba(214, 201, 255, 0.72);
  --acc-line: rgba(196, 168, 255, 0.18);
  --terms-num-size: 2.85rem;
  --terms-head-gap: 1rem;
}

.terms-page .orders-hero {
  max-width: 42rem;
}

.terms-page__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.terms-page__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(196, 168, 255, 0.22);
  background: rgba(88, 28, 180, 0.18);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ddd6fe;
}

.terms-page__badge svg {
  width: 0.9rem;
  height: 0.9rem;
  opacity: 0.9;
}

@media (min-width: 1024px) {
  .terms-page .account-orbit__layout {
    grid-template-columns: minmax(0, 1fr) 17.5rem;
  }

  .terms-page .account-orbit__main {
    order: 1;
  }

  .terms-page .account-orbit__aside {
    order: 2;
  }
}

.terms-page .account-orbit__aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.terms-toc {
  position: sticky;
  top: 6rem;
}

.terms-toc__title {
  margin: 0 0 0.85rem;
  font-family: Kanit, Geist, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c4b5fd;
}

.terms-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: min(52vh, 28rem);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.45) transparent;
}

.terms-toc__link {
  display: block;
  padding: 0.48rem 0.62rem;
  border-radius: 0.65rem;
  border: 1px solid transparent;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--acc-muted);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.terms-toc__link:hover {
  color: #fff;
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(196, 168, 255, 0.16);
}

.terms-toc__link.is-active {
  color: #fff;
  background: rgba(124, 58, 237, 0.22);
  border-color: rgba(196, 168, 255, 0.28);
}

.terms-aside-card {
  position: sticky;
  top: calc(6rem + 18rem);
}

.terms-aside-card__title {
  margin: 0 0 0.55rem;
  font-family: Kanit, Geist, sans-serif;
  font-size: 1rem;
  font-weight: 750;
  color: var(--acc-ink);
}

.terms-aside-card__text {
  margin: 0 0 1rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--acc-muted);
}

.terms-aside-card__links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.terms-aside-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(196, 168, 255, 0.16);
  background: rgba(6, 4, 14, 0.35);
  font-size: 0.84rem;
  font-weight: 600;
  color: #ede9fe;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.terms-aside-card__link:hover {
  border-color: rgba(196, 168, 255, 0.32);
  background: rgba(124, 58, 237, 0.16);
  transform: translateY(-1px);
}

.terms-aside-card__link svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  opacity: 0.9;
}

.terms-panel {
  padding: 1.35rem 1.25rem 1.5rem;
  border-radius: 1.15rem;
  border: 1px solid var(--acc-line);
  background:
    linear-gradient(165deg, rgba(42, 24, 72, 0.55) 0%, rgba(12, 8, 24, 0.92) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 18px 40px rgba(0, 0, 0, 0.28);
}

@media (min-width: 640px) {
  .terms-panel {
    padding: 1.65rem 1.75rem 1.85rem;
  }
}

.terms-content {
  color: var(--acc-muted);
  font-size: 0.94rem;
  line-height: 1.72;
}

.terms-content > *:first-child {
  margin-top: 0;
}

.terms-content > *:last-child {
  margin-bottom: 0;
}

.terms-content .terms-section {
  padding: 1.35rem 0;
  border-bottom: 1px solid rgba(196, 168, 255, 0.1);
  scroll-margin-top: 6rem;
}

.terms-content .terms-section:first-child {
  padding-top: 0;
}

.terms-content .terms-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.terms-content .terms-section__head {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--terms-head-gap);
  margin-bottom: 0.85rem;
}

.terms-content .terms-section__num {
  flex: 0 0 var(--terms-num-size);
  display: inline-grid;
  place-items: center;
  width: var(--terms-num-size);
  height: var(--terms-num-size);
  border-radius: 0.75rem;
  font-family: Kanit, Geist, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.28);
}

.terms-content .terms-section__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  width: auto;
  max-width: none;
  font-family: Kanit, Geist, sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--acc-ink);
  text-wrap: balance;
}

.terms-content .terms-section__body {
  min-width: 0;
  max-width: 72ch;
  padding-left: calc(var(--terms-num-size) + var(--terms-head-gap));
}

.terms-section__body > *:first-child {
  margin-top: 0;
}

.terms-section__body > *:last-child {
  margin-bottom: 0;
}

.terms-content p {
  margin: 0 0 0.85rem;
}

.terms-content ul,
.terms-content ol {
  margin: 0 0 0.95rem;
  padding-left: 0;
  list-style: none;
}

.terms-content li {
  position: relative;
  margin: 0 0 0.45rem;
  padding-left: 1.15rem;
}

.terms-content li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #c084fc, #9333ea);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.45);
}

.terms-content ul ul {
  margin: 0.45rem 0 0.2rem;
}

.terms-content ul ul li::before {
  width: 0.28rem;
  height: 0.28rem;
  opacity: 0.75;
}

.terms-content a {
  color: #ddd6fe;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.terms-content a:hover {
  color: #fff;
}

.terms-callout {
  display: flex;
  gap: 0.75rem;
  margin: 0.85rem 0;
  padding: 0.85rem 0.95rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(124, 58, 237, 0.08));
}

.terms-callout__icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.terms-callout p {
  margin: 0;
  color: #f5f3ff;
}

.terms-callout strong {
  color: #fff;
}

.terms-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--acc-muted);
}

.terms-empty__title {
  margin: 0 0 0.45rem;
  font-family: Kanit, Geist, sans-serif;
  font-size: 1.15rem;
  color: var(--acc-ink);
}

@media (max-width: 1023px) {
  .terms-toc,
  .terms-aside-card {
    position: static;
  }

  .terms-toc__list {
    max-height: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 0.4rem;
  }

  .terms-toc__link {
    font-size: 0.78rem;
  }
}

@media (max-width: 639px) {
  .terms-page {
    --terms-num-size: 2.45rem;
    --terms-head-gap: 0.75rem;
  }

  .terms-panel {
    padding: 1.1rem 1rem 1.25rem;
  }

  .terms-content .terms-section {
    padding: 1.1rem 0;
  }

  .terms-content .terms-section__num {
    font-size: 1rem;
  }

  .terms-content .terms-section__title {
    font-size: 1rem;
  }
}
