/* Evolora — Tema público completo v2 */
/* Cobre: entrada, login, cadastro por convite, convites (todos os estados),
   múltiplas memberships, conta sem membership. */

:root {
  /* Paleta oficial Evolora */
  --evolora-green-primary: #57E782;
  --evolora-green-secondary: #1F8466;
  --evolora-black-deep: #070908;
  --evolora-graphite: #111512;
  --evolora-border: #252B27;
  --evolora-white: #F4F7F5;
  --evolora-text-secondary: #A7B0AB;
  --evolora-font-brand: "Manrope", "Inter", Arial, sans-serif;
  --evolora-font-ui: "Inter", Arial, sans-serif;

  /* Semântica de superfície */
  --evolora-bg: var(--evolora-black-deep);
  --evolora-surface: var(--evolora-graphite);
  --evolora-surface-soft: rgba(255, 255, 255, 0.02);
  --evolora-text: var(--evolora-white);
  --evolora-text-muted: var(--evolora-text-secondary);
  --evolora-border-color: var(--evolora-border);
  --evolora-accent: var(--evolora-green-primary);
  --evolora-accent-hover: #48d26f;
  --evolora-accent-active: #3ab85a;
  --evolora-accent-ink: #06150f;

  /* Cores semânticas (acessíveis em fundo escuro) */
  --evolora-success: #57E782;
  --evolora-error: #FF6B6B;
  --evolora-error-bg: rgba(255, 107, 107, 0.08);
  --evolora-error-border: rgba(255, 107, 107, 0.3);
  --evolora-warning: #F2B84B;
  --evolora-warning-bg: rgba(242, 184, 75, 0.08);
  --evolora-warning-border: rgba(242, 184, 75, 0.3);
  --evolora-neutral: #A7B0AB;
  --evolora-neutral-bg: rgba(167, 176, 171, 0.08);
  --evolora-neutral-border: rgba(167, 176, 171, 0.3);
}

/* ==========================================================================
   Base — remove qualquer fundo antigo, controla tudo pelo tema oficial
   ========================================================================== */

html.sgp-public-route,
body.sgp-public-route {
  margin: 0;
  padding: 0;
  background: var(--evolora-bg) !important;
  background-image: none !important;
  color: var(--evolora-text);
  font-family: var(--evolora-font-ui);
  font-size: 16px;
  line-height: 1.5;
}

#sgp-public-root {
  background: var(--evolora-bg) !important;
  background-image: none !important;
  min-height: 100vh;
  width: 100%;
}

#sgp-public-root * {
  box-sizing: border-box;
}

/* ==========================================================================
   Shell — arquitetura de duas áreas (institucional + ação)
   ========================================================================== */

.public-shell {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
  width: 100%;
  background: var(--evolora-bg);
}

.public-institutional {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  min-width: 0;
}

.public-institutional-inner {
  max-width: 420px;
  width: 100%;
}

.public-action {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  min-width: 0;
}

/* Símbolo e marca */

.evolora-symbol-svg {
  display: block;
}

.evolora-symbol-lg {
  width: 88px;
  height: 88px;
  margin-bottom: 28px;
}

.evolora-symbol-md {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
}

.evolora-wordmark {
  font-family: var(--evolora-font-brand);
  font-size: 40px;
  font-weight: 700;
  color: var(--evolora-text);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  line-height: 1.1;
}

.evolora-tagline {
  font-size: 16px;
  color: var(--evolora-text-muted);
  margin: 0 0 24px;
  font-weight: 500;
  line-height: 1.5;
}

