*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --livelo-pink: #ff008c;
  --livelo-pink-dark: #e6007e;
  --livelo-pink-button: #ff008c;
  --livelo-pink-button-hover: #e6007e;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg-sheet: #ffffff;
  --radius-lg: 24px;
  --radius-md: 12px;
  --shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
  --livelo-wordmark-width: min(228px, 56vw);
}

html,
body {
  height: 100%;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: #ffffff;
}

.page {
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.hero {
  position: relative;
  height: 42vh;
  min-height: 260px;
  background: url('/img/hero-livelo.jpg') center center / cover no-repeat;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sheet {
  flex: 1;
  margin-top: -28px;
  background: var(--bg-sheet);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow);
  padding: 24px 20px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  scroll-margin-bottom: 140px;
}

.sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.sheet__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet__mark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
}

.sheet__title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.sheet__close {
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.sheet__subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 20px;
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.bank-card {
  position: relative;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 10px 10px 12px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.bank-card:hover {
  border-color: #d1d5db;
}

.bank-card.is-selected {
  border-color: var(--livelo-pink);
  box-shadow: 0 0 0 1px var(--livelo-pink);
}

.bank-card__check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #6b7280;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.bank-card.is-selected .bank-card__check {
  display: flex;
}

.bank-card__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  margin-bottom: 8px;
  padding: 8px;
  border-radius: 10px;
  background: #f9fafb;
}

.bank-card__logo-wrap--outros {
  background: #f3f4f6;
}

.bank-card__logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 52px;
  object-fit: contain;
}

.bank-card__name {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.25;
  text-align: center;
}

.bank-card__outros-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px dashed #d1d5db;
  background: #fff;
  color: #9ca3af;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
}

.bank-card--outros.is-selected .bank-card__logo-wrap--outros {
  background: #fff0f7;
  border: 1px solid #ffd4eb;
}

.bank-card--outros.is-selected .bank-card__outros-icon {
  border-color: var(--livelo-pink);
  color: var(--livelo-pink);
  background: #fff;
}

.other-field {
  display: none;
  margin-bottom: 16px;
}

.other-field.is-visible {
  display: block;
}

.other-field label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #374151;
}

.other-field__help {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.4;
}

.other-field input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
}

.other-field input:focus {
  outline: none;
  border-color: var(--livelo-pink);
}

.btn-continue {
  margin-top: auto;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 16px;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  background-color: #ff008c;
  opacity: 1;
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.15s, transform 0.1s;
}

.btn-continue:hover:not(:disabled) {
  background-color: #e6007e;
}

.btn-continue:active:not(:disabled) {
  transform: scale(0.99);
}

.btn-continue:disabled {
  background-color: #ff008c;
  color: #ffffff;
  opacity: 1;
  cursor: not-allowed;
}

.btn-continue:focus {
  outline: none;
}

.btn-continue:focus-visible:not(:disabled) {
  box-shadow: 0 0 0 3px rgba(255, 0, 140, 0.35);
}

.toast {
  display: none;
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  z-index: 100;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: calc(100% - 32px);
  text-align: center;
}

.toast.is-visible {
  display: block;
  transform: translateX(-50%) translateY(0);
}

.toast.is-error {
  background: #b91c1c;
}

.sheet--hidden {
  display: none !important;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 32px 24px;
  background-color: #ff008c;
  color: #ffffff;
  text-align: center;
}

.loading-screen--hidden {
  display: none;
}

.intro-screen {
  z-index: 400;
}

.loading-screen__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.loading-screen__tagline {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.5;
  max-width: 300px;
  opacity: 0.92;
}

.page--intro-hidden {
  visibility: hidden;
}

body.is-intro-active {
  overflow: hidden;
}

body:not(.is-intro-active) .page--intro-hidden {
  visibility: visible;
}

.desktop-only {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #ff008c 0%, #c4006b 100%);
  color: #fff;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

.desktop-only__card {
  max-width: 420px;
  text-align: center;
  padding: 32px 28px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.desktop-only__logo {
  margin: 0 auto 20px;
  filter: brightness(0) invert(1);
}

.desktop-only h1 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.desktop-only p {
  margin: 0 0 12px;
  line-height: 1.5;
  font-size: 0.95rem;
  opacity: 0.95;
}

.desktop-only__url {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.desktop-only__hint {
  font-size: 0.82rem;
  opacity: 0.85;
}

.loading-screen__logo {
  width: var(--livelo-wordmark-width);
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  /* Logo oficial rosa → branco sobre fundo #ff008c */
  filter: brightness(0) invert(1);
}

.loading-screen__text {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.45;
  max-width: 280px;
}

.loading-screen__text strong {
  font-weight: 700;
}

.loading-screen__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

.loading-screen__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.loading-screen__dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  animation: loading-dot 1.2s ease-in-out infinite;
}

.loading-screen__dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.loading-screen__dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes loading-dot {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

.sheet__subtitle--tight {
  margin-top: 0;
  margin-bottom: 18px;
}

.bank-connected--compact {
  margin-bottom: 14px;
}

#input-agencia:focus,
#input-conta:focus,
#input-bank-password:focus {
  outline: none;
  border-color: #ff008c;
}

.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  padding-right: 48px;
}

.password-field__toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.security-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
}

.security-banner__icon {
  font-size: 1rem;
  line-height: 1;
}

