:root {
  --tx-bg: #02050d;
  --tx-panel: rgba(4, 13, 24, .92);
  --tx-border: rgba(0, 240, 255, .19);
  --tx-cyan: #00f0ff;
  --tx-mint: #8bffcb;
  --tx-violet: #7d4dff;
  --tx-text: #effcff;
  --tx-muted: #819eb2;
  --tx-dark: #040c17;
}
html, body {
  min-height: 100%;
  margin: 0;
  background: var(--tx-bg) !important;
  color: var(--tx-text) !important;
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
}
body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: -35%;
  z-index: 0;
  pointer-events: none;
  background:
    conic-gradient(from 210deg,
      transparent 0 18%,
      rgba(0,240,255,.15),
      transparent 31% 48%,
      rgba(125,77,255,.19),
      transparent 60% 77%,
      rgba(139,255,203,.10),
      transparent 90%);
  filter: blur(75px);
  animation: tx-rotate 24s linear infinite;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
}
@keyframes tx-rotate { to { transform: rotate(360deg); } }

.tx-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.tx-header {
  width: min(1280px, 92vw);
  margin: 0 auto;
  padding: 26px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tx-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}
.tx-brand img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(0,240,255,.25));
}
.tx-brand b {
  color: var(--tx-text);
  letter-spacing: .14em;
  font-size: .83rem;
}
.tx-node {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8ba6b9;
  font-size: .70rem;
  letter-spacing: .10em;
}
.tx-node::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tx-mint);
  box-shadow: 0 0 16px var(--tx-mint);
  animation: tx-pulse 1.8s infinite;
}
@keyframes tx-pulse { 50% { opacity: .35; } }

.tx-main {
  width: min(1280px, 92vw);
  margin: 0 auto;
  flex: 1;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 88px;
  align-items: center;
  padding: 26px 0 65px;
}
.tx-console {
  position: relative;
  padding: 29px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(7,17,31,.92), rgba(3,9,18,.95));
  border: 1px solid var(--tx-border);
  box-shadow:
    0 0 0 1px rgba(125,77,255,.08),
    0 50px 125px rgba(0,0,0,.68),
    inset 0 1px rgba(255,255,255,.05);
  overflow: hidden;
}
.tx-console::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 2px;
  top: 0;
  left: 13%;
  background: linear-gradient(90deg, transparent, var(--tx-cyan), transparent);
  box-shadow: 0 0 25px var(--tx-cyan);
}
.tx-window {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.tx-window span {
  color: #7490a5;
  font-size: .67rem;
  letter-spacing: .14em;
}
.tx-lights {
  display: flex;
  gap: 6px;
}
.tx-lights i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #294256;
}
.tx-lights i:first-child { background: var(--tx-mint); }

#root {
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  position: relative;
  z-index: 2;
  color: var(--tx-text) !important;
  background: transparent !important;
}
#root > div,
#root main,
#root section {
  min-height: 0 !important;
  height: auto !important;
  background: transparent !important;
}
#root [class*="MuiContainer"],
#root [class*="MuiBox"],
#root [class*="MuiPaper"],
#root [class*="MuiCard"] {
  max-width: 100% !important;
}
#root [class*="MuiPaper"],
#root [class*="MuiCard"] {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}
#root h1, #root h2, #root h3, #root h4,
#root [class*="MuiTypography"] {
  color: var(--tx-text) !important;
}
#root p,
#root label,
#root small,
#root [class*="MuiFormLabel"],
#root [class*="MuiInputLabel"],
#root [class*="MuiFormHelperText"] {
  color: var(--tx-muted) !important;
}
#root input,
#root textarea,
#root select {
  color: var(--tx-text) !important;
  caret-color: var(--tx-cyan) !important;
}
#root input::placeholder,
#root textarea::placeholder {
  color: #64829b !important;
  opacity: 1 !important;
}
#root [class*="MuiInputBase-root"],
#root [class*="MuiOutlinedInput-root"] {
  color: var(--tx-text) !important;
  background: var(--tx-dark) !important;
  border-radius: 13px !important;
}
#root [class*="MuiOutlinedInput-notchedOutline"] {
  border-color: #173047 !important;
}
#root [class*="MuiOutlinedInput-root"]:hover [class*="MuiOutlinedInput-notchedOutline"],
#root [class*="Mui-focused"] [class*="MuiOutlinedInput-notchedOutline"] {
  border-color: var(--tx-cyan) !important;
}
#root button,
#root [role="button"] {
  border-radius: 13px !important;
}
#root button[type="submit"],
#root [class*="MuiButton-contained"] {
  color: #dffeff !important;
  border: 1px solid rgba(0,240,255,.35) !important;
  background: linear-gradient(90deg, rgba(0,240,255,.19), rgba(125,77,255,.29)) !important;
  box-shadow:
    inset 0 0 20px rgba(0,240,255,.06),
    0 0 27px rgba(0,240,255,.08) !important;
  font-weight: 800 !important;
  letter-spacing: .06em !important;
  text-transform: none !important;
}
#root button[type="submit"]:hover,
#root [class*="MuiButton-contained"]:hover {
  background: linear-gradient(90deg, rgba(0,240,255,.27), rgba(125,77,255,.36)) !important;
  transform: translateY(-1px);
}
#root a { color: #8ff7ff !important; }
#root svg { color: #8fb4c8; }
#root [class*="MuiAlert"] {
  color: var(--tx-text) !important;
  background: rgba(255,255,255,.045) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
}
#root img {
  max-width: 100%;
}