.public-institutional-text {
  font-size: 14px;
  color: var(--evolora-text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Card central — usado em login, cadastro, convites, memberships */

.evolora-card {
  width: 100%;
  max-width: 440px;
  background: var(--evolora-surface);
  border: 1px solid var(--evolora-border-color);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.evolora-card-header {
  text-align: center;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.evolora-card-title {
  margin: 0;
  font-size: 22px;
  color: var(--evolora-text);
  font-weight: 700;
  font-family: var(--evolora-font-brand);
  letter-spacing: -0.01em;
}

.evolora-card-subtitle {
  color: var(--evolora-text-muted);
  font-size: 14px;
  margin: 6px 0 0;
  font-weight: 400;
  line-height: 1.5;
}

/* Ações da entrada pública (sem formulário) */

.public-entry-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.public-entry-notice {
  margin-top: 20px;
  font-size: 13px;
  color: var(--evolora-text-muted);
  min-height: 20px;
  text-align: center;
}

/* ==========================================================================
   Formulários e campos
   ========================================================================== */

.evolora-field {
  margin-bottom: 18px;
}

.evolora-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--evolora-text);
  font-size: 14px;
}

.evolora-input {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--evolora-border-color);
  border-radius: 8px;
  font-size: 14px;
  background: var(--evolora-surface-soft);
  color: var(--evolora-text);
  transition: all 0.2s ease;
  font-family: var(--evolora-font-ui);
}

.evolora-input::placeholder {
  color: var(--evolora-text-muted);
}

.evolora-input:focus {
  outline: none;
  border-color: var(--evolora-accent);
  background: rgba(87, 231, 130, 0.04);
  box-shadow: 0 0 0 3px rgba(87, 231, 130, 0.12);
}

.evolora-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.evolora-error-text {
  color: var(--evolora-error);
  font-size: 13px;
  margin-top: 8px;
  display: none;
  animation: evoloraFadeIn 0.2s ease;
}

.evolora-error-text.active {
  display: block;
}

.evolora-hint {
  font-size: 13px;
  color: var(--evolora-text-muted);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--evolora-border-color);
  line-height: 1.5;
}

@keyframes evoloraFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Botões — hierarquia consistente (primário verde / secundário grafite)
   ========================================================================== */

.evolora-buttons {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.evolora-buttons.stack {
  flex-direction: column;
}

.evolora-btn {
  flex: 1;
  min-height: 44px;
  padding: 12px 20px;
  border: 1px solid var(--evolora-border-color);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  background: transparent;
  color: var(--evolora-text);
  transition: all 0.2s ease;
  font-family: var(--evolora-font-ui);
}

.evolora-btn:hover:not(:disabled) {
  border-color: var(--evolora-accent);
  color: var(--evolora-accent);
}

.evolora-btn:active:not(:disabled) {
  background: rgba(87, 231, 130, 0.08);
}

.evolora-btn:focus-visible {
  outline: 2px solid var(--evolora-accent);
  outline-offset: 2px;
}

.evolora-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.evolora-btn-primary {
  background: var(--evolora-accent);
  color: var(--evolora-accent-ink);
  border-color: var(--evolora-accent);
  font-weight: 700;
}

.evolora-btn-primary:hover:not(:disabled) {
  background: var(--evolora-accent-hover);
  border-color: var(--evolora-accent-hover);
  color: var(--evolora-accent-ink);
}

.evolora-btn-primary:active:not(:disabled) {
  background: var(--evolora-accent-active);
  border-color: var(--evolora-accent-active);
}

.evolora-btn-primary:disabled {
  opacity: 0.6;
}

.evolora-btn-full {
  width: 100%;
}

/* Botão Google */

.evolora-google-btn {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--evolora-border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.01);
  color: var(--evolora-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--evolora-font-ui);
}

.evolora-google-btn:hover:not(:disabled) {
  border-color: var(--evolora-accent);
  background: rgba(87, 231, 130, 0.06);
  color: var(--evolora-accent);
}

.evolora-google-btn:active:not(:disabled) {
  background: rgba(87, 231, 130, 0.12);
}

.evolora-google-btn:focus-visible {
  outline: 2px solid var(--evolora-accent);
  outline-offset: 2px;
}

.evolora-google-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.evolora-google-btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* Divisor "ou" */

.evolora-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--evolora-text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.evolora-divider::before,
.evolora-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--evolora-border-color);
}

/* ==========================================================================
   Loading
   ========================================================================== */

.evolora-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 14px;
  color: var(--evolora-text-muted);
  padding: 20px 0;
  text-align: center;
}

.evolora-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--evolora-border-color);
  border-top-color: var(--evolora-accent);
  border-radius: 50%;
  animation: evoloraSpin 0.8s linear infinite;
}