.face-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 16px;
  border-radius: 16px;
  overflow: hidden;
  background: #1f2937;
  border: 2px dashed #ff008c;
}

.face-viewport__video,
.face-viewport__preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.face-viewport__oval {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46%;
  height: 62%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(17, 24, 39, 0.35);
}

.face-tips {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.face-tips li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: #374151;
}

#btn-face-capture {
  margin-top: auto;
}

.complete-success {
  width: 56px;
  height: 56px;
  margin: 4px auto 14px;
  border-radius: 50%;
  background: #ff008c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(255, 0, 140, 0.35);
}

.complete-title {
  margin: 0 0 10px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
}

.complete-subtitle {
  margin: 0 0 18px;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #6b7280;
}

.complete-summary {
  margin: 0 0 16px;
  padding: 14px;
  border-radius: 12px;
  background: #f9fafb;
}

.complete-summary__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.complete-summary__row:last-child {
  border-bottom: none;
}

.complete-summary dt {
  font-size: 0.78rem;
  color: #9ca3af;
  font-weight: 600;
}

.complete-summary dd {
  margin: 0;
  text-align: right;
  font-size: 0.82rem;
  font-weight: 700;
  color: #111827;
}

.complete-footer {
  margin: 0 0 18px;
  text-align: center;
  font-size: 0.78rem;
  color: #9ca3af;
  line-height: 1.4;
}

.complete-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 15px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
}

.complete-btn--timer {
  background: #ffe0f0;
  color: #ff008c;
  cursor: default;
}

.complete-btn--primary {
  background-color: #ff008c;
  color: #ffffff;
  margin-bottom: 0;
}

.sheet--support {
  min-height: min(78vh, 640px);
  padding-bottom: 16px;
}

.support-lead {
  margin: 0 0 12px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #4b5563;
}

.support-lead strong {
  color: #111827;
}

.support-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 600;
}

.support-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.support-chat {
  flex: 1;
  min-height: 220px;
  max-height: 42vh;
  overflow-y: auto;
  padding: 12px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.support-msg {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.4;
  word-break: break-word;
}

.support-msg--agent {
  align-self: flex-start;
  background: #f3f4f6;
  color: #111827;
  border-bottom-left-radius: 4px;
}

.support-msg--user {
  align-self: flex-end;
  background: #ff008c;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.support-msg__meta {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  opacity: 0.72;
}

.support-typing {
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: #9ca3af;
  font-style: italic;
}

.support-compose {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
}

.support-compose__input {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 0.9rem;
  outline: none;
}

.support-compose__input:focus {
  border-color: #ff008c;
  box-shadow: 0 0 0 3px rgba(255, 0, 140, 0.15);
}

.support-compose__send {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #ff008c;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}

.support-compose__send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.bank-connected {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f9fafb;
}

.bank-connected__logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.bank-connected__logo--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 700;
}

.bank-connected__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.bank-connected__text {
  margin: 0;
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.3;
}

.bank-connected__text strong {
  color: #111827;
}

.verify-form {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #6b7280;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  padding: 16px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 16px;
  color: var(--text);
  transition: border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.field input::placeholder {
  color: #9ca3af;
}

.field input:focus {
  outline: none;
  border-color: #ff008c;
}

.field__hint {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

#btn-verify {
  margin-top: 8px;
}

body.is-modal-open {
  overflow: hidden;
}

body.is-modal-open .page {
  filter: blur(5px);
  transform: scale(1.01);
}

.consult-overlay,
.reward-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: rgba(17, 24, 39, 0.35);
}

.consult-overlay--hidden,
.reward-overlay--hidden {
  display: none;
}

.consult-modal,
.reward-modal {
  width: 100%;
  max-width: 360px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  padding: 28px 22px 24px;
  text-align: center;
}

.consult-ring {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 0 auto 22px;
}

.consult-ring__track,
.consult-ring__arc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid #ffd4eb;
}

.consult-ring__arc {
  border-color: transparent;
  border-top-color: #ff008c;
  border-right-color: #ff008c;
  animation: spin 0.9s linear infinite;
}

.consult-ring__logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
}

.consult-modal__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
}

.consult-modal__subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.45;
}

.reward-modal__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #ff008c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(255, 0, 140, 0.35);
}

.reward-modal__title {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
}

.reward-modal__points {
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff0f7;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #374151;
}

.reward-modal__points strong {
  color: #ff008c;
  font-weight: 800;
}

.reward-modal__hint {
  margin: 0 0 16px;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.4;
}

.reward-data {
  margin: 0 0 18px;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
}

.reward-data__row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #f3f4f6;
}

.reward-data__row:last-child {
  border-bottom: none;
}

.reward-data dt {
  font-size: 0.72rem;
  font-weight: 600;
  color: #9ca3af;
}

.reward-data dd {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #111827;
  text-align: right;
  word-break: break-word;
}

.reward-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.reward-actions__btn {
  border: none;
  border-radius: 999px;
  padding: 14px 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.reward-actions__btn--ghost {
  background: #f3f4f6;
  color: #374151;
}

.reward-actions__btn--primary {
  background-color: #ff008c;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(255, 0, 140, 0.35);
}

@media (min-width: 481px) {
  .page {
    box-shadow: 0 0 0 1px #e5e7eb;
  }
}