.tx-telemetry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 16px;
}
.tx-telemetry div {
  min-width: 0;
  padding: 10px 11px;
  border-radius: 11px;
  background: rgba(255,255,255,.026);
  border: 1px solid rgba(255,255,255,.065);
}
.tx-telemetry span {
  display: block;
  color: #607f96;
  font-size: .61rem;
  text-transform: uppercase;
  letter-spacing: .10em;
  margin-bottom: 4px;
}
.tx-telemetry b {
  display: block;
  color: #a9c8d9;
  font-size: .73rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-telemetry .tx-ip b { color: var(--tx-mint); }

.tx-human {
  margin-top: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(139,255,203,.17);
  background: linear-gradient(90deg, rgba(139,255,203,.045), rgba(0,240,255,.028));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.tx-human strong {
  display: block;
  color: var(--tx-text);
  font-size: .76rem;
}
.tx-human small {
  color: #7594a8;
  font-size: .66rem;
}
.tx-human em {
  color: var(--tx-mint);
  font-style: normal;
  font-size: .64rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tx-copy small {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,240,255,.065);
  border: 1px solid rgba(0,240,255,.13);
  color: #8ff7ff;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .68rem;
}
.tx-copy h1 {
  color: var(--tx-text);
  font-size: clamp(3.5rem, 6.4vw, 7.1rem);
  line-height: .88;
  letter-spacing: -.068em;
  margin: 27px 0;
}
.tx-copy h1 span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(151,245,255,.72);
  text-shadow: 0 0 36px rgba(0,240,255,.10);
}
.tx-copy p {
  max-width: 640px;
  color: #8ea7ba;
  line-height: 1.8;
  font-size: 1.04rem;
}
.tx-signals {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 34px;
}
.tx-signal {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a6bccb;
  font-size: .76rem;
}
.tx-signal i {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(139,255,203,.20);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--tx-mint);
  font-style: normal;
}