@keyframes evoloraSpin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Mensagens / painéis informativos (sem membership, erro de convite, etc.)
   ========================================================================== */

.evolora-message-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--evolora-surface-soft);
  border: 1px solid var(--evolora-border-color);
}

.evolora-message-icon svg {
  width: 22px;
  height: 22px;
}

.evolora-message-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--evolora-text);
  font-family: var(--evolora-font-brand);
  text-align: center;
}

.evolora-message-text {
  color: var(--evolora-text-muted);
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

/* ==========================================================================
   Bloco de informação estruturado (convite: empresa, e-mail, status)
   ========================================================================== */

.evolora-info-block {
  background: var(--evolora-surface-soft);
  border: 1px solid var(--evolora-border-color);
  border-radius: 10px;
  padding: 18px;
  text-align: left;
  margin-bottom: 20px;
}

.evolora-info-row {
  margin-bottom: 14px;
}

.evolora-info-row:last-child {
  margin-bottom: 0;
}

.evolora-info-label {
  display: block;
  color: var(--evolora-text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}

.evolora-info-value {
  font-size: 15px;
  color: var(--evolora-text);
  font-weight: 600;
}

/* Badge de status semântico */

.evolora-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--evolora-neutral);
  background: var(--evolora-neutral-bg);
  color: var(--evolora-text);
}

.evolora-status-badge.status-pending {
  border-left-color: var(--evolora-success);
  background: rgba(87, 231, 130, 0.08);
}

.evolora-status-badge.status-expired,
.evolora-status-badge.status-invalid {
  border-left-color: var(--evolora-error);
  background: var(--evolora-error-bg);
}

.evolora-status-badge.status-cancelled {
  border-left-color: var(--evolora-warning);
  background: var(--evolora-warning-bg);
}

.evolora-status-badge.status-accepted {
  border-left-color: var(--evolora-neutral);
  background: var(--evolora-neutral-bg);
}

/* Caixa de aviso (necessário autenticar para aceitar convite) */

.evolora-notice-box {
  background: var(--evolora-surface-soft);
  border: 1px solid var(--evolora-border-color);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--evolora-text-muted);
  line-height: 1.5;
}

/* Erro inline em card de ação (convite) */

.evolora-alert-error {
  display: none;
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--evolora-error-bg);
  border: 1px solid var(--evolora-error-border);
  border-radius: 8px;
  color: var(--evolora-error);
  font-size: 13px;
  line-height: 1.5;
}

/* ==========================================================================
   Lista de empresas (múltiplas memberships)
   ========================================================================== */

.evolora-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0;
  text-align: left;
}

.evolora-list-item {
  width: 100%;
  padding: 14px 16px;
  background: var(--evolora-surface-soft);
  border: 1px solid var(--evolora-border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  color: var(--evolora-text);
  font-size: 14px;
  text-align: left;
  font-family: var(--evolora-font-ui);
}

.evolora-list-item:hover:not(:disabled) {
  border-color: var(--evolora-accent);
  background: rgba(87, 231, 130, 0.06);
}

.evolora-list-item:focus-visible {
  outline: 2px solid var(--evolora-accent);
  outline-offset: 2px;
}

.evolora-list-item:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ==========================================================================
   Responsividade
   ========================================================================== */

@media (max-width: 1023px) {
  .public-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .public-institutional {
    padding: 44px 24px 12px;
  }

  .public-institutional-inner {
    text-align: center;
  }

  .public-action {
    padding: 12px 20px 44px;
  }

  .evolora-symbol-lg {
    margin: 0 auto 20px;
  }

  .evolora-wordmark {
    font-size: 32px;
  }
}

@media (max-width: 640px) {
  .public-institutional {
    padding: 32px 20px 8px;
  }

  .public-action {
    padding: 8px 16px 32px;
  }

  .evolora-card {
    padding: 28px 20px;
    border-radius: 12px;
  }

  .evolora-wordmark {
    font-size: 28px;
  }

  .evolora-tagline {
    font-size: 14px;
  }

  .evolora-buttons {
    flex-direction: column;
  }
}
