/* Gestor STA — Termo de Uso
   Página pública em rota isolada /termos-de-uso/, preservando a identidade azul do sistema. */

.terms-page {
  min-height: 100svh;
  background:
    radial-gradient(circle at 18% -12%, rgba(0, 213, 232, .18), transparent 30%),
    radial-gradient(circle at 92% 8%, rgba(15, 99, 255, .12), transparent 28%),
    linear-gradient(180deg, #eef7ff 0%, #f8fbff 44%, #eef5ff 100%);
  color: var(--ink);
}

.terms-header {
  width: min(1160px, calc(100% - 32px));
  height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
}

.terms-header::before {
  content: "";
  position: absolute;
  inset: 10px -12px 8px;
  border: 1px solid rgba(204, 215, 232, .62);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 14px 40px rgba(7, 23, 59, .08);
  z-index: -1;
}

.terms-logo {
  width: 154px;
  display: block;
  border-radius: 14px;
  text-decoration: none;
}

.terms-logo img {
  width: 100%;
  height: auto;
}

.terms-actions,
.terms-bottom-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.terms-link,
.terms-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 12.5px;
  line-height: 1;
  font-weight: 900;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition), color var(--transition), filter var(--transition);
}

.terms-link {
  color: var(--blue-600);
  border: 1px solid rgba(15, 99, 255, .18);
  background: rgba(255,255,255,.72);
}

.terms-link:hover {
  border-color: rgba(15, 99, 255, .34);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 99, 255, .10);
}

.terms-button {
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, var(--blue-600), var(--cyan-400));
  box-shadow: 0 14px 34px rgba(15, 99, 255, .22);
}

.terms-button:hover {
  filter: saturate(1.08);
  box-shadow: 0 18px 42px rgba(15, 99, 255, .30);
}

.terms-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 42px;
}

.terms-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.terms-hero-content,
.terms-summary-card,
.terms-document,
.terms-index-card {
  border: 1px solid rgba(204, 215, 232, .78);
  background: rgba(255,255,255,.88);
  box-shadow: 0 22px 70px rgba(7, 23, 59, .10);
  backdrop-filter: blur(18px);
}

.terms-hero-content {
  min-height: 274px;
  display: grid;
  align-content: center;
  position: relative;
  overflow: hidden;
  padding: 36px;
  border-radius: 22px;
}

.terms-hero-content::before {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  right: -130px;
  top: -150px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0,213,232,.23), transparent 66%);
}

.terms-eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--blue-600);
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.terms-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cyan-400);
  box-shadow: 0 0 0 6px rgba(0, 213, 232, .13), 0 0 24px rgba(0, 213, 232, .42);
}

.terms-hero h1 {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(32px, 4.5vw, 58px);
  line-height: .96;
  letter-spacing: -.06em;
  font-weight: 900;
}

.terms-hero p {
  max-width: 670px;
  margin: 18px 0 0;
  color: #50617e;
  font-size: 15px;
  line-height: 1.58;
  font-weight: 650;
}

.terms-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.terms-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(15, 99, 255, .15);
  border-radius: 999px;
  color: #53647f;
  background: rgba(242, 247, 255, .92);
  font-size: 12px;
  font-weight: 800;
}

.terms-meta strong {
  color: var(--ink);
}

.terms-summary-card {
  display: grid;
  align-content: center;
  padding: 28px;
  border-radius: 22px;
}

.summary-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--cyan-400));
  box-shadow: 0 14px 30px rgba(15, 99, 255, .24);
}

.summary-icon svg {
  width: 27px;
  height: 27px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.terms-summary-card h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: -.035em;
  font-weight: 900;
}

.terms-summary-card p {
  margin: 13px 0 0;
  color: #596a86;
  font-size: 13.3px;
  line-height: 1.55;
  font-weight: 650;
}

.terms-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.terms-index {
  position: sticky;
  top: 92px;
}

.terms-index-card {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 18px;
}

.terms-index-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.terms-index-card a {
  display: flex;
  align-items: center;
  min-height: 31px;
  padding: 0 10px;
  border-radius: 10px;
  color: #60718e;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}

.terms-index-card a:hover,
.terms-index-card a.is-active {
  color: var(--blue-600);
  background: rgba(15, 99, 255, .08);
}

.terms-document {
  padding: 30px;
  border-radius: 22px;
}


.term-section {
  position: relative;
  padding: 28px 0 28px 54px;
  border-top: 1px solid rgba(220, 228, 241, .95);
  scroll-margin-top: 96px;
}

.term-section:first-of-type {
  border-top: 0;
}

.section-number {
  position: absolute;
  left: 0;
  top: 30px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 99, 255, .16);
  border-radius: 12px;
  color: var(--blue-600);
  background: #f3f8ff;
  font-size: 12px;
  font-weight: 900;
}

.term-section h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: -.04em;
  font-weight: 900;
}

.term-section p {
  margin: 0;
  color: #566882;
  font-size: 14.2px;
  line-height: 1.72;
  font-weight: 560;
}

.term-section p + p {
  margin-top: 12px;
}

.highlight-section {
  margin-inline: -14px;
  padding-inline: 68px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(242, 247, 255, .82), rgba(255,255,255,.44));
}

.highlight-section .section-number {
  left: 14px;
}

.definition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.definition-grid div,
.contact-box {
  border: 1px solid rgba(204, 215, 232, .76);
  border-radius: 16px;
  background: rgba(250, 253, 255, .94);
  box-shadow: 0 10px 26px rgba(7, 23, 59, .05);
}