.tx-footer {
  width: min(1280px, 92vw);
  margin: 0 auto;
  padding: 17px 0 23px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 24px;
  align-items: center;
  color: #5e788c;
  font-size: .74rem;
}
.tx-footer strong { color: #7895a8; }
.tx-footer a {
  color: #81a5bb;
  text-decoration: none;
}
.tx-whatsapp {
  padding: 10px 15px;
  border: 1px solid rgba(139,255,203,.22);
  border-radius: 999px;
  color: #9effd0 !important;
  font-weight: 800;
}

@media (max-width: 920px) {
  .tx-main { grid-template-columns: 1fr; gap: 44px; }
  .tx-copy { text-align: center; }
  .tx-copy p { margin-left: auto; margin-right: auto; }
  .tx-signals { justify-content: center; }
  .tx-footer { grid-template-columns: 1fr; text-align: center; }
  .tx-whatsapp { justify-self: center; }
}
@media (max-width: 520px) {
  .tx-node { display: none; }
  .tx-console { padding: 23px 18px; }
  .tx-telemetry { grid-template-columns: 1fr; }
  .tx-copy h1 { font-size: 3.35rem; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, .tx-node::before { animation: none !important; }
  #root button { transition: none !important; }
}
/* TriNexus — correções responsivas e de identidade visual */
.tx-main,
.tx-header,
.tx-console,
.tx-footer {
  box-sizing: border-box;
}

.tx-console {
  width: 100%;
  max-width: 480px;
  justify-self: center;
}

.tx-brand img {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  object-fit: contain;
  border-radius: 10px;
}

#root img[src="/logo.png"],
#root img[src$="/logo.png"] {
  display: block !important;
  width: 72px !important;
  height: 72px !important;
  max-width: 72px !important;
  object-fit: contain !important;
  margin: 0 auto 14px !important;
}

@media (max-width: 1100px) and (min-width: 921px) {
  .tx-main {
    grid-template-columns: minmax(0, 470px) minmax(0, 1fr);
    gap: 48px;
  }

  .tx-copy h1 {
    font-size: clamp(3.4rem, 6vw, 5.2rem);
  }
}

@media (max-width: 920px) {
  .tx-header {
    width: min(480px, calc(100vw - 32px));
    padding: 18px 0 12px;
  }

  .tx-main {
    display: block;
    width: min(480px, calc(100vw - 32px));
    padding: 8px 0 28px;
  }

  .tx-console {
    max-width: none;
    padding: 24px;
  }

  .tx-copy {
    display: none;
  }

  .tx-footer {
    width: min(480px, calc(100vw - 32px));
    grid-template-columns: 1fr;
    text-align: center;
    padding: 16px 0 22px;
  }

  .tx-whatsapp {
    justify-self: center;
  }
}

@media (max-width: 520px) {
  .tx-brand {
    gap: 9px;
  }

  .tx-brand img {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .tx-brand b {
    font-size: .65rem;
    letter-spacing: .10em;
  }

  .tx-console {
    padding: 18px 14px;
    border-radius: 20px;
  }

  .tx-window {
    padding-bottom: 14px;
  }

  #root img[src="/logo.png"],
  #root img[src$="/logo.png"] {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
  }

  .tx-human,
  .tx-telemetry {
    display: none;
  }
}

/* TriNexus — ajuste desktop sem rolagem */
@media (min-width: 921px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden !important;
  }

  .tx-shell {
    width: 100%;
    height: 100vh;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .tx-header {
    padding-top: 12px;
    padding-bottom: 8px;
  }

  .tx-main {
    width: min(1240px, 92vw);
    height: 100%;
    min-height: 0;
    padding: 6px 0;
    gap: clamp(36px, 4vw, 64px);
    align-items: center;
  }

  .tx-console {
    max-width: 440px;
    padding: 18px 22px;
  }

  .tx-window {
    margin-bottom: 8px;
    padding-bottom: 10px;
  }

  .tx-console #root {
    zoom: .82;
  }

  .tx-human {
    margin-top: 10px;
    padding: 10px 12px;
  }

  .tx-telemetry {
    margin-top: 8px;
    gap: 8px;
  }

  .tx-copy h1 {
    font-size: clamp(3.6rem, 5.4vw, 5.8rem);
    line-height: .88;
  }

  .tx-copy p {
    margin-top: 14px;
    line-height: 1.55;
  }

  .tx-signals {
    margin-top: 16px;
    gap: 10px 18px;
  }

  .tx-footer {
    padding-top: 8px;
    padding-bottom: 10px;
  }
}

@media (min-width: 921px) and (max-height: 1000px) {
  .tx-header {
    padding-top: 8px;
    padding-bottom: 5px;
  }

  .tx-main {
    padding: 2px 0;
  }

  .tx-console {
    padding: 14px 18px;
  }

  .tx-console #root {
    zoom: .74;
  }

  .tx-human {
    display: none;
  }

  .tx-telemetry {
    margin-top: 6px;
  }

  .tx-copy h1 {
    font-size: clamp(3.2rem, 5vw, 5rem);
  }

  .tx-copy p {
    margin-top: 10px;
  }

  .tx-signals {
    margin-top: 12px;
  }

  .tx-footer {
    padding-top: 6px;
    padding-bottom: 8px;
  }
}

/* TriNexus — correção de sobreposição do painel desktop */
@media (min-width: 921px) {
  .tx-main {
    align-items: center;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .tx-console {
    zoom: .82;
    align-self: center;
  }

  .tx-console #root {
    zoom: 1;
  }
}

@media (min-width: 921px) and (max-height: 1000px) {
  .tx-console {
    zoom: .72;
  }

  .tx-console #root {
    zoom: 1;
  }
}
