:root {
  /* MatchWise — intimidade contemporânea */
  --bg0: #140f0c;
  --bg1: #1f1814;
  --bg2: #2a211c;
  --ink: #f6efe6;
  --muted: #b5a89a;
  --line: rgba(246, 239, 230, 0.12);
  --accent: #f2c14e;
  --accent-ink: #1a140e;
  --coral: #e87b5f;
  --mint: #7dcaa5;
  --warn: #f0b429;
  --radius: 20px;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(242, 193, 78, 0.14), transparent 55%),
    radial-gradient(800px 480px at 92% 8%, rgba(232, 123, 95, 0.12), transparent 50%),
    radial-gradient(700px 500px at 50% 110%, rgba(125, 202, 165, 0.1), transparent 55%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 48%, #120e0b);
  background-attachment: fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.top,
.hero,
.app,
.foot {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  max-width: 960px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand__mark {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: conic-gradient(from 210deg, var(--accent), var(--mint), var(--coral), var(--accent));
  box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.18);
}

.brand__mark--lg {
  width: 3.2rem;
  height: 3.2rem;
  box-shadow: 0 0 0 5px rgba(242, 193, 78, 0.14), 0 12px 40px rgba(0, 0, 0, 0.35);
}

.brand-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  text-align: center;
}

.brand-hero .eyebrow {
  margin: 0;
}

.segment {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
  padding: 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
}

.segment__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 0.4rem;
  border-radius: 999px;
  cursor: pointer;
  min-height: 44px;
}

.segment__btn.is-on {
  background: var(--accent);
  color: var(--accent-ink);
}

