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

@keyframes quickScaleIn {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }

    .main-content > header,
    .main-content > .filter-container,
    .main-content > .section-header,
    .main-content > .table-container,
    .main-content > .dash-grid-5,
    .main-content > .dash-grid-frota,
    .main-content > .dash-grid-3,
    .main-content > .dash-grid-2,
    .cadastro-toolbar,
    .login-container {
        animation: quickFadeUp 0.34s ease-out both;
    }

    .cadastro-options.open,
    .cadastro-form-block.active-section {
        animation: quickFadeUp 0.26s ease-out both;
    }

    .cadastro-options.open .cadastro-option {
        animation: quickFadeUp 0.24s ease-out both;
    }

    .cadastro-options.open .cadastro-option:nth-child(2) { animation-delay: 0.03s; }
    .cadastro-options.open .cadastro-option:nth-child(3) { animation-delay: 0.06s; }
    .cadastro-options.open .cadastro-option:nth-child(4) { animation-delay: 0.09s; }

    .modal-overlay[style*="flex"] .modal-content {
        animation: quickScaleIn 0.22s ease-out both;
    }

    button,
    .btn-add,
    .btn-green,
    .btn-red,
    .btn-yellow,
    .btn-filter,
    .cadastro-master,
    .cadastro-option,
    .sidebar-item {
        transition:
            transform 0.16s ease,
            filter 0.16s ease,
            box-shadow 0.16s ease,
            background-color 0.16s ease,
            border-color 0.16s ease,
            color 0.16s ease;
    }

    button:hover,
    .btn-add:hover,
    .btn-green:hover,
    .btn-red:hover,
    .btn-yellow:hover,
    .btn-filter:hover,
    .cadastro-master:hover,
    .cadastro-option:hover {
        transform: translateY(-1px);
        filter: brightness(1.06);
    }

    button:active,
    .btn-add:active,
    .btn-green:active,
    .btn-red:active,
    .btn-yellow:active,
    .btn-filter:active,
    .cadastro-master:active,
    .cadastro-option:active {
        transform: translateY(0) scale(0.985);
    }

    .dash-card,
    .table-container,
    header,
    .modal-content {
        will-change: transform, opacity;
    }

    tbody tr {
        transition: transform 0.14s ease, background-color 0.14s ease;
    }

    @media (min-width: 769px) {
        tbody tr:hover {
            transform: translateX(2px);
        }
    }
}

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