.definition-grid div {
  padding: 16px;
}

.definition-grid strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.definition-grid p {
  margin: 0;
  font-size: 12.7px;
  line-height: 1.48;
}

.contact-box {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 16px;
  color: #566882;
  font-size: 13px;
  font-weight: 650;
}

.contact-box strong {
  color: var(--ink);
}

.terms-bottom-actions {
  justify-content: flex-end;
  padding-top: 24px;
  border-top: 1px solid rgba(220, 228, 241, .95);
}

.back-to-top {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  position: fixed;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 30;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--cyan-400));
  box-shadow: 0 18px 38px rgba(15, 99, 255, .28);
  opacity: 0;
  transform: translateY(10px) scale(.96);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.back-to-top svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.terms-footer {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 26px;
  color: #6f7f99;
  font-size: 11.5px;
  line-height: 1.4;
  font-weight: 650;
  text-align: center;
}

@media (min-width: 1181px) {
  .terms-header,
  .terms-shell,
  .terms-footer {
    width: min(1040px, calc(100% - 32px));
  }

  .terms-header { height: 64px; }
  .terms-logo { width: 136px; }
  .terms-shell { padding-top: 26px; }
  .terms-hero { grid-template-columns: minmax(0, 1fr) 300px; }
  .terms-hero-content { min-height: 234px; padding: 30px; }
  .terms-hero h1 { font-size: 44px; }
  .terms-hero p { font-size: 13.8px; }
  .terms-summary-card { padding: 24px; }
  .terms-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .terms-document { padding: 26px; }
  .term-section h2 { font-size: 22px; }
  .term-section p { font-size: 13.5px; }
}

@media (max-width: 980px) {
  .terms-header {
    width: min(100% - 24px, 720px);
  }

  .terms-shell,
  .terms-footer {
    width: min(100% - 24px, 720px);
  }

  .terms-hero {
    grid-template-columns: 1fr;
  }

  .terms-layout {
    grid-template-columns: 1fr;
  }

  .terms-index {
    position: static;
  }

  .terms-index-card {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px;
    scrollbar-width: none;
  }

  .terms-index-card::-webkit-scrollbar {
    display: none;
  }

  .terms-index-card strong {
    min-width: max-content;
    display: inline-flex;
    align-items: center;
    margin: 0 4px 0 0;
  }

  .terms-index-card a {
    min-width: max-content;
    padding-inline: 12px;
  }
}

@media (max-width: 680px) {
  .terms-page {
    background: linear-gradient(180deg, #eff8ff 0%, #f8fbff 50%, #eef7ff 100%);
  }

  .terms-header {
    height: auto;
    min-height: 68px;
    padding: max(10px, env(safe-area-inset-top)) 0 8px;
    align-items: center;
  }

  .terms-header::before {
    inset: 8px -6px 6px;
  }

  .terms-logo {
    width: 124px;
  }

  .terms-actions {
    gap: 6px;
  }

  .terms-link,
  .terms-button {
    min-height: 34px;
    padding-inline: 11px;
    font-size: 11.2px;
  }

  .terms-shell {
    padding-top: 18px;
  }

  .terms-hero-content {
    min-height: 0;
    padding: 24px;
    border-radius: 20px;
  }

  .terms-hero h1 {
    font-size: 34px;
    letter-spacing: -.055em;
  }

  .terms-hero p {
    font-size: 13.2px;
    line-height: 1.52;
  }

  .terms-meta {
    gap: 7px;
  }

  .terms-meta span {
    width: 100%;
    min-height: 30px;
    justify-content: center;
    font-size: 11px;
  }

  .terms-summary-card {
    padding: 22px;
    border-radius: 20px;
  }

  .summary-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    border-radius: 15px;
  }

  .terms-document {
    padding: 18px;
    border-radius: 20px;
  }

  .term-section,
  .highlight-section {
    margin-inline: 0;
    padding: 24px 0 24px 0;
    background: transparent;
    border-radius: 0;
  }

  .section-number,
  .highlight-section .section-number {
    position: static;
    margin-bottom: 12px;
  }

  .term-section h2 {
    font-size: 21px;
  }

  .term-section p {
    font-size: 13.3px;
    line-height: 1.66;
  }

  .definition-grid {
    grid-template-columns: 1fr;
  }

  .terms-bottom-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .terms-bottom-actions .terms-link,
  .terms-bottom-actions .terms-button {
    width: 100%;
  }

  .back-to-top {
    right: 12px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 390px) {
  .terms-header,
  .terms-shell,
  .terms-footer {
    width: min(100% - 18px, 720px);
  }

  .terms-logo {
    width: 112px;
  }

  .terms-actions .terms-link {
    display: none;
  }

  .terms-hero-content,
  .terms-summary-card,
  .terms-document {
    border-radius: 18px;
  }

  .terms-hero h1 {
    font-size: 30px;
  }
}

@media print {
  .terms-header,
  .terms-index,
  .terms-summary-card,
  .terms-bottom-actions,
  .back-to-top,
  .terms-footer {
    display: none !important;
  }

  .terms-page {
    background: #fff !important;
  }

  .terms-shell,
  .terms-layout,
  .terms-hero,
  .terms-document {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .terms-hero-content {
    min-height: 0;
    padding: 0 0 18px !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .terms-hero-content::before,

  .term-section,
  .highlight-section {
    break-inside: avoid;
    margin: 0;
    padding: 16px 0 0;
    background: #fff !important;
  }

  .section-number {
    position: static;
    display: inline-grid;
    margin-bottom: 8px;
  }
}
