/* Camada de movimento para a interface M&A. O documento/PDF permanece estático. */
:root{
  --ma-ease-out:cubic-bezier(.2,.8,.2,1);
  --ma-ease-spring:cubic-bezier(.2,1.25,.35,1);
  --ma-motion-fast:160ms;
  --ma-motion-normal:240ms;
}

@media (prefers-reduced-motion:no-preference){
  .auth,.intake,.trash-view{
    animation:ma-surface-in 420ms var(--ma-ease-out) both;
  }

  button,.archive-link,.account-menu summary,.record-details summary,
  .avatar-choice,.chat-bubble,.chat-new-messages,.chat-message-actions button{
    transition:
      color var(--ma-motion-fast) ease,
      background-color var(--ma-motion-fast) ease,
      border-color var(--ma-motion-fast) ease,
      box-shadow var(--ma-motion-normal) var(--ma-ease-out),
      transform var(--ma-motion-fast) var(--ma-ease-out);
  }

  button:active,.archive-link:active,.chat-bubble:active,.chat-new-messages:active{
    transform:scale(.975);
  }

  .auth input,.intake input,.intake select,.search input,
  .chat-composer textarea{
    transition:border-color var(--ma-motion-fast) ease,box-shadow var(--ma-motion-fast) ease;
  }

  .stat,.client-record,.notification-history-item{
    transition:transform var(--ma-motion-normal) var(--ma-ease-out),
      box-shadow var(--ma-motion-normal) var(--ma-ease-out),
      border-color var(--ma-motion-fast) ease;
  }

  .record-progress-fill,.sales-bar .bar-fill{
    transition:width 520ms var(--ma-ease-out);
  }

  .chat-panel:not([hidden]){
    transform-origin:right bottom;
    animation:ma-chat-in 220ms var(--ma-ease-spring) both;
  }

  .chat-message-actions{
    animation:ma-surface-in 160ms var(--ma-ease-out) both;
  }

  .notification-history-item a,.record-forward,.record-open,
  #notificationButton,.intro-actions .primary{
    transition:transform var(--ma-motion-fast) var(--ma-ease-out),
      box-shadow var(--ma-motion-normal) var(--ma-ease-out),
      background-color var(--ma-motion-fast) ease;
  }
}

@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .stat:hover,.client-record:not(.trash-record):hover{
    transform:translateY(-2px);
    box-shadow:0 12px 28px rgba(24,57,100,.10);
  }

  .record-open:hover,.intro-actions .primary:hover,#notificationButton:hover{
    transform:translateY(-1px);
    box-shadow:0 8px 18px rgba(11,85,163,.20);
  }
}

@keyframes ma-surface-in{
  from{opacity:0;transform:translateY(9px)}
  to{opacity:1;transform:translateY(0)}
}

@keyframes ma-chat-in{
  from{opacity:0;transform:translateY(8px) scale(.97)}
  to{opacity:1;transform:translateY(0) scale(1)}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    scroll-behavior:auto!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}

@media print{
  .auth,.intake,.trash-view,.chat-panel{animation:none!important}
}