.eyebrow {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.top__nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.top__nav a:hover {
  color: var(--ink);
}

.hero {
  max-width: 720px;
  margin: 8vh auto 0;
  padding: 0 1.4rem 4rem;
  animation: rise 0.7s ease both;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  font-weight: 700;
}

.lede {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 38rem;
  margin: 0 0 1.8rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn--danger {
  background: transparent;
  border-color: rgba(255, 107, 74, 0.45);
  color: #ffb4a3;
}

.btn--sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.foot {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.4rem 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.app-body {
  padding-bottom: env(safe-area-inset-bottom);
}

.app-body.has-bottom-nav .app {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

.top--app {
  padding-top: calc(0.75rem + env(safe-area-inset-top));
}

.auth-panel {
  margin-top: 4vh;
}

.auth-form {
  display: grid;
  gap: 0.2rem;
}

.btn--block {
  width: 100%;
  margin-top: 0.4rem;
}

.social-stack {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 0.6rem;
}

.btn--social {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-weight: 600;
}

.btn--apple {
  background: #111;
  border-color: #333;
}

.auth-or {
  text-align: center;
  margin: 1rem 0 0.6rem;
}

.auth-switch {
  text-align: center;
  margin-top: 1rem;
}

.auth-error {
  color: #ffb4a3;
  font-size: 0.88rem;
  margin: 0.3rem 0 0.5rem;
}

.google-host {
  display: flex;
  justify-content: center;
  margin: 0.4rem 0 0.6rem;
}

.tabs--scroll {
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs--scroll::-webkit-scrollbar {
  display: none;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.15rem;
  padding: 0.45rem 0.4rem calc(0.45rem + env(safe-area-inset-bottom));
  background: rgba(12, 22, 18, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.55rem 0.2rem;
  border-radius: 12px;
  cursor: pointer;
}

.nav-item.is-on {
  color: var(--accent-ink);
  background: var(--accent);
}


.panel {
  background: linear-gradient(160deg, rgba(30, 61, 51, 0.85), rgba(15, 28, 24, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow);
  animation: rise 0.45s ease both;
}

.panel + .panel {
  margin-top: 1rem;
}

.panel h1,
.panel h2 {
  font-family: var(--display);
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

.panel h1 {
  font-size: 1.85rem;
}

.panel h2 {
  font-size: 1.35rem;
}

.panel p.hint {
  color: var(--muted);
  margin: 0 0 1.2rem;
}

.steps {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  flex-wrap: wrap;
}

.step-dot {
  height: 6px;
  width: 2.2rem;
  border-radius: 999px;
  background: rgba(238, 246, 241, 0.12);
}

.step-dot.is-on {
  background: var(--accent);
}

.step-dot.is-done {
  background: var(--mint);
}

label.field {
  display: block;
  margin-bottom: 0.95rem;
}

label.field span {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="search"],
select,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  font: inherit;
  padding: 0.7rem 0.85rem;
  -webkit-appearance: none;
  appearance: none;
}

input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="text"]::placeholder,
textarea::placeholder {
  color: rgba(157, 181, 170, 0.7);
}

textarea {
  min-height: 5rem;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(212, 255, 79, 0.35);
  border-color: rgba(212, 255, 79, 0.5);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.chip.is-on {
  background: rgba(212, 255, 79, 0.18);
  border-color: rgba(212, 255, 79, 0.55);
  color: var(--accent);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.agent-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
}

.avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1.25rem;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-ink);
  background: linear-gradient(145deg, var(--accent), var(--mint));
  box-shadow: 0 10px 30px rgba(94, 224, 181, 0.25);
}

.agent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(238, 246, 241, 0.08);
  color: var(--muted);
}

.tag--ok {
  background: rgba(94, 224, 181, 0.15);
  color: var(--mint);
}

.tag--warn {
  background: rgba(255, 200, 87, 0.15);
  color: var(--warn);
}

.tag--hot {
  background: rgba(255, 107, 74, 0.15);
  color: #ffb4a3;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.8rem 0;
  cursor: pointer;
  user-select: none;
}

.toggle input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}

.priority-list {
  display: grid;
  gap: 0.7rem;
}

.priority-row {
  display: grid;
  grid-template-columns: 1fr minmax(9rem, 11rem);
  gap: 0.6rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.priority-row strong {
  font-size: 0.95rem;
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 280px;
  overflow: auto;
  padding: 0.4rem 0.1rem;
  margin-bottom: 0.8rem;
}

.chat--mirror {
  max-height: min(48vh, 380px);
  min-height: 200px;
}

.linkish {
  appearance: none;
  border: 0;
  background: none;
  color: var(--mint);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.memory-list {
  display: grid;
  gap: 0.65rem;
}

.memory-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  background: rgba(0, 0, 0, 0.18);
}

.memory-item__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.memory-item p {
  margin: 0;
  font-size: 0.95rem;
}

.panel--wide,
.panel--wa {
  max-width: none;
  padding: 0.85rem;
}

.wa-shell {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #1a1512;
  display: flex;
  flex-direction: column;
  min-height: min(62vh, 520px);
}

.wa-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  background: #231c18;
  border-bottom: 1px solid var(--line);
}

.wa-header__avatars {
  display: flex;
  align-items: center;
}

.wa-header__avatars .avatar {
  margin-left: -0.45rem;
  border: 2px solid #231c18;
}

.wa-header__avatars .avatar:first-child {
  margin-left: 0;
  z-index: 1;
}

.avatar--sm {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
}

.avatar--them {
  background: linear-gradient(145deg, var(--mint), #9dd4c0);
}

.wa-header__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wa-header__info strong {
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.wa-header__info span {
  font-size: 0.75rem;
  color: var(--muted);
}

.wa-thread {
  flex: 1;
  overflow: auto;
  padding: 0.9rem 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background:
    radial-gradient(circle at 20% 10%, rgba(242, 193, 78, 0.05), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(125, 202, 165, 0.05), transparent 35%),
    #17120f;
  max-height: min(52vh, 440px);
  min-height: 280px;
}

.wa-empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 16rem;
  line-height: 1.4;
}

.wa-row {
  display: flex;
  width: 100%;
  animation: rise 0.25s ease both;
}

.wa-row--in {
  justify-content: flex-start;
}

.wa-row--out {
  justify-content: flex-end;
}

.wa-bubble {
  max-width: min(78%, 22rem);
  padding: 0.45rem 0.65rem 0.35rem;
  border-radius: 12px;
  font-size: 0.94rem;
  line-height: 1.4;
  position: relative;
}

.wa-bubble--in {
  background: #2a221d;
  border-top-left-radius: 4px;
  color: var(--ink);
}

.wa-bubble--out {
  background: #3d3420;
  border-top-right-radius: 4px;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.12);
}

.wa-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.wa-row--in .wa-name {
  color: var(--mint);
}

.wa-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.wa-meta {
  text-align: right;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.wa-typing {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  opacity: 0.9;
}

.wa-typing-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}

.wa-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

.wa-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  display: block;
  animation: waDot 1.2s ease infinite;
}

.wa-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.wa-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes waDot {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.wa-readonly-bar {
  padding: 0.55rem 0.85rem;
  border-top: 1px solid var(--line);
  background: #1f1915;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.bubble.typing {
  opacity: 0.75;
  font-style: italic;
  animation: pulse 1.1s ease infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.9;
  }
}

.bubble {
  max-width: 88%;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  font-size: 0.95rem;
  animation: rise 0.25s ease both;
}

.bubble--me {
  align-self: flex-end;
  background: rgba(212, 255, 79, 0.16);
  border: 1px solid rgba(212, 255, 79, 0.3);
}

.bubble--bot {
  align-self: flex-start;
  background: rgba(238, 246, 241, 0.06);
  border: 1px solid var(--line);
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.match-grid {
  display: grid;
  gap: 0.75rem;
}

.match-block h3 {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.match-block ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink);
}

.band {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--display);
  font-size: 1.4rem;
  margin: 0.2rem 0 0.8rem;
}

.band__dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--mint);
}

.tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.tab.is-on {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: transparent;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 560px) {
  .priority-row {
    grid-template-columns: 1fr;
  }

  .agent-card {
    grid-template-columns: 1fr;
  }
}
